CN112003625A - Huffman coding method, system and equipment - Google Patents

Huffman coding method, system and equipment Download PDF

Info

Publication number
CN112003625A
CN112003625A CN202010820245.4A CN202010820245A CN112003625A CN 112003625 A CN112003625 A CN 112003625A CN 202010820245 A CN202010820245 A CN 202010820245A CN 112003625 A CN112003625 A CN 112003625A
Authority
CN
China
Prior art keywords
coded
identification information
characters
character
occurrence
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.)
Withdrawn
Application number
CN202010820245.4A
Other languages
Chinese (zh)
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.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center 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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202010820245.4A priority Critical patent/CN112003625A/en
Publication of CN112003625A publication Critical patent/CN112003625A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/30Compression; Expansion; Suppression of unnecessary data, e.g. redundancy reduction
    • H03M7/40Conversion to or from variable length codes, e.g. Shannon-Fano code, Huffman code, Morse code

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The application discloses a Huffman coding method, a Huffman coding system and Huffman coding equipment, wherein data to be coded are obtained; counting characters to be coded in data to be coded and the occurrence frequency of the characters to be coded; counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded; using the applied times of the character to be coded as the code length of the character to be coded; determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to perform Huffman coding on the data to be coded; and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded. In the method, a binary tree does not need to be generated, and memory consumption caused by storing the binary tree is avoided; only the number of times of the characters to be coded is needed to be recorded, and the recorded content is simple and few, so that the software and hardware are convenient to realize; in addition, the efficiency of Huffman coding can be improved, and the limitation is low.

Description

Huffman coding method, system and equipment
Technical Field
The present application relates to the field of digital coding technologies, and in particular, to a huffman coding method, system, and device.
Background
Currently, with the continuous development of scientific technology, data information shows an increase in explosion. The rise of cloud computing, the promotion of artificial intelligence, the arrival of big data era, new work load constantly increases, and the problem of mass data transmission and storage constantly arouses the concern, how can high-efficiently transmit mass data, does not cause the problem of too heavy load to the treater to be solved urgently simultaneously. If the file can be compressed in advance during file transmission, the data flow can be saved, and the transmission time is reduced; if the file is compressed before the disk file is read, the file reading speed can be improved; in summary, compressing data provides a new way to improve computer performance from a new perspective, and research into it is of great practical significance.
In the process, Huffman coding, which is lossless data compression coding invented by David a Huffman in 1952, is increasingly applied, and the coding process is as follows: reading a file, counting the occurrence frequency of each character, establishing a Huffman tree according to the occurrence frequency of each symbol, establishing a Huffman table for coding each character, and replacing each symbol of the file with the Huffman coding thereof for outputting.
However, in the huffman coding process, the huffman tree needs to be directly and iteratively constructed, the generation process is complicated, the data storage form of the binary tree is not beneficial to hardware implementation, the software implementation is difficult due to large calculation amount and storage waste, and the huffman coding limitation is large.
In view of the above, how to reduce the limitations of huffman coding is a problem that those skilled in the art need to solve.
Disclosure of Invention
The present application aims to provide a huffman coding method, which can solve the technical problem of how to reduce the limitations of huffman coding to a certain extent. The application also provides a Huffman coding system and equipment.
In order to achieve the above purpose, the present application provides the following technical solutions:
a huffman coding method comprising:
acquiring data to be encoded;
counting characters to be coded in the data to be coded and the occurrence frequency of the characters to be coded;
counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded;
taking the applied times of the character to be coded as the code length of the character to be coded;
determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to carry out Huffman coding on the data to be coded;
and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
Preferably, the counting the number of times of application of the character to be coded in the process of performing huffman coding on the character to be coded includes:
initializing the applied times of the character to be coded;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies, reordering the occurrence frequencies of the characters to be coded, and updating the applied times of the characters to be coded corresponding to the occurrence frequencies selected in the current round;
judging whether the number of the frequency values of the characters to be coded is 1 or not, if not, returning to execute the step of selecting the minimum two frequency values from the frequency values of the characters to be coded for merging; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
Preferably, the selecting two occurrence frequencies with the smallest values from the occurrence frequencies of the characters to be coded to be combined to obtain the combined occurrence frequencies, re-ordering the occurrence frequencies of the characters to be coded, and updating the number of times of application of the characters to be coded corresponding to the occurrence frequency selected in the current round includes:
determining identification information of the character to be coded, wherein the type of the identification information is a number;
initializing the set first identification information and second identification information;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies;
analyzing the types of the two selected occurrence frequencies;
if the two selected occurrence frequencies are the original occurrence frequencies of the characters to be coded, calculating a sum value of identification information of the characters to be coded corresponding to the two selected occurrence frequencies, taking the sum value as the value of the first identification information and current identification information of the characters to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the first identification information that is applied to the characters to be coded;
if one of the two selected occurrence frequencies is the original occurrence frequency of the character to be coded and the other is the combined occurrence frequency, taking the sum of the original identification information of the character to be coded corresponding to the combined occurrence frequency as the value of the first identification information, taking the value of the first identification information as the current identification information of the character to be coded corresponding to the other selected occurrence frequency, taking the value of the first identification information as the value of the current identification information of the character to be coded corresponding to the combined occurrence frequency, and adding 1 to the number of times of application of the character to be coded, to which the first identification information is applied;
if the two selected occurrence frequencies are the combined occurrence frequencies, taking the occurrence frequency with the most application times as a first occurrence frequency, taking the other selected occurrence frequency as a second occurrence frequency, taking the sum of the original identification information of the character to be encoded corresponding to the first occurrence frequency as the first identification information, taking the current identification information of the character to be encoded corresponding to the second occurrence frequency as the second identification information, updating the current identification information of the character to be encoded, which is applied and has the current identification information less than or equal to the second identification information, into the first identification information, and adding 1 to the application times of the character to be encoded, which is applied and has the current identification information equal to the first identification information.
Preferably, in the process of selecting the occurrence frequency with the smallest two values from the occurrence frequencies of the characters to be coded and combining the two occurrence frequencies to obtain the combined occurrence frequency, reordering the occurrence frequencies of the characters to be coded, and updating the number of times of application of the characters to be coded corresponding to the occurrence frequency selected in the current round, the method includes:
and recording corresponding data according to the formats of the characters to be coded, the applied times of the characters to be coded, the current identification information of the characters to be coded, the first identification information and the second identification information.
Preferably, the value of the identification information of the character to be coded is greater than a preset value.
A huffman coding system comprising:
the first acquisition module is used for acquiring data to be encoded;
the first statistic module is used for counting characters to be coded in the data to be coded and the occurrence frequency of the characters to be coded;
the second counting module is used for counting the applied times of the character to be coded in the process of carrying out Huffman coding on the character to be coded;
the first processing module is used for taking the applied times of the characters to be coded as the code length of the characters to be coded;
the first determining module is used for determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to carry out Huffman coding on the data to be coded;
and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
Preferably, the second statistical module includes:
the first initialization submodule is used for initializing the applied times of the characters to be coded;
the first statistic submodule is used for selecting the occurrence frequency with the minimum value from the occurrence frequencies of the characters to be coded to be combined to obtain the combined occurrence frequency, reordering the occurrence frequencies of the characters to be coded, and updating the number of times of application of the characters to be coded corresponding to the occurrence frequency selected in the current round;
the first judging module is used for judging whether the number of the occurrence frequency values of the characters to be coded is 1 or not, and if the number of the occurrence frequency values of the characters to be coded is not 1, prompting the first statistic module to execute the step of selecting the occurrence frequency with the minimum two values from the occurrence frequencies of the characters to be coded for combination; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
Preferably, the first statistical submodule includes:
the first determining unit is used for determining the identification information of the character to be coded, and the type of the identification information is a number;
the first initialization unit is used for initializing the set first identification information and second identification information;
the first merging unit is used for selecting two appearance frequencies with the minimum values from the appearance frequencies of the characters to be coded and merging the two appearance frequencies to obtain the merged appearance frequencies;
the first analysis unit is used for analyzing the types of the two selected occurrence frequencies;
the first processing unit is used for calculating a sum value of the identification information of the character to be coded corresponding to the two selected occurrence frequencies if the two selected occurrence frequencies are the original occurrence frequencies of the character to be coded, taking the sum value as the value of the first identification information and the current identification information of the character to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the first identification information and the number of times that the character to be coded is applied;
a second processing unit, configured to, if one of the two selected occurrence frequencies is an original occurrence frequency of the character to be encoded and one of the two selected occurrence frequencies is a combined occurrence frequency, use a sum value of original identification information of the character to be encoded corresponding to the combined occurrence frequency as a value of the first identification information, use the value of the first identification information as current identification information of the character to be encoded corresponding to the other selected occurrence frequency, use the value of the first identification information as a value of the current identification information of the character to be encoded corresponding to the combined occurrence frequency, and add 1 to the current identification information equal to the number of times of application of the character to be encoded, to which the first identification information has been applied;
a third processing unit, configured to, if the two selected occurrence frequencies are the combined occurrence frequencies, use the occurrence frequency with the largest number of selected applied times as a first occurrence frequency, use the other selected occurrence frequency as a second occurrence frequency, use a sum of original identification information of the to-be-encoded character corresponding to the first occurrence frequency as the first identification information, use current identification information of the to-be-encoded character corresponding to the second occurrence frequency as the second identification information, update the current identification information of the to-be-encoded character, which has been applied and whose current identification information is less than or equal to the second identification information, as the first identification information, and add 1 to the number of applied times of the to-be-encoded character, which has been applied and whose current identification information is equal to the first identification information.
Preferably, the second statistical module includes:
the first recording unit is used for recording corresponding data according to the formats of the characters to be coded, the applied times of the characters to be coded, the current identification information of the characters to be coded, the first identification information and the second identification information.
A huffman coding device comprising:
a memory for storing a computer program;
a processor for implementing the steps of the huffman coding method as described above when executing the computer program.
The Huffman coding method provided by the application obtains data to be coded; counting characters to be coded in data to be coded and the occurrence frequency of the characters to be coded; counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded; using the applied times of the character to be coded as the code length of the character to be coded; determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to perform Huffman coding on the data to be coded; and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded. In the method, a binary tree does not need to be generated, and memory consumption caused by storing the binary tree is avoided; the application times of the characters to be coded are counted only in the process of carrying out Huffman coding on the characters to be coded, so that the application times of the characters to be coded are recorded only, the recorded content is simple and few, and software and hardware are convenient to realize; in addition, the Huffman coding value of the character to be coded can be determined only by taking the applied times of the character to be coded as the code length of the character to be coded and based on the occurrence frequency of the character to be coded and the code length of the character to be coded, so that the determination mode of the Huffman coding value is simple and convenient, the Huffman coding efficiency can be improved, and the limitation is low. The Huffman coding system and the Huffman coding equipment provided by the application also solve the corresponding technical problem.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a huffman coding method according to an embodiment of the present application;
fig. 2 is a schematic diagram of data to be encoded according to an embodiment of the present application;
FIG. 3 is a diagram of the addition result of data to be encoded;
FIG. 4 is a diagram of the result of a first operation to encode data;
FIG. 5 is a diagram of the second step operation result of data to be encoded;
FIG. 6 is a diagram of the result of the third step of encoding data;
FIG. 7 is a diagram of the fourth operation result of the data to be encoded;
FIG. 8 is a diagram of the result of the fifth operation to encode data;
fig. 9 is a schematic structural diagram of a huffman coding system according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a huffman coding device according to an embodiment of the present application;
fig. 11 is another schematic structural diagram of a huffman coding device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a flowchart of a huffman coding method according to an embodiment of the present disclosure.
The huffman coding method provided by the embodiment of the application can comprise the following steps:
step S101: and acquiring data to be encoded.
In practical application, the data to be encoded may be obtained first, and the type of the data to be encoded may be determined according to actual needs.
Step S102: and counting characters to be coded in the data to be coded and the occurrence frequency of the characters to be coded.
In practical application, in the huffman coding process, the occurrence frequency of each character in the data to be coded needs to be determined, so after the data to be coded is obtained, the characters to be coded in the data to be coded and the occurrence frequency of the characters to be coded need to be counted.
Step S103: counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded; and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
In practical application, because the binary tree occupies more memory and is not beneficial to software and hardware implementation, in the application, the binary tree is prohibited from being generated in the process of carrying out Huffman coding on characters to be coded; in addition, the applicant of the present application finds that, in the process of generating the binary tree, the more times the characters to be encoded are applied, the lower the position of the characters to be encoded in the binary tree, and the number of times the characters to be encoded are applied is equivalent to the code length of the characters to be encoded, so that the huffman code value of the characters to be encoded can be determined according to the number of times the characters to be encoded are applied, that is, the present application only needs to count the number of times the characters to be applied of the characters to be encoded, and accordingly, the present application only needs to record the number of times the characters to be encoded are applied.
Step S104: and taking the applied times of the characters to be coded as the code length of the characters to be coded.
Step S105: and determining the Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to perform Huffman coding on the data to be coded.
In practical application, after the number of times of application of the character to be encoded is obtained, the number of times of application of the character to be encoded can be used as the code length of the character to be encoded, and the huffman code value of the character to be encoded is determined based on the occurrence frequency of the character to be encoded and the code length of the character to be encoded, so as to perform huffman encoding on the data to be encoded.
It should be noted that, in the process of determining the huffman code value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to perform huffman coding on the data to be coded, the character to be coded may be sorted in the order of the occurrence frequency of the character to be coded from small to large, and then the huffman code value of each character to be coded may be determined according to the position and the code length of the sorted character to be coded. The process of performing huffman coding on data to be coded based on the huffman coding value of the character to be coded can refer to the prior art, and is not described herein again.
The Huffman coding method provided by the application obtains data to be coded; counting characters to be coded in data to be coded and the occurrence frequency of the characters to be coded; counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded; using the applied times of the character to be coded as the code length of the character to be coded; determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to perform Huffman coding on the data to be coded; and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded. In the method, a binary tree does not need to be generated, and memory consumption caused by storing the binary tree is avoided; the application times of the characters to be coded are counted only in the process of carrying out Huffman coding on the characters to be coded, so that the application times of the characters to be coded are recorded only, the recorded content is simple and few, and software and hardware are convenient to realize; in addition, the Huffman coding value of the character to be coded can be determined only by taking the applied times of the character to be coded as the code length of the character to be coded and based on the occurrence frequency of the character to be coded and the code length of the character to be coded, so that the determination mode of the Huffman coding value is simple and convenient, the Huffman coding efficiency can be improved, and the limitation is low.
In the huffman coding method provided in the embodiment of the present application, in the process of counting the number of times of application of the character to be coded in the process of performing huffman coding on the character to be coded, the huffman coding method may include:
initializing the applied times of the characters to be coded;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies, re-sequencing the occurrence frequencies of the characters to be coded, and updating the applied times of the characters to be coded corresponding to the occurrence frequencies selected in the current round;
judging whether the number of the frequency values of the characters to be coded is 1 or not, if not, returning to execute the step of selecting the minimum two frequency values from the frequency values of the characters to be coded for merging; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
It should be noted that, in the process of initializing the number of times of application of the character to be encoded, the number of times of application of the character to be encoded may be initialized to 0, so that the final number of times of application of the character to be encoded may be directly used as the code length of the character to be encoded subsequently.
In a huffman coding method provided in an embodiment of the present application, because the occurrence frequency of merging may occur, the huffman coding method belongs to indirect application of characters to be coded at this time, and it may be difficult to count the number of times of application of the characters to be coded, in order to facilitate determining the number of times of application of each character to be coded, other information may be introduced to cooperate with determining the number of times of application, that is, in the occurrence frequency of the characters to be coded, two occurrence frequencies with the smallest values are selected to be merged to obtain the merged occurrence frequency, the occurrence frequencies of the characters to be coded are sorted again, and in the process of updating the number of times of application of the characters to be coded corresponding to the occurrence frequency selected in the current round, the huffman coding method may:
determining identification information of characters to be coded, wherein the type of the identification information is a number;
initializing the set first identification information and second identification information;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies;
analyzing the types of the two selected occurrence frequencies;
if the two selected occurrence frequencies are the original occurrence frequencies of the characters to be coded, calculating the sum of the identification information of the characters to be coded corresponding to the two selected occurrence frequencies, taking the sum as the value of the first identification information and the current identification information of the characters to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the number of times that the characters to be coded are applied, wherein the characters to be coded are applied;
if one of the two selected occurrence frequencies is the original occurrence frequency of the character to be coded and the other is the combined occurrence frequency, taking the sum value of the original identification information of the character to be coded corresponding to the combined occurrence frequency as the value of the first identification information, taking the value of the first identification information as the current identification information of the character to be coded corresponding to the other selected occurrence frequency, taking the value of the first identification information as the value of the current identification information of the character to be coded corresponding to the combined occurrence frequency, and adding 1 to the number of times that the current identification information is equal to the applied number of the character to be coded of the first identification information which is applied;
if the two selected occurrence frequencies are the combined occurrence frequencies, the occurrence frequency with the most application times is taken as a first occurrence frequency, the other selected occurrence frequency is taken as a second occurrence frequency, the sum value of the original identification information of the character to be coded corresponding to the first occurrence frequency is taken as first identification information, the current identification information of the character to be coded corresponding to the second occurrence frequency is taken as second identification information, the current identification information of the character to be coded which is applied and is less than or equal to the second identification information is updated to be the first identification information, and the number of application times of the character to be coded which is applied and is equal to the first identification information is added by 1.
In a specific application scenario, in the occurrence frequencies of the characters to be encoded, two occurrence frequencies with the minimum values are selected and combined to obtain the combined occurrence frequencies, the occurrence frequencies of the characters to be encoded are sorted again, and in the process of updating the number of times of application of the characters to be encoded corresponding to the occurrence frequencies selected in the current round, corresponding data can be recorded according to the formats of the characters to be encoded, the number of times of application of the characters to be encoded, the current identification information of the characters to be encoded, the first identification information and the second identification information.
In a specific application scenario, in order to avoid equality between the value of the character to be encoded and the values of the first identification information and the second identification information, the value of the identification information of the character to be encoded may be set to be greater than a preset value, and the preset value may be larger.
To facilitate understanding of the huffman coding method provided in the present application, assuming that the data to be coded is the data shown in fig. 2, the process of coding according to the huffman coding method provided in the present application may be as follows:
the first step is as follows: counting characters to be coded and occurrence frequency in data to be coded, wherein the counting result is shown in figure 1;
FIG. 1 is a table showing the statistics of the characters to be coded and the frequency of occurrence
Character(s) a b c d e f
Number of occurrences 5 9 12 13 16 45
The second step is that: adding identification information to the character to be coded, wherein the adding result can be as shown in fig. 3, wherein Frequency represents the occurrence Frequency, Symbol represents the character to be coded, and Name represents the identification information of the character to be coded;
thirdly, merging two nodes (leaf nodes) with the minimum probability, namely, s and b are merged, and after merging, a Node with a value of 14 is obtained, wherein the merging result is shown in fig. 4, wherein M represents an output set, a first line in the output set represents the applied characters to be coded, a second line represents the applied times of the characters to be coded, and a third line represents the current identification information of the characters to be coded; the UpdateName represents first identification information, and the Rename represents second identification information; in the third step, two original characters to be coded are selected, so that the value of the first identification information is the sum of the identification information of a and b, the current identification information of a and b needs to be updated to the value of the first identification information, and the number of times of application of a and b needs to be increased by 1;
fourthly, merging two nodes with the minimum occurrence frequency at present, namely c and d are merged, and after merging, a Node with a value of 25 is obtained, wherein the merging result is shown in fig. 5; in the fourth step, two original characters to be coded are selected, so that the value of the first identification information is the sum of the identification information of c and d, the current identification information of c and d needs to be updated to the value of the first identification information, and the number of times of application of c and d needs to be increased by 1;
fifthly, merging the two nodes with the minimum frequency of occurrence at present, namely merging the Node 14 needing merging a and b with the Symbol Node e, and obtaining the Node with the value of 30 after merging, wherein the merging result is shown in fig. 6; in the fifth step, the occurrence frequency of an original character to be coded and the occurrence frequency after combination are selected, so that the value of the first identification information needs to be the sum of the original identification information a and the original identification information b, the current identification information e needs to be updated to the value of the first identification information, the values of the current identification information a and the current identification information b need to be updated to the value of the first identification information, and the number of times that the current identification information is equal to the number of times that the character to be coded is applied to the first identification information needs to be added by 1, that is, the number of times that the character a, the character b and the character e are applied needs to be added by 1;
sixthly, merging two nodes with the minimum occurrence frequency at present, namely merging the Node 30 needing merging the a, b and e with the Node 25 needing merging the c and d, and obtaining the Node with the value of 55 after merging, wherein the merging result is shown in figure 7; in the sixth step, two combined occurrence frequencies are selected, so that the value of the first identification information needs to be the sum of the original identification information of a, b, c, d and e, the current identification information of c and d needs to be updated to the value of the second identification information, the current identification information of the character to be encoded, of which the current identification information is equal to the second identification information, needs to be updated to the second identification information, and finally the number of times of application of the character to be encoded, of which the current identification information is equal to the first identification information, is added by 1, that is, the number of times of application of a, b, c, d and e needs to be added by 1;
seventhly, combining the last two nodes, namely Symbol Node f with the value of 45 and the Node with the value of 55 represented by [ (a + b) + e ] + (c + d), to obtain the Node with the final value of 100 after combination, wherein the combination result is shown in fig. 8; in the seventh step, the occurrence frequency of the original character to be encoded and the occurrence frequency after merging are selected, so that the value of the first identification information needs to be the sum of the original identification information of a, b, e, c and d, the current identification information of a, b, e, c, d, e and f needs to be updated to the value of the first identification information, the number of times of application of the character to be encoded, which is applied to the current identification information, needs to be added by 1, that is, the number of times of application of a, b, c, d, e and f needs to be added by 1; thus, the number of times each character to be encoded is applied can be determined.
It should be noted that the binary tree is introduced in the process only for convenience of describing the process of huffman coding, and in the actual operation process, the binary tree does not need to be generated.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a huffman coding system according to an embodiment of the present disclosure.
The huffman coding system provided by the embodiment of the application may include:
a first obtaining module 101, configured to obtain data to be encoded;
the first statistic module 102 is configured to count characters to be encoded in data to be encoded and occurrence frequencies of the characters to be encoded;
the second counting module 103 is used for counting the applied times of the character to be coded in the process of performing Huffman coding on the character to be coded;
the first processing module 104 is configured to use the applied times of the character to be encoded as a code length of the character to be encoded;
the first determining module 105 is configured to determine a huffman coding value of a character to be coded based on an occurrence frequency of the character to be coded and a code length of the character to be coded, so as to perform huffman coding on the data to be coded;
and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
In an embodiment of the present invention, a second statistic module may include:
the first initialization submodule is used for initializing the applied times of the characters to be coded;
the first statistic submodule is used for selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded to be combined to obtain the combined occurrence frequencies, reordering the occurrence frequencies of the characters to be coded, and updating the applied times of the characters to be coded corresponding to the occurrence frequencies selected in the current round;
the first judgment module is used for judging whether the number of the frequency values of the characters to be coded is 1 or not, and if the number of the frequency values of the characters to be coded is not 1, prompting the first statistic sub-module to execute the step of selecting the minimum frequency of the two frequencies to be coded from the frequency values of the characters to be coded for combination; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
In an embodiment of the huffman coding system, the first statistic sub-module may include:
the first determining unit is used for determining the identification information of the character to be coded, and the type of the identification information is a number;
the first initialization unit is used for initializing the set first identification information and second identification information;
the first merging unit is used for selecting two appearance frequencies with the minimum values from the appearance frequencies of the characters to be coded and merging the two appearance frequencies to obtain the merged appearance frequencies;
the first analysis unit is used for analyzing the types of the two selected occurrence frequencies;
the first processing unit is used for calculating the sum value of the identification information of the character to be coded corresponding to the two selected occurrence frequencies if the two selected occurrence frequencies are the original occurrence frequencies of the character to be coded, taking the sum value as the value of the first identification information and the current identification information of the character to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the number of times that the character to be coded is applied, wherein the number of times that the character to be coded is applied is the first identification information;
a second processing unit, configured to, if one of the two selected occurrence frequencies is an original occurrence frequency of the character to be encoded and one of the two selected occurrence frequencies is a combined occurrence frequency, use a sum value of original identification information of the character to be encoded corresponding to the combined occurrence frequency as a value of first identification information, use the value of the first identification information as current identification information of the character to be encoded corresponding to the other selected occurrence frequency, use the value of the first identification information as a value of current identification information of the character to be encoded corresponding to the combined occurrence frequency, and add 1 to an application number of times of the character to be encoded, to which the current identification information is equal to the first identification information, which has been applied;
and the third processing unit is used for taking the appearance frequency with the most selected applied times as the first appearance frequency and the other selected appearance frequency as the second appearance frequency if the two selected appearance frequencies are the combined appearance frequencies, taking the sum of the original identification information of the character to be coded corresponding to the first appearance frequency as the first identification information, taking the current identification information of the character to be coded corresponding to the second appearance frequency as the second identification information, updating the current identification information of the character to be coded, which is applied and of which the current identification information is less than or equal to the second identification information, into the first identification information, and adding 1 to the applied times of the character to be coded, which is applied and of which the current identification information is equal to the first identification information.
In an embodiment of the present invention, a second statistic module may include:
the first recording unit is used for recording corresponding data according to the formats of the characters to be coded, the applied times of the characters to be coded, the current identification information of the characters to be coded, the first identification information and the second identification information.
In the huffman coding system provided by the embodiment of the application, the value of the identification information of the character to be coded is larger than the preset value.
The application also provides Huffman coding equipment and a computer readable storage medium, which have the corresponding effects of the Huffman coding method provided by the embodiment of the application. Referring to fig. 10, fig. 10 is a schematic structural diagram of a huffman coding apparatus according to an embodiment of the present disclosure.
The huffman coding device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program:
acquiring data to be encoded;
counting characters to be coded in data to be coded and the occurrence frequency of the characters to be coded;
counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded;
using the applied times of the character to be coded as the code length of the character to be coded;
determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to perform Huffman coding on the data to be coded;
and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
The huffman coding device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: initializing the applied times of the characters to be coded; selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies, re-sequencing the occurrence frequencies of the characters to be coded, and updating the applied times of the characters to be coded corresponding to the occurrence frequencies selected in the current round; judging whether the number of the frequency values of the characters to be coded is 1 or not, if not, returning to execute the step of selecting the minimum two frequency values from the frequency values of the characters to be coded for merging; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
The huffman coding device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: determining identification information of characters to be coded, wherein the type of the identification information is a number;
initializing the set first identification information and second identification information;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies;
analyzing the types of the two selected occurrence frequencies;
if the two selected occurrence frequencies are the original occurrence frequencies of the characters to be coded, calculating the sum of the identification information of the characters to be coded corresponding to the two selected occurrence frequencies, taking the sum as the value of the first identification information and the current identification information of the characters to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the number of times that the characters to be coded are applied, wherein the characters to be coded are applied;
if one of the two selected occurrence frequencies is the original occurrence frequency of the character to be coded and the other is the combined occurrence frequency, taking the sum value of the original identification information of the character to be coded corresponding to the combined occurrence frequency as the value of the first identification information, taking the value of the first identification information as the current identification information of the character to be coded corresponding to the other selected occurrence frequency, taking the value of the first identification information as the value of the current identification information of the character to be coded corresponding to the combined occurrence frequency, and adding 1 to the number of times that the current identification information is equal to the applied number of the character to be coded of the first identification information which is applied;
if the two selected occurrence frequencies are the combined occurrence frequencies, the occurrence frequency with the most application times is taken as a first occurrence frequency, the other selected occurrence frequency is taken as a second occurrence frequency, the sum value of the original identification information of the character to be coded corresponding to the first occurrence frequency is taken as first identification information, the current identification information of the character to be coded corresponding to the second occurrence frequency is taken as second identification information, the current identification information of the character to be coded which is applied and is less than or equal to the second identification information is updated to be the first identification information, and the number of application times of the character to be coded which is applied and is equal to the first identification information is added by 1.
The huffman coding device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: and recording corresponding data according to the formats of the characters to be coded, the applied times of the characters to be coded, the current identification information of the characters to be coded, the first identification information and the second identification information.
The huffman coding device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 realizes the following steps when executing the computer program: the value of the identification information of the character to be coded is larger than a preset value.
Referring to fig. 11, another huffman coding device provided in the embodiment of the present application may further include: an input port 203 connected to the processor 202, for transmitting externally input commands to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing result of the processor 202 to the outside; and the communication module 205 is connected with the processor 202 and is used for realizing the communication between the Huffman coding device and the outside world. The display unit 204 may be a display panel, a laser scanning display, or the like; the communication method adopted by the communication module 205 includes, but is not limited to, mobile high definition link technology (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), and wireless connection: wireless fidelity technology (WiFi), bluetooth communication technology, bluetooth low energy communication technology, ieee802.11s based communication technology.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:
acquiring data to be encoded;
counting characters to be coded in data to be coded and the occurrence frequency of the characters to be coded;
counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded;
using the applied times of the character to be coded as the code length of the character to be coded;
determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to perform Huffman coding on the data to be coded;
and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: initializing the applied times of the characters to be coded; selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies, re-sequencing the occurrence frequencies of the characters to be coded, and updating the applied times of the characters to be coded corresponding to the occurrence frequencies selected in the current round; judging whether the number of the frequency values of the characters to be coded is 1 or not, if not, returning to execute the step of selecting the minimum two frequency values from the frequency values of the characters to be coded for merging; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: determining identification information of characters to be coded, wherein the type of the identification information is a number;
initializing the set first identification information and second identification information;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies;
analyzing the types of the two selected occurrence frequencies;
if the two selected occurrence frequencies are the original occurrence frequencies of the characters to be coded, calculating the sum of the identification information of the characters to be coded corresponding to the two selected occurrence frequencies, taking the sum as the value of the first identification information and the current identification information of the characters to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the number of times that the characters to be coded are applied, wherein the characters to be coded are applied;
if one of the two selected occurrence frequencies is the original occurrence frequency of the character to be coded and the other is the combined occurrence frequency, taking the sum value of the original identification information of the character to be coded corresponding to the combined occurrence frequency as the value of the first identification information, taking the value of the first identification information as the current identification information of the character to be coded corresponding to the other selected occurrence frequency, taking the value of the first identification information as the value of the current identification information of the character to be coded corresponding to the combined occurrence frequency, and adding 1 to the number of times that the current identification information is equal to the applied number of the character to be coded of the first identification information which is applied;
if the two selected occurrence frequencies are the combined occurrence frequencies, the occurrence frequency with the most application times is taken as a first occurrence frequency, the other selected occurrence frequency is taken as a second occurrence frequency, the sum value of the original identification information of the character to be coded corresponding to the first occurrence frequency is taken as first identification information, the current identification information of the character to be coded corresponding to the second occurrence frequency is taken as second identification information, the current identification information of the character to be coded which is applied and is less than or equal to the second identification information is updated to be the first identification information, and the number of application times of the character to be coded which is applied and is equal to the first identification information is added by 1.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: and recording corresponding data according to the formats of the characters to be coded, the applied times of the characters to be coded, the current identification information of the characters to be coded, the first identification information and the second identification information.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps: the value of the identification information of the character to be coded is larger than a preset value.
The computer-readable storage media to which this application relates include Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage media known in the art.
For a description of relevant parts in the huffman coding system, the huffman coding device and the computer readable storage medium provided in the embodiments of the present application, reference is made to the detailed description of corresponding parts in the huffman coding method provided in the embodiments of the present application, and details are not repeated herein. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A huffman coding method, comprising:
acquiring data to be encoded;
counting characters to be coded in the data to be coded and the occurrence frequency of the characters to be coded;
counting the number of times of the characters to be coded which are applied in the process of carrying out Huffman coding on the characters to be coded;
taking the applied times of the character to be coded as the code length of the character to be coded;
determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to carry out Huffman coding on the data to be coded;
and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
2. The method according to claim 1, wherein the counting the number of times the character to be coded is applied in the huffman coding of the character to be coded comprises:
initializing the applied times of the character to be coded;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies, reordering the occurrence frequencies of the characters to be coded, and updating the applied times of the characters to be coded corresponding to the occurrence frequencies selected in the current round;
judging whether the number of the frequency values of the characters to be coded is 1 or not, if not, returning to execute the step of selecting the minimum two frequency values from the frequency values of the characters to be coded for merging; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
3. The method according to claim 2, wherein the selecting two occurrence frequencies with the smallest values from the occurrence frequencies of the characters to be encoded to be combined to obtain the combined occurrence frequencies, reordering the occurrence frequencies of the characters to be encoded, and updating the number of times of application of the characters to be encoded corresponding to the occurrence frequencies selected in the current round, comprises:
determining identification information of the character to be coded, wherein the type of the identification information is a number;
initializing the set first identification information and second identification information;
selecting two occurrence frequencies with the minimum values from the occurrence frequencies of the characters to be coded for combination to obtain the combined occurrence frequencies;
analyzing the types of the two selected occurrence frequencies;
if the two selected occurrence frequencies are the original occurrence frequencies of the characters to be coded, calculating a sum value of identification information of the characters to be coded corresponding to the two selected occurrence frequencies, taking the sum value as the value of the first identification information and current identification information of the characters to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the first identification information that is applied to the characters to be coded;
if one of the two selected occurrence frequencies is the original occurrence frequency of the character to be coded and the other is the combined occurrence frequency, taking the sum of the original identification information of the character to be coded corresponding to the combined occurrence frequency as the value of the first identification information, taking the value of the first identification information as the current identification information of the character to be coded corresponding to the other selected occurrence frequency, taking the value of the first identification information as the value of the current identification information of the character to be coded corresponding to the combined occurrence frequency, and adding 1 to the number of times of application of the character to be coded, to which the first identification information is applied;
if the two selected occurrence frequencies are the combined occurrence frequencies, taking the occurrence frequency with the most application times as a first occurrence frequency, taking the other selected occurrence frequency as a second occurrence frequency, taking the sum of the original identification information of the character to be encoded corresponding to the first occurrence frequency as the first identification information, taking the current identification information of the character to be encoded corresponding to the second occurrence frequency as the second identification information, updating the current identification information of the character to be encoded, which is applied and has the current identification information less than or equal to the second identification information, into the first identification information, and adding 1 to the application times of the character to be encoded, which is applied and has the current identification information equal to the first identification information.
4. The method according to claim 3, wherein the process of selecting two occurrence frequencies with the smallest values from the occurrence frequencies of the characters to be encoded to combine the two occurrence frequencies to obtain the combined occurrence frequencies, reordering the occurrence frequencies of the characters to be encoded, and updating the number of times of application of the characters to be encoded corresponding to the occurrence frequencies selected in the current round includes:
and recording corresponding data according to the formats of the characters to be coded, the applied times of the characters to be coded, the current identification information of the characters to be coded, the first identification information and the second identification information.
5. The method according to claim 3, wherein the value of the identification information of the character to be encoded is greater than a preset value.
6. A huffman coding system, comprising:
the first acquisition module is used for acquiring data to be encoded;
the first statistic module is used for counting characters to be coded in the data to be coded and the occurrence frequency of the characters to be coded;
the second counting module is used for counting the applied times of the character to be coded in the process of carrying out Huffman coding on the character to be coded;
the first processing module is used for taking the applied times of the characters to be coded as the code length of the characters to be coded;
the first determining module is used for determining a Huffman coding value of the character to be coded based on the occurrence frequency of the character to be coded and the code length of the character to be coded so as to carry out Huffman coding on the data to be coded;
and forbidding generating the binary tree in the process of carrying out Huffman coding on the character to be coded.
7. The system of claim 6, wherein the second statistics module comprises:
the first initialization submodule is used for initializing the applied times of the characters to be coded;
the first statistic submodule is used for selecting the occurrence frequency with the minimum value from the occurrence frequencies of the characters to be coded to be combined to obtain the combined occurrence frequency, reordering the occurrence frequencies of the characters to be coded, and updating the number of times of application of the characters to be coded corresponding to the occurrence frequency selected in the current round;
the first judging module is used for judging whether the number of the occurrence frequency values of the characters to be coded is 1 or not, and if the number of the occurrence frequency values of the characters to be coded is not 1, prompting the first statistic module to execute the step of selecting the occurrence frequency with the minimum two values from the occurrence frequencies of the characters to be coded for combination; and if the number of the occurrence frequency values of the characters to be coded is 1, outputting the applied times of the characters to be coded.
8. The system of claim 7, wherein the first statistics module comprises:
the first determining unit is used for determining the identification information of the character to be coded, and the type of the identification information is a number;
the first initialization unit is used for initializing the set first identification information and second identification information;
the first merging unit is used for selecting two appearance frequencies with the minimum values from the appearance frequencies of the characters to be coded and merging the two appearance frequencies to obtain the merged appearance frequencies;
the first analysis unit is used for analyzing the types of the two selected occurrence frequencies;
the first processing unit is used for calculating a sum value of the identification information of the character to be coded corresponding to the two selected occurrence frequencies if the two selected occurrence frequencies are the original occurrence frequencies of the character to be coded, taking the sum value as the value of the first identification information and the current identification information of the character to be coded corresponding to the two selected occurrence frequencies, and adding 1 to the number of times that the current identification information is equal to the first identification information and the number of times that the character to be coded is applied;
a second processing unit, configured to, if one of the two selected occurrence frequencies is an original occurrence frequency of the character to be encoded and one of the two selected occurrence frequencies is a combined occurrence frequency, use a sum value of original identification information of the character to be encoded corresponding to the combined occurrence frequency as a value of the first identification information, use the value of the first identification information as current identification information of the character to be encoded corresponding to the other selected occurrence frequency, use the value of the first identification information as a value of the current identification information of the character to be encoded corresponding to the combined occurrence frequency, and add 1 to the current identification information equal to the number of times of application of the character to be encoded, to which the first identification information has been applied;
a third processing unit, configured to, if the two selected occurrence frequencies are the combined occurrence frequencies, use the occurrence frequency with the largest number of selected applied times as a first occurrence frequency, use the other selected occurrence frequency as a second occurrence frequency, use a sum of original identification information of the to-be-encoded character corresponding to the first occurrence frequency as the first identification information, use current identification information of the to-be-encoded character corresponding to the second occurrence frequency as the second identification information, update the current identification information of the to-be-encoded character, which has been applied and whose current identification information is less than or equal to the second identification information, as the first identification information, and add 1 to the number of applied times of the to-be-encoded character, which has been applied and whose current identification information is equal to the first identification information.
9. The system of claim 8, wherein the second statistics module comprises:
the first recording unit is used for recording corresponding data according to the formats of the characters to be coded, the applied times of the characters to be coded, the current identification information of the characters to be coded, the first identification information and the second identification information.
10. A huffman coding device, characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the huffman coding method according to any of the claims 1 to 5 when executing said computer program.
CN202010820245.4A 2020-08-14 2020-08-14 Huffman coding method, system and equipment Withdrawn CN112003625A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010820245.4A CN112003625A (en) 2020-08-14 2020-08-14 Huffman coding method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010820245.4A CN112003625A (en) 2020-08-14 2020-08-14 Huffman coding method, system and equipment

Publications (1)

Publication Number Publication Date
CN112003625A true CN112003625A (en) 2020-11-27

Family

ID=73473237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010820245.4A Withdrawn CN112003625A (en) 2020-08-14 2020-08-14 Huffman coding method, system and equipment

Country Status (1)

Country Link
CN (1) CN112003625A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995199A (en) * 2021-03-29 2021-06-18 北京沃东天骏信息技术有限公司 Data encoding and decoding method, device, transmission system, terminal equipment and storage medium
CN113746487A (en) * 2021-08-25 2021-12-03 山东云海国创云计算装备产业创新中心有限公司 Data compression method and device, electronic equipment and storage medium
WO2022148304A1 (en) * 2021-01-07 2022-07-14 苏州浪潮智能科技有限公司 Sorting network-based dynamic huffman coding method, apparatus and device
CN114779720A (en) * 2022-03-27 2022-07-22 江苏贵钰航空工业有限公司 Numerical control machine tool set intelligent control system based on big data
CN115085924A (en) * 2022-08-22 2022-09-20 锐创软件技术(启东)有限公司 Computer information transmission encryption system based on Huffman coding
CN116505954A (en) * 2023-06-28 2023-07-28 深圳大普微电子科技有限公司 Huffman coding method, system, device and medium
CN116738471A (en) * 2023-08-10 2023-09-12 陕西昕晟链云信息科技有限公司 Block chain-based decentralization data analysis method
CN116821967A (en) * 2023-08-30 2023-09-29 山东远联信息科技有限公司 Intersection computing method and system for privacy protection

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623524A (en) * 2017-07-01 2018-01-23 中山大学 A kind of hardware based Huffman coding methods and system
CN109889205A (en) * 2019-04-03 2019-06-14 杭州嘉楠耘智信息科技有限公司 Encoding method and system, decoding method and system, and encoding and decoding method and system
CN110868223A (en) * 2019-12-06 2020-03-06 广东海洋大学 Method and circuit for realizing numerical operation of Huffman coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623524A (en) * 2017-07-01 2018-01-23 中山大学 A kind of hardware based Huffman coding methods and system
CN109889205A (en) * 2019-04-03 2019-06-14 杭州嘉楠耘智信息科技有限公司 Encoding method and system, decoding method and system, and encoding and decoding method and system
CN110868223A (en) * 2019-12-06 2020-03-06 广东海洋大学 Method and circuit for realizing numerical operation of Huffman coding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
M. A. S. HERNANDEZ, O. ALVARADO-NAVA, E. RODRIGUEZ-MARTINEZ等: "Tree-less Huffman coding algorithm for embedded systems", 《2013 INTERNATIONAL CONFERENCE ON RECONFIGURABLE COMPUTING AND FPGAS (RECONFIG)》 *
杨泽凡: "不依赖树结构的规范哈夫曼码压缩算法", 《现代计算机(专业版)》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022148304A1 (en) * 2021-01-07 2022-07-14 苏州浪潮智能科技有限公司 Sorting network-based dynamic huffman coding method, apparatus and device
US11923875B2 (en) 2021-01-07 2024-03-05 Inspur Suzhou Intelligent Technology Co., Ltd. Sorting network-based dynamic Huffman encoding method, apparatus and device
CN112995199B (en) * 2021-03-29 2023-03-10 北京沃东天骏信息技术有限公司 Data encoding and decoding method, device, transmission system, terminal equipment and storage medium
CN112995199A (en) * 2021-03-29 2021-06-18 北京沃东天骏信息技术有限公司 Data encoding and decoding method, device, transmission system, terminal equipment and storage medium
CN113746487A (en) * 2021-08-25 2021-12-03 山东云海国创云计算装备产业创新中心有限公司 Data compression method and device, electronic equipment and storage medium
CN113746487B (en) * 2021-08-25 2023-11-03 山东云海国创云计算装备产业创新中心有限公司 Data compression method and device, electronic equipment and storage medium
CN114779720A (en) * 2022-03-27 2022-07-22 江苏贵钰航空工业有限公司 Numerical control machine tool set intelligent control system based on big data
CN115085924B (en) * 2022-08-22 2022-12-27 锐创软件技术(启东)有限公司 Computer information transmission encryption system based on Huffman coding
CN115085924A (en) * 2022-08-22 2022-09-20 锐创软件技术(启东)有限公司 Computer information transmission encryption system based on Huffman coding
CN116505954A (en) * 2023-06-28 2023-07-28 深圳大普微电子科技有限公司 Huffman coding method, system, device and medium
CN116505954B (en) * 2023-06-28 2024-01-23 深圳大普微电子科技有限公司 Huffman coding method, system, device and medium
CN116738471A (en) * 2023-08-10 2023-09-12 陕西昕晟链云信息科技有限公司 Block chain-based decentralization data analysis method
CN116738471B (en) * 2023-08-10 2023-10-20 陕西昕晟链云信息科技有限公司 Block chain-based decentralization data analysis method
CN116821967A (en) * 2023-08-30 2023-09-29 山东远联信息科技有限公司 Intersection computing method and system for privacy protection
CN116821967B (en) * 2023-08-30 2023-11-21 山东远联信息科技有限公司 Intersection computing method and system for privacy protection

Similar Documents

Publication Publication Date Title
CN112003625A (en) Huffman coding method, system and equipment
US8265407B2 (en) Method for coding and decoding 3D data implemented as a mesh model
CN116506073A (en) Industrial computer platform data rapid transmission method and system
CN108628898B (en) Method, device and equipment for data storage
CN104579360B (en) A kind of method and apparatus of data processing
CN108053034B (en) Model parameter processing method and device, electronic equipment and storage medium
CN104468044A (en) Data compression method and device applied to network transmission
CN115567589B (en) Compression transmission method, device and equipment of JSON data and storage medium
CN106886568A (en) One kind point table method, device and electronic equipment
CN112884120A (en) Graph neural network representation architecture
CN111211787A (en) Industrial data compression method, system, storage medium and terminal
JP6835285B1 (en) Data compression method, data compression device, data compression program, data decompression method, data decompression device and data decompression program
CN108255411A (en) A kind of data compression method and device and uncompressing data and device
CN113852443A (en) Low-complexity multi-user detection method in SCMA (sparse code multiple Access) system
US20200242467A1 (en) Calculation method and calculation device for sparse neural network, electronic device, computer readable storage medium, and computer program product
CN112332854A (en) Hardware implementation method and device of Huffman coding and storage medium
CN111767280A (en) Data processing method, device and storage medium
CN104636377A (en) Data compression method and equipment
CN107436848B (en) Method and device for realizing conversion between user data and compressed data
CN114791904A (en) Persistent compression method and device for bloom filter
CN112886967A (en) Data compression coding processing method and device
CN112101548A (en) Data compression method and device, data decompression method and device, and electronic device
CN113315793A (en) Data transmission method, device, equipment and medium based on intelligent compression
CN108989813A (en) A kind of high efficiency of compression/decompression method, computer installation and storage medium
CN113704465B (en) Text clustering method and device, electronic equipment and storage medium

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20201127

WW01 Invention patent application withdrawn after publication