Data compression method based on LZW coding
By preprocessing and frequency updating the sensor data, the problem of too long compression dictionary and low coding efficiency in LZW encoding is solved, and more efficient data compression is achieved.
Patent Information
- Application Number
- CN202411320190.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-09-23
AI Technical Summary
In LZW encoding, in sensor data compression, most strings in the compression dictionary do not appear, occupying space, and larger serial numbers are used during encoding, resulting in limited compression efficiency.
By preprocessing sensor data, an initial compression dictionary is constructed, and the dictionary is updated according to character frequency and predicted repetition rate during the compression process to ensure that the dictionary length is within the upper limit of the length and reduce the serial number size of the encoding object.
The compression efficiency is improved, ensuring that the number of bits in the encoding result is as small as possible, and improving the efficiency of data transmission.
Smart Images

Figure CN118842474A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data coding and compression, and in particular to a data compression method based on LZW coding. Background Art
[0002] With the development of the Internet of Things (IoT), sensors are increasingly being used. The data collected by these sensors needs to be transmitted to a data processing platform through the IoT for analysis. The amount of data collected by sensors is enormous, and to ensure efficient transmission, sensor data needs to be compressed.
[0003] LZW encoding works by continuously adding the shortest strings that appear for the first time in sensor data to a compression dictionary. When a string reappears, it is compressed using the corresponding string's sequence number in the compression dictionary. However, most strings in the LZW encoding compression dictionary may not reappear later. These strings occupy a large portion of the compression dictionary space, causing reappearing strings to be assigned larger sequence numbers in the compression dictionary. Larger sequence numbers correspond to longer binary data, which in turn increases the compressed length of the sensor data. Therefore, LZW encoding has limited compression efficiency. Summary of the Invention
[0004] In order to solve the above problems, the present invention provides a data compression method based on LZW coding.
[0005] The data compression method based on LZW coding of the present invention adopts the following technical solution: An embodiment of the present invention provides a data compression method based on LZW encoding, the method comprising the following steps: Collect sensor data, pre-process the sensor data, and obtain a sequence to be encoded; construct an initial compression dictionary based on each character in the sequence to be encoded; and obtain an upper limit on the length based on the length of the initial compression dictionary; The frequency of occurrence of each character in the sequence to be encoded is taken as the overall frequency of each character; an empty sequence is constructed as the encoded sequence; Compress the coded sequence, including: S1: Match the sequence to be encoded according to the compression dictionary, obtain the encoding object and the encoding result of the encoding object; update the encoded sequence according to the encoding object; S2: When the length of the compression dictionary is greater than or equal to the upper limit, obtain the unencoded frequency of each character based on the encoded sequence and the overall frequency of each character; calculate the predicted repetition rate of each character string in the compression dictionary based on the unencoded frequency of each character contained in each character string in the compression dictionary; and update the compression dictionary based on the predicted repetition rate of each character string in the compression dictionary; S3: Construct a character string from the encoding object and the next character of the encoding object in the sequence to be encoded as the first character string, and add the first character string to the end of the compression dictionary; S4: Repeat S1 to S3 until every character in the sequence to be encoded has been matched and then stop the iteration; obtain compressed data according to the encoding result of each encoding object; Transmit, decompress and analyze compressed data.
[0006] Preferably, the preprocessing of the sensor data to obtain the sequence to be encoded includes the following specific steps: The sensor data is converted into binary data, the binary data is encoded into characters, and the sequence consisting of all the characters obtained in order is used as the sequence to be encoded.
[0007] Preferably, the step of constructing an initial compression dictionary based on each character in the sequence to be encoded includes the following specific steps: Count each character that appears in the sequence to be encoded, build an empty dictionary, add each character to the dictionary, and use the dictionary as the initial compression dictionary.
[0008] Preferably, the obtaining of the length upper limit according to the length of the initial compression dictionary includes the following specific steps: Set the expansion multiple and use the product of the expansion multiple and the initial compression dictionary length as the length upper limit.
[0009] Preferably, the matching of the sequence to be encoded according to the compression dictionary to obtain the encoding object and the encoding result of the encoding object includes the following specific steps: According to the compression dictionary, the longest match is performed on the sequence to be encoded starting from the first unmatched character in the sequence to be encoded, and the matching result is used as the encoding object; the sequence number of the encoding object in the compression dictionary is used as the encoding result of the encoding object.
[0010] Preferably, the updating of the encoded sequence according to the encoding object includes the following specific steps: Appends each character in the encoding object to the end of the encoded sequence.
[0011] Preferably, the step of obtaining the uncoded frequency of each character based on the coded sequence and the overall frequency of each character comprises the following specific steps: Obtain the number of times each character appears in the encoded sequence, divide the number by the length of the sequence to be encoded to obtain the encoded frequency of each character; subtract the encoded frequency from the overall frequency of each character to obtain the unencoded frequency of each character.
[0012] Preferably, the step of calculating the predicted repetition rate of each character string in the compression dictionary according to the uncoded frequency of each character contained in each character string in the compression dictionary comprises the following specific steps: Where, The first The predicted repetition rate of the string; The first The set of uncoded frequencies of each character contained in the string; is the minimum function; The first The sequence number of the string; The upper limit of the compression dictionary length; The compression dictionary is The number of strings that are substrings; is an exponential function with a natural constant as its base; is a hyperparameter.
[0013] Preferably, the updating of the compression dictionary according to the predicted repetition rate of each character string in the compression dictionary includes the following specific steps: Preset culling quantity , the predicted repetition rate is the smallest The character strings are removed from the compression dictionary, and the remaining characters and character strings in the compression dictionary are re-assigned serial numbers according to the serial numbers of their positions in the compression dictionary after the removal.
[0014] Preferably, the step of obtaining compressed data according to the encoding result of each encoding object includes the following specific steps: Get the maximum value of the encoding results of all encoding objects, recorded as ,Will As the first length, use Indicates that is the rounding symbol; convert the encoding result of each encoding object into a length of The binary number, the length of the encoding result of all the encoding objects is The binary numbers are spliced together in order as the compressed data of the sequence to be encoded.
[0015] The beneficial effects of the technical solution of the present invention are as follows: LZW encoding continuously adds all the shortest character strings that appear for the first time in the sequence to be encoded to the compression dictionary, making the length of the compression dictionary very long. Most of the character strings added to the compression dictionary may not appear again in the subsequent period. These character strings occupy most of the space in the compression dictionary, so that the reappearing character strings may correspond to larger sequence numbers in the compression dictionary. When encoding the reappearing character strings, it is necessary to use a larger sequence number for encoding, thereby making the length of the compressed data of the sequence to be encoded longer and the compression efficiency limited. The present invention preprocesses the sensor data, obtains the sequence to be encoded, constructs an initial compression dictionary, obtains the length upper limit according to the length of the initial compression dictionary, and obtains the length upper limit when compressing the sequence to be encoded. In the compression process, after each encoding of an encoding object is realized, the length of the compression dictionary is judged. If the length of the compression dictionary reaches the upper limit, the predicted repetition rate of each character string is obtained according to the overall frequency of the characters in all the character strings in the compression dictionary and the encoded frequency, and the compression dictionary is updated according to the predicted repetition rate, thereby ensuring that the character strings that may appear again in the future can be matched in the compression dictionary, and then the longer character strings in the encoding sequence can be encoded with smaller sequence numbers, thereby ensuring compression efficiency; the present invention continuously updates the compression dictionary to ensure that the length of the compression dictionary is within the upper limit of the length, so that the encoding result of the encoding object is as small as possible, thereby making the number of bits of the compressed data as small as possible, and making the compression efficiency as high as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 The figure is a flow chart of the steps of a data compression method based on LZW encoding of the present invention. DETAILED DESCRIPTION
[0018] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of a data compression method based on LZW encoding proposed by the present invention. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0019] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0020] The following describes in detail a specific scheme of a data compression method based on LZW encoding provided by the present invention with reference to the accompanying drawings.
[0021] See also Figure 1 , which shows a flowchart of a data compression method based on LZW encoding provided by an embodiment of the present invention, the method comprising the following steps: S001. Collect sensor data, pre-process the sensor data, and obtain the sequence to be encoded.
[0022] Use deployed sensors to collect sensor data, such as using temperature sensors to collect industrial environment temperature data and using heart rate sensors to collect patient heartbeat signal data.
[0023] It should be noted that since the accuracy of sensors is usually large, the collected sensor data has more decimal places, and thus the repetition rate of the sensor data is small. Existing compression algorithms such as Huffman coding, arithmetic coding, and LZW coding encode based on the repetition rate of the data, and have poor compression effect on sensor data with a small repetition rate. Therefore, the collected sensor data needs to be preprocessed to increase the repetition rate of the sensor data.
[0024] In an embodiment of the present invention, the collected sensor data is converted into binary data, the obtained binary data is converted into characters using base64 encoding, and all the obtained characters are sequentially formed into a sequence as a sequence to be encoded.
[0025] It should be noted that since base64 encoding only contains 64 different characters and the number of characters is limited, using base64 to convert the binary data corresponding to the sensor data into characters will result in a high repetition rate of characters in the resulting encoded sequence, which can improve compression efficiency.
[0026] At this point, the sequence to be encoded is obtained.
[0027] S002. Construct an initial compression dictionary and compress the sequence to be coded to obtain compressed data.
[0028] It should be noted that LZW encoding is a lossless compression algorithm that achieves good compression by continuously adding the shortest string for each first occurrence in the sequence to be encoded to a compression dictionary. When a string reappears, it is encoded using the corresponding string's sequence number in the compression dictionary. However, continuously adding the shortest string for each first occurrence in the sequence to be encoded to the compression dictionary makes the compression dictionary very long. Most of the strings added to the compression dictionary may not reappear later, and these strings occupy a large portion of the space in the compression dictionary. This means that recurring strings may be assigned larger sequence numbers in the compression dictionary, requiring the use of larger sequence numbers when encoding recurring strings. To ensure successful decoding, the encoding of each recurring string in the sequence to be encoded must be converted into a binary number of uniform length and stored as the compressed data for the sequence to be encoded. The length of the binary number depends on the maximum value among all the recurring string encodings. A larger maximum value among all the recurring string encodings results in a longer binary number, which in turn increases the length of the compressed data for the sequence to be encoded, limiting compression efficiency.
[0029] It should be further explained that in order to shorten the length of the compressed data finally obtained, the length of each binary number needs to be shortened. When the compression dictionary is small, the serial numbers of all the character strings contained in the compression dictionary are small, which can make the codes of the character strings in the sequence to be encoded smaller. Therefore, it is necessary to limit the size of the compression dictionary. The embodiment of the present invention limits the size of the compression dictionary. During the compression process of the sequence to be encoded, when the size of the compression dictionary reaches a certain level, the probability of reappearance of all the character strings contained in the compression dictionary is predicted. Some character strings are eliminated based on the predicted probability, making the compression dictionary smaller. Through continuous iteration, it can be ensured that the compression dictionary is small throughout the entire compression process of the sequence to be encoded, thereby making the codes of the characters in the sequence to be encoded smaller, the corresponding compressed data length of the sequence to be encoded is shorter, and the compression efficiency is higher.
[0030] In the embodiment of the present invention, each character appearing in the sequence to be encoded is counted, and the number of character types is recorded as . Build an empty dictionary, add each character to the dictionary, and use the dictionary as the initial compression dictionary. The serial number of each character is the serial number of the position where each character appears in the initial compression dictionary. At this time, the length of the initial compression dictionary is .
[0031] Preset an expansion multiple , the embodiment of the present invention is based on The expansion factor is multiplied by the length of the initial compression dictionary. As the upper limit of the compression dictionary length, it is recorded as .
[0032] The frequency of occurrence of each character in the sequence to be encoded is counted as the overall frequency of each character.
[0033] Construct an empty sequence, called the encoded sequence, to store the characters encoded in the encoding process of the sequence to be encoded. Compress the sequence to be encoded, specifically: 1. Perform the longest match on the sequence to be encoded, starting from the first unmatched character in the sequence to be encoded, according to the compression dictionary. The matching result is used as the encoding target. The sequence number of the character or string corresponding to the encoding target in the compression dictionary is used as the encoding result of the encoding target. Each character in the encoding target is sequentially added to the end of the encoded sequence.
[0034] 2. Determine the length of the compression dictionary. If the length of the compression dictionary is less than the upper limit, When the length of the compression dictionary reaches the upper limit, execute step 3; , obtain the number of times each character appears in the encoded sequence, divide the number by the length of the sequence to be encoded, and get the encoded frequency of each character. Subtract the encoded frequency from the overall frequency of each character to get the unencoded frequency of each character.
[0035] Calculate the predicted repetition rate for each string in the compression dictionary based on the unencoded frequency of each character contained in each string in the compression dictionary: Where, The first The predicted repetition rate of the string; The first The set of uncoded frequencies of each character contained in the string; is the minimum function, To get the collection The minimum value in The probability of a string appearing again depends on the The uncoded frequency of each character contained in the string, when the When the uncoded frequency of a character contained in a string is low, it means that the probability of the next character appearing in the sequence to be coded is low, then the string containing the character, that is, the first The probability of the string appearing next is also low. When the uncoded frequency of each character in the string is large, it means that the probability of each character appearing next in the sequence to be coded is high, then the string containing these characters is the first character. The probability of the string appearing next is also high. The predicted repetition rate of the character strings is high; The first The sequence number of the string; The upper limit of the length of the compression dictionary, used to Sequence number of the string Normalize; when The larger the sequence number of the string, the The string is the most recent string in the sequence to be encoded. Since the sequence to be encoded has local similarity, the next The higher the probability of a string repeating, the higher the probability of a string repeating. and , so that the obtained The predicted repetition rate of the character string is more accurate.
[0036] Where, The compression dictionary is The number of substrings of the string, such as the number of When the first character string is AB, and the rest of the characters in the compression dictionary are BC, ABD, ABC, DC, and ABDB, and AB is a substring of ABD, ABC, and ABDB, then the character string with the first character string in the compression dictionary is BC, ABD, ABC, DC, and ABDB. The number of strings that are substrings is 3; is an exponential function with a natural constant as its base; is a hyperparameter, and the embodiment of the present invention is based on As an example, there is no specific limitation. The implementation personnel can set it according to the specific implementation situation. The value of is the number of characters in the sequence to be encoded, and the hyperparameter is to prevent Larger, making The result is always close to 0; if the compression dictionary is If there are many substrings of the string, When the string appears again, the result of the longest match of the encoded sequence is more likely to be The string containing the first character string as a substring will not be The character strings are encoded separately, and the corresponding The necessity of the first character string in the compression dictionary is reduced. On the contrary, when the first character string in the compression dictionary The number of strings that are substrings of the first string is small. When the string appears again, the result of the longest match of the encoding sequence is more likely to be A string, in this case, needs to be compressed according to the The longest matching result is encoded by the serial number of the string, and the corresponding The necessity of the string in the compression dictionary is high, so As The penalty item is The more substrings there are, the better. The more severe the punishment, the The predicted repetition rate of the string is reduced. On the contrary, when the compression dictionary is The smaller the number of substrings, the better. The lighter the punishment, the The predicted repetition rate of a string depends more on value.
[0037] At this point, the predicted repetition rate of each string in the compression dictionary is obtained.
[0038] In the embodiment of the present invention, a rejection quantity is preset. , the embodiment of the present invention is based on For example, there is no specific limit. The implementer can set the number of eliminations according to the actual implementation situation. The character strings are removed from the compression dictionary, and the remaining characters and character strings in the compression dictionary are re-assigned serial numbers according to the serial numbers of their positions in the compression dictionary after the removal.
[0039] 3. The encoding object and the next character of the encoding object in the sequence to be encoded are combined into a string, and the string is added to the end of the compression dictionary. The sequence number of the string is the sequence number of the position where the string appears in the compression dictionary.
[0040] 4. Repeat steps 1-3 according to the updated compression dictionary until all characters in the sequence to be encoded have been matched. The maximum value of the encoding results of all encoding objects is obtained and recorded as ,Will As the first length, use Indicates that To round up the symbol, convert the encoding result of each encoding object into a length of The binary number, the length of the encoding result of all the encoding objects is The binary numbers are spliced together in order as the compressed data of the sequence to be encoded.
[0041] At this point, the compression of the sequence to be encoded is achieved, and the compressed data of the sequence to be encoded is obtained.
[0042] S003. Transmit, decompress and analyze compressed data.
[0043] The compressed data, the initial compression dictionary, the first length , the length of the sequence to be encoded, and the overall frequency of each character are uniformly transmitted to the data processing platform.
[0044] The data processing platform decompresses the compressed data, specifically: Construct an empty sequence, called the decoded sequence, to store the characters decoded during the decompression process of the compressed data. Split the compressed data into multiple binary numbers of length L, convert each binary number to decimal, and use the sequence of all the decimal numbers obtained in order as the encoding result sequence.
[0045] Decompress each encoding result in the encoding result sequence in turn, specifically: For the current encoding result, obtain the character or string corresponding to the current encoding result in the compression dictionary as the encoding object of the current encoding result. Each character in the encoding object is added to the end of the decoded sequence in sequence.
[0046] Determine the length of the compression dictionary: When the length of the compression dictionary is less than the upper limit If the next encoding result exists in the compression dictionary, the character corresponding to the next encoding result in the compression dictionary or the first character in the string is obtained as the last character. If the next encoding result does not exist in the compression dictionary, the first character in the encoding object of the current encoding result is used as the last character. The last character is concatenated after the encoding object of the current encoding result to obtain a string, which is added to the end of the compression dictionary.
[0047] When the length of the compression dictionary is greater than or equal to the upper limit , obtain the number of times each character appears in the decoded sequence, divide the number by the length of the sequence to be encoded to obtain the decoded frequency of each character. Subtract the decoded frequency from the overall frequency of each character to obtain the unencoded frequency of each character. Calculate the predicted repetition rate of each string in the compression dictionary based on the unencoded frequency of each character contained in each string in the compression dictionary using the method in step S003, and update the compression dictionary based on the predicted repetition rate of each string. If the next encoding result exists in the updated compression dictionary, obtain the character corresponding to the next encoding result in the updated compression dictionary or the first character in the string as the last character. If the next encoding result does not exist in the updated compression dictionary, use the first character in the encoding object of the current encoding result as the last character. Concatenate the last character after the encoding object of the current encoding result to obtain a string, and add the string to the end of the updated compression dictionary.
[0048] The encoding objects of each encoding result are concatenated in order to obtain a character sequence. The character sequence is decoded using base64 encoding and the decoded result is converted into sensor data.
[0049] The data processing platform analyzes the decoded sensor data.
[0050] Through the above steps, the encoding compression of sensor data is completed.
[0051] In an embodiment of the present invention, sensor data is preprocessed to obtain an initial compression dictionary for a sequence to be encoded. An upper limit on the length of the initial compression dictionary is obtained. During the compression of the sequence to be encoded, the length of the compression dictionary is determined after each encoding of an encoding object is completed. If the length of the compression dictionary reaches the upper limit, a predicted repetition rate of each character string is obtained based on the overall frequency and encoded frequency of characters in all character strings in the compression dictionary. The compression dictionary is updated based on the predicted repetition rate, ensuring that all character strings that may reappear subsequently can be matched in the compression dictionary. This allows longer character strings in the sequence to be encoded to be encoded using smaller sequence numbers, thereby ensuring compression efficiency. In an embodiment of the present invention, the length of the compression dictionary is continuously updated to ensure that it is within the upper limit, so that the encoding result of the encoding object is as small as possible, thereby minimizing the number of bits of compressed data and maximizing compression efficiency.
[0052] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A data compression method based on LZW coding, characterized in that: The method comprises the following steps: Collect sensor data, pre-process the sensor data, and obtain a sequence to be encoded; construct an initial compression dictionary according to each character in the sequence to be encoded; and obtain an upper limit of the length according to the length of the initial compression dictionary; The frequency of occurrence of each character in the sequence to be encoded is taken as the overall frequency of each character; an empty sequence is constructed as the encoded sequence; Compress the coded sequence, including: S1: Match the sequence to be encoded according to the compression dictionary, obtain the encoding object and the encoding result of the encoding object; update the encoded sequence according to the encoding object; S2: when the length of the compression dictionary is greater than or equal to the upper limit of the length, obtaining the uncoded frequency of each character according to the coded sequence and the overall frequency of each character; calculating the predicted repetition rate of each character string in the compression dictionary according to the uncoded frequency of each character contained in each character string in the compression dictionary; updating the compression dictionary according to the predicted repetition rate of each character string in the compression dictionary; S3: The encoding object and the next character of the encoding object in the sequence to be encoded are combined into a string as a first string, and the first string is added to the end of the compression dictionary; S4: repeat S1 to S3 until each character in the sequence to be encoded has been matched and then stop the iteration; obtain compressed data according to the encoding result of each encoding object; Transmit, decompress and analyze compressed data.
2. A data compression method based on LZW coding according to claim 1, characterized in that: The sensor data is preprocessed to obtain a sequence to be encoded, and the specific steps include the following: The sensor data is converted into binary data, the binary data is encoded into characters, and a sequence consisting of all the characters obtained in order is used as a sequence to be encoded.
3. The data compression method based on LZW coding according to claim 1, characterized in that: The specific steps of constructing an initial compression dictionary according to each character in the sequence to be encoded are as follows: Count each character that appears in the sequence to be encoded, build an empty dictionary, add each character to the dictionary, and use the dictionary as the initial compression dictionary.
4. The data compression method based on LZW coding according to claim 1, characterized in that: The specific steps of obtaining the length upper limit according to the length of the initial compression dictionary are as follows: Set the expansion multiple and take the product of the expansion multiple and the length of the initial compression dictionary as the length upper limit.
5. The data compression method based on LZW coding according to claim 1, characterized in that: The specific steps of matching the sequence to be encoded according to the compression dictionary to obtain the encoding object and the encoding result of the encoding object are as follows: According to the compression dictionary, the longest match is performed on the sequence to be encoded starting from the first unmatched character in the sequence to be encoded, and the matching result is used as the encoding object; the serial number of the encoding object in the compression dictionary is used as the encoding result of the encoding object.
6. The data compression method based on LZW coding according to claim 1, characterized in that: The updating of the encoded sequence according to the encoding object includes the following specific steps: Append each character in the encoding object to the end of the encoded sequence in turn.
7. The data compression method based on LZW coding according to claim 1, characterized in that: The specific steps of obtaining the uncoded frequency of each character according to the coded sequence and the overall frequency of each character are as follows: Get the number of times each character appears in the encoded sequence, divide the number by the length of the sequence to be encoded to get the encoded frequency of each character; subtract the encoded frequency from the overall frequency of each character to get the unencoded frequency of each character.
8. The data compression method based on LZW coding according to claim 1, characterized in that: The step of calculating the predicted repetition rate of each character string in the compression dictionary according to the uncoded frequency of each character contained in each character string in the compression dictionary includes the following specific steps: In the formula, The first The predicted repetition rate of the string; The first The set of unencoded frequencies of each character contained in the string; is the minimum function; The first The sequence number of the string; The upper limit of the length of the compression dictionary; The compression dictionary is The number of strings that are substrings; is an exponential function with a natural constant as base; is a hyperparameter.
9. The data compression method based on LZW coding according to claim 1, characterized in that: The specific steps of updating the compression dictionary according to the predicted repetition rate of each character string in the compression dictionary are as follows: Preset culling quantity , the one with the smallest repetition rate will be predicted The character strings are removed from the compression dictionary, and the remaining characters and character strings in the compression dictionary are re-assigned serial numbers according to the serial numbers of the positions where they appear in the compression dictionary after being removed.
10. The data compression method based on LZW coding according to claim 1, characterized in that: The specific steps of obtaining compressed data according to the encoding result of each encoding object are as follows: Get the maximum value of the encoding results of all encoding objects, recorded as ,Will As the first length, use Indicates that is the rounding symbol; convert the encoding result of each encoding object to a length of The binary number, the length of the encoding result of all the encoding objects is The binary numbers are concatenated together in order as the compressed data of the sequence to be encoded.
Citation Information
Patent Citations
Smart community face data storage method and system
CN116521093A
Wireless sensor network data intelligent compression method
CN117376429A
Comprehensive energy data management system based on Internet of Things
CN117896442A
Data compression system
JP1993241777A
Bit-aligned header compression for CCN messages using dictionary
US20170126854A1
Cited By
Medical rehabilitation data intelligent processing method based on monitoring sensor
CN119380915A
Compression system for engineering information data
CN119788089A
Clinical test data acquisition system based on cloud computing
CN120452644A
Cloud-based clinical trial data acquisition system
CN120452644B
Flue gas monitoring data online transmission method
CN120474559A
