CN107528828A - The method and terminal of a kind of compressed data - Google Patents
The method and terminal of a kind of compressed data Download PDFInfo
- Publication number
- CN107528828A CN107528828A CN201710625479.1A CN201710625479A CN107528828A CN 107528828 A CN107528828 A CN 107528828A CN 201710625479 A CN201710625479 A CN 201710625479A CN 107528828 A CN107528828 A CN 107528828A
- Authority
- CN
- China
- Prior art keywords
- data
- dictionary
- compressed
- data dictionary
- shared
- 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
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/04—Protocols for data compression, e.g. ROHC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention relates to the method and terminal of data processing field, more particularly to a kind of compressed data.The present invention passes through S1, default shared data dictionary;S2, according to default compression algorithm compress primary data, obtain intermediate data and data dictionary corresponding with the intermediate data;S3, the intermediate data according to the shared data dictionary compression, obtain final data;S4, basis data dictionary corresponding with the intermediate data update the shared data dictionary;S5, repeat step S2 are to step S4, until primary data to be compressed is not present.Realize the compression efficiency that small data packets are improved during small data packets are sent in real time.
Description
Technical field
The present invention relates to the method and terminal of data processing field, more particularly to a kind of compressed data.
Background technology
Transmitting terminal and receiving terminal are used in TCP or UDP communication process, transmitting real-time data generally not compressed data or to every
One packet is compressed transmission.Efficiency of transmission is low by the way of not compressed data.Carried out using to each packet
During compression transmission, compression algorithm can generate data dictionary corresponding with the packet during each packet is compressed,
So that receiving terminal is according to the packet after data dictionary decoding compression.But when packet smaller (several bytes to hundreds of bytes),
The data dictionary effect of these each in-time generatins is little, and compression ratio is low, and compression effectiveness is undesirable.It is for example, current to be compressed
Data are " hiabcdefghi ", wherein only having " hi " can be compressed.
And the application such as common game data synchronization, document real-time collaborative, remote assistance, it is required for real-time Transmission much small
Data or instruction, because the compression ratio of existing data compression technique compression small data packets is low, cause in real-time Transmission small data
Efficiency of transmission is low during bag, and the occupancy of bandwidth and flow is larger.
The content of the invention
The technical problems to be solved by the invention are:How the compression efficiency of small data packets is improved.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention is:
The present invention provides a kind of method of compressed data, comprises the following steps:
S1, default shared data dictionary;
S2, primary data compressed according to default compression algorithm, obtain intermediate data and corresponding with the intermediate data
Data dictionary;
S3, the intermediate data according to the shared data dictionary compression, obtain final data;
S4, basis data dictionary corresponding with the intermediate data update the shared data dictionary;
S5, repeat step S2 are to step S4, until primary data to be compressed is not present.
The present invention also provides a kind of terminal of compressed data, including one or more processors and memory, the storage
Device has program stored therein, and is configured to by one or more of computing device following steps:
S1, default shared data dictionary;
S2, primary data compressed according to default compression algorithm, obtain intermediate data and corresponding with the intermediate data
Data dictionary;
S3, the intermediate data according to the shared data dictionary compression, obtain final data;
S4, basis data dictionary corresponding with the intermediate data update the shared data dictionary;
S5, repeat step S2 are to step S4, until primary data to be compressed is not present.
The beneficial effects of the present invention are:After the present invention is using default compression algorithm compression small data packets, always according to it
The data dictionary of the small data packets of preceding compression further performs squeeze operation so that is not repeated in single small data packets but multiple
The data for having repetition between small data packets can be also efficiently compressed, so as to improve the compression ratio of small data packets.With small data
The increase of packet compression number, shared data dictionary increase therewith, and compression effectiveness is more notable.The side of compressed data provided by the invention
Method and terminal are effectively saved has a large amount of applications of small data or instruction in real time (such as number in real time of playing using TCP or UDP transmission
According to, document live collaboration, remote assistance etc.) service end bandwidth occupancy and client traffic expense caused by operation, improve net
Network transmission speed, efficiency and Consumer's Experience, solve the problems, such as that service end bandwidth congestion and bandwidth cost are high, improve same band
Supported customer volume.
Brief description of the drawings
Fig. 1 is a kind of FB(flow block) of the embodiment of the method for compressed data provided by the invention;
Fig. 2 is a kind of structured flowchart of the embodiment of the terminal of compressed data provided by the invention;
Label declaration:
1st, processor;2nd, memory.
Embodiment
To describe the technology contents of the present invention, the objects and the effects in detail, below in conjunction with embodiment and coordinate attached
Figure is explained.
Fig. 1 and Fig. 2 is refer to,
As shown in figure 1, the present invention provides a kind of method of compressed data, comprise the following steps:
S1, default shared data dictionary;
S2, primary data compressed according to default compression algorithm, obtain intermediate data and corresponding with the intermediate data
Data dictionary;
S3, the intermediate data according to the shared data dictionary compression, obtain final data;
S4, basis data dictionary corresponding with the intermediate data update the shared data dictionary;
S5, repeat step S2 are to step S4, until primary data to be compressed is not present.
Further, the S4 is specially:
Data dictionary corresponding with the intermediate data is obtained, obtains intermediate data dictionary;
Obtain and exist in the intermediate data dictionary, and the data being not present in the shared data dictionary, obtain increment
Data;
The incremental data is added to the shared data dictionary.
Seen from the above description, be advantageous to reduce the redundancy of shared data dictionary, improve decoding efficiency.
Further, in addition to:
Communication connection is established with receiving terminal;
The final data and the incremental data are sent in real time to receiving terminal.
Seen from the above description, increment transmitting and receiving terminal is used for the data dictionary for decompressing data, is advantageous to save transmission
Bandwidth and flow.
Further, the S5 is specially:
Repeat step S2 to step S4, until primary data to be compressed is not present in prefixed time interval.
Seen from the above description, certain stand-by period need to be given for the data generated in real time.
Further, after the S1, in addition to:
It is empty set to initialize the shared data dictionary.
Further, after the S1, in addition to:
Obtain the unique identifier of primary data to be compressed;
Obtain historical data dictionary corresponding with the unique identifier;
The shared data dictionary is initialized according to the historical data dictionary.
Seen from the above description, in first-time compression small data packets, usage history data dictionary initializes shared data dictionary
Small data packets compression efficiency before can effectively improving several times.
As shown in Fig. 2 the present invention also provides a kind of terminal of compressed data, including one or more processors and memory
2, the memory storage has program, and is configured to by one or more of computing device following steps:
S1, default shared data dictionary;
S2, primary data compressed according to default compression algorithm, obtain intermediate data and corresponding with the intermediate data
Data dictionary;
S3, the intermediate data according to the shared data dictionary compression, obtain final data;
S4, basis data dictionary corresponding with the intermediate data update the shared data dictionary;
S5, repeat step S2 are to step S4, until primary data to be compressed is not present.
Further, the S4 is specially:
Data dictionary corresponding with the intermediate data is obtained, obtains intermediate data dictionary;
Obtain and exist in the intermediate data dictionary, and the data being not present in the shared data dictionary, obtain increment
Data;
The incremental data is added to the shared data dictionary.
Further, in addition to:
Communication connection is established with receiving terminal;
The final data and the incremental data are sent in real time to receiving terminal.
Further, the S5 is specially:
Repeat step S2 to step S4, until primary data to be compressed is not present in prefixed time interval.
Further, after the S1, in addition to:
It is empty set to initialize the shared data dictionary.
Further, after the S1, in addition to:
Obtain the unique identifier of primary data to be compressed;
Obtain historical data dictionary corresponding with the unique identifier;
The shared data dictionary is initialized according to the historical data dictionary.
Embodiments of the invention one are:
The present embodiment provides a kind of method of compressed data, comprises the following steps:
S1, communication connection is established with receiving terminal.
S2, default shared data dictionary.
S3, the initialization shared data dictionary;
Alternatively, the shared data dictionary can be initialized using following two modes;
First method, it is empty set to initialize the shared data dictionary.
Second method, obtain the unique identifier of primary data to be compressed;Obtain corresponding with the unique identifier
Historical data dictionary;The shared data dictionary is initialized according to the historical data dictionary;
Alternatively, the unique identifier is used to identify which application program is primary data derive from, according to the application
Program is sending the historical data dictionary accumulated in data procedures as the initial of this real-time transmission data procedures in real time before
Shared data dictionary, the compression efficiency of several small data packets before largely improving.
For example, a historical data dictionary is obtained according to the unique identifier of primary data to be compressed, including:Dictionary " 1 "
Respective value " ab ", dictionary " 2 " respective value " ef ".
S4, primary data compressed according to default compression algorithm, obtain intermediate data and corresponding with the intermediate data
Data dictionary;
For example, primary data is efabcdecd, the primary data is compressed according to default compression algorithm LZO, in obtaining
Between data efab3e3, data dictionary corresponding with intermediate data is:Dictionary " 3 " correspondence " cd ".
S5, the intermediate data according to the shared data dictionary compression, obtain final data;
For example, intermediate data efab3e3 can not be further compressed using existing compression algorithm, and according to shared number
According to dictionary, it can further compress to obtain final data 213e3, improve the compression efficiency of small data packets;Similarly, even in initial
Shared data dictionary is arranged to empty set by the change stage, with the real-time increase for sending small data packets number, in shared data dictionary
Dictionary and the occurrence of character string are more and more, the compression ratio more and more higher of the small data packets subsequently sent.
S6, basis data dictionary corresponding with the intermediate data update the shared data dictionary;Specially:
S61, data dictionary corresponding with the intermediate data is obtained, obtain intermediate data dictionary;
Exist in S62, the acquisition intermediate data dictionary, and the data being not present in the shared data dictionary, obtain
Incremental data;
S63, the addition incremental data to the shared data dictionary;
For example, incremental data is dictionary " 3 " correspondence " cd ";Incremental data is added to shared data dictionary so that can make
The follow-up small data packets sent in real time of matched rule compression corresponding to incremental data.
S7, the final data and the incremental data are sent in real time to receiving terminal;
Alternatively, the incremental data obtained after each second compression of transmitting terminal is sent to receiving terminal, receiving terminal and passes through increment
Data and the data dictionary can for being originally intended to decompress correctly decompress the compressed data of transmitting terminal transmission.
S8, repeat step S2 are to step S4, until primary data to be compressed is not present in prefixed time interval.
Embodiments of the invention two are:
The present embodiment provides a kind of terminal of compressed data, including one or more processors 1 and memory, the storage
Device has program stored therein, and is configured to by one or more of computing device following steps:
S1, communication connection is established with receiving terminal;
S2, default shared data dictionary;
S3, the initialization shared data dictionary;
S4, primary data compressed according to default compression algorithm, obtain intermediate data and corresponding with the intermediate data
Data dictionary;
S5, the intermediate data according to the shared data dictionary compression, obtain final data;
S6, basis data dictionary corresponding with the intermediate data update the shared data dictionary;Specially:
S61, data dictionary corresponding with the intermediate data is obtained, obtain intermediate data dictionary;
Exist in S62, the acquisition intermediate data dictionary, and the data being not present in the shared data dictionary, obtain
Incremental data;
S63, the addition incremental data to the shared data dictionary;
S7, the final data and the incremental data are sent in real time to receiving terminal;
S8, repeat step S2 are to step S4, until primary data to be compressed is not present in prefixed time interval.
In summary, the method and terminal of a kind of compressed data provided by the invention, the present invention are calculated using default compression
After method compression small data packets, squeeze operation is further performed always according to the data dictionary for the small data packets compressed before so that single
The data for not repeated in individual small data packets but having repetition between multiple small data packets can be also efficiently compressed, small so as to improve
The compression ratio of packet.With the increase of small data packets compression number, shared data dictionary increases therewith, and compression effectiveness is more aobvious
Write.The method and terminal of compressed data provided by the invention are effectively saved has a large amount of real-time small datas using TCP or UDP transmission
Or service end bandwidth caused by application (such as game real time data, document live collaboration, remote assistance etc.) operation of instruction accounts for
With with client traffic expense, improve network transfer speeds, efficiency and Consumer's Experience, solve service end bandwidth congestion and bandwidth
The problem of cost is high, improve the supported customer volume of same band.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hair
The equivalents that bright specification and accompanying drawing content are made, or the technical field of correlation is directly or indirectly used in, similarly include
In the scope of patent protection of the present invention.
Claims (12)
- A kind of 1. method of compressed data, it is characterised in that comprise the following steps:S1, default shared data dictionary;S2, according to default compression algorithm compress primary data, obtain intermediate data and data corresponding with the intermediate data Dictionary;S3, the intermediate data according to the shared data dictionary compression, obtain final data;S4, basis data dictionary corresponding with the intermediate data update the shared data dictionary;S5, repeat step S2 are to step S4, until primary data to be compressed is not present.
- 2. the method for compressed data according to claim 1, it is characterised in that the S4 is specially:Data dictionary corresponding with the intermediate data is obtained, obtains intermediate data dictionary;Obtain and exist in the intermediate data dictionary, and the data being not present in the shared data dictionary, obtain incremental data;The incremental data is added to the shared data dictionary.
- 3. the method for compressed data according to claim 2, it is characterised in that also include:Communication connection is established with receiving terminal;The final data and the incremental data are sent in real time to receiving terminal.
- 4. the method for compressed data according to claim 1, it is characterised in that the S5 is specially:Repeat step S2 to step S4, until primary data to be compressed is not present in prefixed time interval.
- 5. the method for compressed data according to claim 1, it is characterised in that after the S1, in addition to:It is empty set to initialize the shared data dictionary.
- 6. the method for compressed data according to claim 1, it is characterised in that after the S1, in addition to:Obtain the unique identifier of primary data to be compressed;Obtain historical data dictionary corresponding with the unique identifierThe shared data dictionary is initialized according to the historical data dictionary.
- 7. a kind of terminal of compressed data, it is characterised in that including one or more processors and memory, the memory is deposited Program is contained, and is configured to by one or more of computing device following steps:S1, default shared data dictionary;S2, according to default compression algorithm compress primary data, obtain intermediate data and data corresponding with the intermediate data Dictionary;S3, the intermediate data according to the shared data dictionary compression, obtain final data;S4, basis data dictionary corresponding with the intermediate data update the shared data dictionary;S5, repeat step S2 are to step S4, until primary data to be compressed is not present.
- 8. the terminal of compressed data according to claim 7, it is characterised in that the S4 is specially:Data dictionary corresponding with the intermediate data is obtained, obtains intermediate data dictionary;Obtain and exist in the intermediate data dictionary, and the data being not present in the shared data dictionary, obtain incremental data;The incremental data is added to the shared data dictionary.
- 9. the terminal of compressed data according to claim 8, it is characterised in that also include:Communication connection is established with receiving terminal;The final data and the incremental data are sent in real time to receiving terminal.
- 10. the terminal of compressed data according to claim 7, it is characterised in that the S5 is specially:Repeat step S2 to step S4, until primary data to be compressed is not present in prefixed time interval.
- 11. the terminal of compressed data according to claim 7, it is characterised in that after the S1, in addition to:It is empty set to initialize the shared data dictionary.
- 12. the terminal of compressed data according to claim 7, it is characterised in that after the S1, in addition to:Obtain the unique identifier of primary data to be compressed;Obtain historical data dictionary corresponding with the unique identifierThe shared data dictionary is initialized according to the historical data dictionary.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710625479.1A CN107528828A (en) | 2017-07-27 | 2017-07-27 | The method and terminal of a kind of compressed data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710625479.1A CN107528828A (en) | 2017-07-27 | 2017-07-27 | The method and terminal of a kind of compressed data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107528828A true CN107528828A (en) | 2017-12-29 |
Family
ID=60680299
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710625479.1A Pending CN107528828A (en) | 2017-07-27 | 2017-07-27 | The method and terminal of a kind of compressed data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107528828A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110928809A (en) * | 2019-11-25 | 2020-03-27 | 航天科技控股集团股份有限公司 | Method for programming image data to external Flash through CAN bus |
US11122095B2 (en) | 2019-09-23 | 2021-09-14 | Netapp, Inc. | Methods for dictionary-based compression and devices thereof |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120296983A1 (en) * | 2011-05-17 | 2012-11-22 | Microsoft Corporation | Managing compression dictionaries |
US20130086339A1 (en) * | 2011-10-01 | 2013-04-04 | Ilan Pardo | Method and apparatus for high bandwidth dictionary compression technique using delayed dictionary update |
CN103281156A (en) * | 2013-05-02 | 2013-09-04 | 华为技术有限公司 | Methods and devices for compressing and decompressing data |
US20140070966A1 (en) * | 2012-09-10 | 2014-03-13 | Canon Kabushiki Kaisha | Methods and systems for compressing and decompressing data |
CN106375177A (en) * | 2015-07-21 | 2017-02-01 | 中兴通讯股份有限公司 | Message transmission method and apparatus |
-
2017
- 2017-07-27 CN CN201710625479.1A patent/CN107528828A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120296983A1 (en) * | 2011-05-17 | 2012-11-22 | Microsoft Corporation | Managing compression dictionaries |
US20130086339A1 (en) * | 2011-10-01 | 2013-04-04 | Ilan Pardo | Method and apparatus for high bandwidth dictionary compression technique using delayed dictionary update |
US20140070966A1 (en) * | 2012-09-10 | 2014-03-13 | Canon Kabushiki Kaisha | Methods and systems for compressing and decompressing data |
CN103281156A (en) * | 2013-05-02 | 2013-09-04 | 华为技术有限公司 | Methods and devices for compressing and decompressing data |
CN106375177A (en) * | 2015-07-21 | 2017-02-01 | 中兴通讯股份有限公司 | Message transmission method and apparatus |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11122095B2 (en) | 2019-09-23 | 2021-09-14 | Netapp, Inc. | Methods for dictionary-based compression and devices thereof |
US11444997B2 (en) | 2019-09-23 | 2022-09-13 | Netapp, Inc. | Methods for dictionary-based compression and devices thereof |
CN110928809A (en) * | 2019-11-25 | 2020-03-27 | 航天科技控股集团股份有限公司 | Method for programming image data to external Flash through CAN bus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103945003B (en) | A kind of method that WebRTC clients connect dynamic adaptive selection | |
US20180145928A1 (en) | Method for Transmitting Service Stream in Flexible Ethernet and Apparatus | |
CN101188477B (en) | A data packet sequence receiving method and device | |
CN101146025B (en) | Packet transmission method, system and compression unit for compression real time transmission protocol | |
CN104243281B (en) | Voice communication method based on mobile internet | |
CN103281156B (en) | A kind of data compression, decompression method and device | |
CN110035072A (en) | Receiving device and method of reseptance | |
CN102137126B (en) | System and method for updating web data | |
CN105471869A (en) | Internet television content request connection reuse method and system thereof | |
CN103747097A (en) | Mobile terminal HTTP (Hyper Text Transport Protocol) request aggregation compression system and method | |
CN107528828A (en) | The method and terminal of a kind of compressed data | |
CN102469065A (en) | Method and system for interacting data with hypertext markup language (HTML)5 browser | |
CN104168486A (en) | Virtual machine and client video redirection method based on cloud computing | |
CN110620637B (en) | Data decompression device and method based on FPGA | |
CN106851733A (en) | A kind of adaptive H TTP message compression methods for mobile network's application | |
CN109120687A (en) | Data packet sending method, device, system, equipment and storage medium | |
CN1988543A (en) | Message type identifying method and device, message header compressing method and system | |
CN112787902B (en) | Message encapsulation method and device and message decapsulation method and device | |
CN106506390A (en) | A kind of data flow transmission method | |
CN107251529A (en) | Method and apparatus for transmission and receive information between the server in content transfers net system | |
CN104735151A (en) | Process bar control method, device and system | |
US20190347238A1 (en) | Systems and methods for data transfer over a shared interface | |
JP5382812B2 (en) | Data compression / transfer system, transmission apparatus, and data compression / transfer method used therefor | |
CN101047620B (en) | Device and method for quickly processing message | |
CN103220260B (en) | The more method of new data, server, client and 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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20171229 |
|
WD01 | Invention patent application deemed withdrawn after publication |