Supercharge Your Innovation With Domain-Expert AI Agents!

Coding method and device

A coding method and coding tree technology, which are applied in the field of coding methods and devices, can solve the problems of slow coding speed and slow establishment of Huffman tree, and achieve the effect of improving the speed of lossless compression

Active Publication Date: 2017-11-07
XIAN WANXIANG ELECTRONICS TECH CO LTD
View PDF2 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The embodiment of the present invention provides an encoding method and device to at least solve the technical problem of slow encoding speed caused by the slow establishment of the Huffman tree in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Coding method and device
  • Coding method and device
  • Coding method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0040] According to an embodiment of the present invention, an embodiment of a coding method is provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and, although in The flowcharts show a logical order, but in some cases the steps shown or described may be performed in an order different from that shown or described herein.

[0041] figure 2 is a flowchart of an encoding method according to an embodiment of the present invention, such as figure 2 As shown, the method includes the following steps:

[0042] Step S202, obtaining the occurrence probability of each coding symbol in the data to be coded.

[0043] As an optional embodiment, obtaining the probability of occurrence of each coded symbol in the data to be coded includes: obtaining the frequency of occurrence of each coded symbol and the number of all coded symbols in the data to be coded...

Embodiment 2

[0115] According to an embodiment of the present invention, an embodiment of an encoding device is provided, Figure 6 is a schematic diagram of an encoding device according to an embodiment of the present invention, such as Figure 6 As shown, the device includes:

[0116] An obtaining module 60, configured to obtain the probability of occurrence of each coding symbol in the data to be coded.

[0117] The layering module 62 is configured to perform layering on each coded symbol according to the probability range corresponding to the occurrence probability of each coded symbol.

[0118] Building a coding tree module 64, which is used to raise the coding symbols in the layer corresponding to the probability range to the upper layer according to the preset rules in the order of the threshold value in the probability range from small to large, until the code symbols in the layer corresponding to the minimum probability range Encoding symbols rise to the top level, resulting in ...

Embodiment 3

[0138] According to an embodiment of the present invention, a storage medium is provided, and the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the encoding methods in Embodiment 1.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a coding method and a coding device. The method comprises the steps of acquiring an appearance probability of each coding symbol in data to be coded; layering each coding symbol according to a probability range corresponding to the appearance probability of each coding symbol; raising the coding symbols in the layer corresponding to the probability range to the upper layer according to a preset rule in accordance with an ascending order of threshold values in the probability range, until the coding symbols in the layer corresponding to the minimum probability range is raised to the top layer, thus acquiring a coding tree of the data to be coded; and coding the data to be coded according to the coding tree. According to the method and the device provided by the invention, the technical problem that in the prior art, building of the Huffman tree is slow and thus the coding speed is slow is solved.

Description

technical field [0001] The present invention relates to the field of encoding, in particular, to an encoding method and device. Background technique [0002] Huffman coding (Huffman Coding) is a coding method, which is a kind of variable word length coding (VLC). Huffman proposed this encoding method in 1952. This method uses shorter encoding representations for symbols that appear more frequently, and uses longer encoding representations for symbols that occur less frequently, which makes the average expectation of the encoded string The length is reduced, so as to achieve the purpose of lossless compression data. The Huffman algorithm needs to scan the data twice. The first scan calculates the frequency of symbols appearing in the data, and then constructs a Huffman tree according to the frequency of the symbols, and the second scan data encodes the symbols according to the Huffman tree. [0003] The calculation method of constructing the Huffman tree is as follows: fir...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H03M7/40
CPCH03M7/40
Inventor 杨磊钟炎培
Owner XIAN WANXIANG ELECTRONICS TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More