Data decompression method, device, equipment and storage medium

By compressing the codewords to be processed into compressed codes and performing padding operations, the problem of low decoding efficiency in neural convolutional networks is solved, achieving efficient parallel decompression, which is suitable for AI acceleration devices.

CN114614831BActive Publication Date: 2026-02-13SHENZHEN CORERAIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210238672.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2026-02-13
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

The low decoding efficiency of existing neural convolutional networks makes them unable to respond to large amounts of data in a timely manner, hindering their application in AI acceleration devices.

Method used

The codeword to be processed is compressed into compressed code, and then divided into several segments of compressed code with a preset number of bytes as the boundary. The first padding operation is performed to make the start bit complete, and the second padding operation is performed to make the end bit the index value, thus realizing parallel decompression.

Benefits of technology

It improves decompression efficiency, can respond promptly to the computation of large amounts of neural network data, and is suitable for lossless decompression scenarios of AI-accelerated devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114614831B_ABST
    Figure CN114614831B_ABST
Patent Text Reader

Abstract

The application relates to a data decompression method, device and equipment and a storage medium. The method comprises the following steps: compressing a to-be-processed code word into a compressed code; dividing the compressed code into a plurality of segment compressed codes with a preset number of bytes as a boundary, performing a first padding operation on the segment compressed codes to obtain a first padding compressed code; performing a second padding operation on the first padding compressed code to obtain a second padding compressed code; and performing parallel decompression on the second padding compressed code to obtain a decompression result. The application can obtain a decompression result through parallel decompression, improves the decompression efficiency, can respond in time when facing the calculation of a large amount of neural network data, and is widely applicable to the lossless decompression scene of an AI acceleration device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data decoding, and particularly relates to a data decompression method and device, equipment and a storage medium. BACKGROUND

[0002] With the rapid development of deep learning, convolutional neural networks have been widely used in machine vision applications, such as image recognition and image classification. However, the large amount of computation of the convolutional neural network algorithm leads to a long inference running time, which hinders the deployment of convolutional neural networks in daily applications.

[0003] At present, the compression and decompression method of the neural convolutional network in the prior art is usually to find the Huffman table one by one Bit / Byte and perform multiple iterations of comparison until the matching compression code index value is found, and then the corresponding decoding value is output. However, this method has low decoding efficiency, cannot respond in time to the large amount of neural network data calculation, and is difficult to apply to lossless decompression of AI acceleration devices.

[0004] Therefore, how to improve the data decoding efficiency has become a technical problem to be solved by those skilled in the art. SUMMARY

[0005] In view of the above, the present application provides a data decompression method, device, equipment and storage medium, which aims to improve the data decoding efficiency.

[0006] In a first aspect, the present application provides a data decompression method, which comprises:

[0007] compressing a to-be-processed code word into a compressed code;

[0008] dividing the compressed code into a plurality of segment compressed codes according to a preset number of bytes as a boundary, and performing a first padding operation on the segment compressed codes to obtain a first padding compressed code;

[0009] performing a second padding operation on the first padding compressed code to obtain a second padding compressed code;

[0010] parallel decompressing the second padding compressed code to obtain a decompression result.

[0011] In a second aspect, the present application provides a data decompression device, which comprises:

[0012] a compression module configured to compress a to-be-processed code into a compressed code;

[0013] a first padding module configured to divide the compressed code into a plurality of segment compressed codes according to a preset number of bytes as a boundary, and perform a first padding operation on the segment compressed codes to obtain a first padding compressed code;

[0014] The second filling module is configured to perform a second filling operation on the first filling compressed code to obtain a second filling compressed code.

[0015] The decompression module is configured to perform parallel decompression on the second filling compressed code to obtain a decompression result.

[0016] In a third aspect, the present application provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.

[0017] The memory is configured to store a computer program.

[0018] The processor is configured to execute the program stored on the memory to implement the steps of the data decompression method of any one of the embodiments of the first aspect.

[0019] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the data decompression method of any one of the embodiments of the first aspect.

[0020] Compared with the prior art, the above technical solutions provided by the embodiments of the present application have the following advantages:

[0021] The data decompression method, device, equipment and storage medium provided by the present application compress the to-be-processed code word into a compressed code, divide the compressed code into a plurality of segment compressed codes with a preset number of bytes as a boundary, perform a first filling operation on the segment compressed codes to obtain a first filling compressed code, perform a second filling operation on the first filling compressed code to obtain a second filling compressed code, so that the start bit and the end bit of each segment compressed code are complete values, and there is no dependency between each segment compressed code during decompression, so that the decompression can be performed in parallel to obtain a decompression result, the decompression efficiency is improved, timely response can be achieved when facing large data volume of neural network calculation, and the method is widely applicable to lossless decompression scenes of AI acceleration equipment. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor.

[0024] Figure 1 The flowchart of the preferred embodiment of the data decompression method of the present application is shown in the figure.

[0025] Figure 2 Figure 1 shows a schematic diagram of the generation of the first padding sub-compressed code according to the present application;

[0026] Figure 3 Figure 2 shows a schematic diagram of the generation of the second padding sub-compressed code according to the present application

[0027] Figure 4 Figure 3 shows a schematic diagram of the modules of the preferred embodiment of the data decompression device according to the present application;

[0028] Figure 5 Figure 4 shows a schematic diagram of the preferred embodiment of the electronic device according to the present application;

[0029] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0031] The present application provides a data decompression method. Referring to Figure 1, a schematic diagram of the method flow of the embodiment of the data decompression method according to the present application is shown. The method can be executed by an electronic device, which can be realized by software and / or hardware. The data decompression method comprises the following steps: Figure 1

[0032] Step S10: compressing a to-be-processed code word into a compressed code;

[0033] Step S20: dividing the compressed code into a plurality of sub-compressed codes with a preset number of bytes as a boundary, and performing a first padding operation on the sub-compressed codes to obtain a first padding compressed code;

[0034] Step S30: performing a second padding operation on the first padding compressed code to obtain a second padding compressed code;

[0035] Step S40: parallel decompressing the second padding compressed code to obtain a decompression result.

[0036] ​Since the inference running time of a neural network (e.g., a convolutional neural network) is long due to a large amount of computation, the weight values of the model need to be compressed and then decoded to improve the running efficiency of the chip and reduce the inference running time of the model. It can be understood that the to-be-processed code word can be a weight value of an artificial intelligence model, or other data that needs to be compressed and then decoded to improve the running efficiency of the system, such as a weight parameter of a recognition model in the field of text recognition and speech recognition, or video data, audio data, etc., which are not limited herein.

[0037] In this embodiment, the to-be-processed code word can be compressed into a compressed code by using a lossless compression algorithm. The compressed code includes a plurality of compressed values.

[0038] After the to-be-processed code word is compressed into a compressed code, the compressed code is divided into a plurality of sub-compressed codes with a preset number of bytes as a boundary, and a first padding operation is performed on the sub-compressed codes to obtain a first padded compressed code. The preset number of bytes can be 4 bytes. For example, if the compressed code is 4 KB, the compressed code can be divided into 1000 sub-compressed codes. Since the compressed values in each sub-compressed code are not necessarily complete compressed values, a value can be padded to each sub-compressed code to obtain a first padded compressed code, so that the start bit of each sub-compressed code in the first padded compressed code is a complete compressed value. A second padding operation is performed on the first padded compressed code to obtain a second padded compressed code. The start bit and the end bit of each sub-compressed code of the second padded compressed code are complete values. The second padding operation can be a value padding operation performed on the end bit of each sub-compressed code, so that the start bit and the end bit of each sub-compressed code are complete values, so that there is no dependency between each sub-compressed code. Parallel decompression can be performed on the second padded compressed code to improve the decompression efficiency. When facing a large amount of neural network data, a timely response can be achieved, and the lossless decompression scene of the AI acceleration device is widely applicable.

[0039] In one embodiment, the to-be-processed code word is compressed into a compressed code, including:

[0040] The to-be-decompressed code is compressed based on a Huffman algorithm to obtain the compressed code, wherein the compressed code includes a plurality of compressed values.

[0041] The to-be-processed code word is compressed by using the Huffman algorithm. Specifically, compression is performed in units of a single byte, and only one lookup table is used. If the last byte output is not a complete byte, the byte is rounded up.

[0042] In one embodiment, the first padding operation is performed on the sub-compressed code to obtain a first padded compressed code, including:

[0043] Among the several sub-compressed codes, fill values are sequentially inserted to obtain several first filled sub-compressed codes;

[0044] The first filled sub-compressed codes are concatenated to obtain a first filled compressed code.

[0045] By inserting fill values into each sub-compressed code, several first filled sub-compressed codes can be obtained. The fill value can be 0 or 1. A first filled sub-compressed code refers to a sub-compressed code whose starting bit is a complete compressed value. Concatenating the first filled sub-compressed codes can obtain a first filled compressed code. For example, if the compressed code is 4KB and is divided with a 4Byte boundary, by inserting the fill value 0 into 1000 sub-compressed codes, the sub-compressed codes can be adjusted to first filled sub-compressed codes with starting bits being complete compressed values.

[0046] See Figure 2 As shown, it is a schematic diagram for generating the first filled sub-compressed code of this application. Inserting fill values into the several sub-compressed codes in sequence to obtain several first filled sub-compressed codes includes:

[0047] Make the starting bit of each sub-compressed code be a complete compressed value;

[0048] Judge whether the ending bit of the sub-compressed code within the bytes of the sub-compressed code is an incomplete compressed value;

[0049] If so, insert a fill value to the ending bit of the sub-compressed code.

[0050] N*Byte represents the codeword to be processed, M*Byte represents the compressed code after compression of the codeword to be processed, L*Byte represents the first filled compressed code. Each compressed code has several compressed values, denoted as C0, C1, C2... C(N - 1). The dashed line represents dividing the compressed code into several sub-compressed codes with a 4Byte boundary. When performing the filling operation, make the starting bit of each sub-compressed code be a complete compressed value. When it is judged that the ending bit of the sub-compressed code is an incomplete compressed value, insert a fill value at the ending bit of the sub-compressed code. For example, if the ending bit C5 of the first sub-compressed code is an incomplete compressed value, then use C5 as the starting bit of the second sub-compressed code and insert a fill value P0 at the ending bit of the first sub-compressed code.

[0051] In one embodiment, performing a second filling operation on the first filled compressed code includes:

[0052] Among the several first filled sub-compressed codes of the first filled compressed code, several index values and several fill values are sequentially inserted into the first filled sub-compressed codes to obtain several second filled sub-compressed codes;

[0053] The second filled sub-compressed codes are concatenated to obtain the second filled compressed code.

[0054] The second filling sub-compressed code is obtained by inserting index values and filling values into the first filling sub-compressed code in sequence. The filling value can be 0 or 1. The second filling sub-compressed code refers to a sub-compressed code in which the terminal bit is an index value and the inserted filling value is between the compressed value and the index value. The second filling compressed code can be obtained by splicing the second filling sub-compressed codes. For example, the compressed code is divided by taking 4 bytes as a boundary. The sub-compressed code can be adjusted to the second filling sub-compressed code in which the terminal bit is an index value by inserting the index value into the terminal bit of each segment of the sub-compressed code.

[0055] Referring to FIG. 2, a generation diagram of the second filling sub-compressed code of the present application is shown. The index values and the filling values are inserted into the first filling sub-compressed code in sequence to obtain the second filling sub-compressed code, including: Figure 3 The terminal bit of each segment of the first filling sub-compressed code is an index value.

[0056] It is judged whether the compressed value of the bit before the index value and the index value are incomplete.

[0057] If yes, a filling value is inserted between the compressed value of the bit before the index value and the index value.

[0058] M*Byte represents the compressed code of the compressed code word to be processed, L*Byte represents the first filling compressed code, and K*Byte represents the second filling compressed code. Each compressed code has a plurality of compressed values, which are denoted as C0, C1, C2, …, C(N-1). The index values are denoted as idx0, idx1, idx2, …, and the dashed line represents that the first filling compressed code is divided into a plurality of first filling sub-compressed codes by taking 4 bytes as a boundary. In the second filling operation, the terminal bit of each segment of the first filling sub-compressed code is an index value. When it is judged that the compressed value of the bit before the index value and the index value are incomplete, a filling value is inserted between the compressed value of the bit before the index value and the index value. For example, the terminal bit of the first segment of the first filling sub-compressed code is an index value idx0. It is judged whether the compressed value of the bit before the index value and the index value are incomplete (i.e., whether C5 can be placed between idx0 and C4 in a complete form). If yes, a filling value is inserted between idx0 and C4. idx0=5 indicates that 5 Cs can be decompressed in the first segment of 4 bytes of K*Byte, and the first byte decompressed in the second segment of 4 bytes is B5.

[0059] In one embodiment, the second filling compressed code is decompressed in parallel, including:

[0060] In one embodiment, the second filling compressed code is decompressed in parallel, including:

[0061] synchronously decompressing the multiple sub-compressed codes in the second padding compressed code until the index value of the multiple sub-compressed codes in the second padding compressed code is decompressed.

[0062] The index value of each sub-compressed code indicates how many Bytes of data can be decompressed from each piece of data. If the data up to the index value is decompressed, it indicates that the piece of data has been decompressed.

[0063] Referring to Figure 4 As shown in the figure, it is a schematic diagram of functional modules of the data decompression apparatus 100.

[0064] The data decompression apparatus 100 can be installed in an electronic device. According to the functions to be implemented, the data decompression apparatus 100 can include a compression module 110, a first padding module 120, a second padding module 130, and a decompression module 140. The modules in the present application can also be referred to as units, which refer to a series of computer program segments that can be executed by an electronic device processor and can complete a fixed function, and are stored in the memory of the electronic device.

[0065] In the present embodiment, the functions of each module / unit are as follows:

[0066] The compression module 110 is configured to compress the to-be-processed code into a compressed code.

[0067] The first padding module 120 is configured to divide the compressed code into a plurality of sub-compressed codes according to a preset number of Bytes as a boundary, and perform a first padding operation on the sub-compressed codes to obtain a first padding compressed code.

[0068] The second padding module 130 is configured to perform a second padding operation on the first padding compressed code to obtain a second padding compressed code.

[0069] The decompression module 140 is configured to perform parallel decompression on the second padding compressed code to obtain a decompression result.

[0070] In one embodiment, the to-be-processed code is compressed into a compressed code, including:

[0071] The to-be-decompressed code is compressed according to a single byte based on a Huffman algorithm to obtain the compressed code, wherein the compressed code includes a plurality of compressed values.

[0072] In one embodiment, the first padding operation on the sub-compressed code to obtain the first padding compressed code includes:

[0073] In the plurality of sub-compressed codes, padding values are sequentially inserted to obtain a plurality of first padding sub-compressed codes.

[0074] The first padding sub-compressed codes are spliced to obtain the first padding compressed code.

[0075] In one embodiment, the step of sequentially inserting padding values ​​into the plurality of segmented compressed codes to obtain a plurality of first padding sub-compressed codes includes:

[0076] Set the starting bit of each sub-compression code segment to the complete compressed value;

[0077] Determine whether the terminating bit of the sub-compression code is an incomplete compressed value within the bytes of the sub-compression code;

[0078] If so, insert a padding value to the termination bit of the sub-compression code.

[0079] In one embodiment, performing the second padding operation on the first padding compression code includes:

[0080] In the first filling sub-compression code of the first filling compression code, a number of index values ​​and a number of filling values ​​are sequentially inserted into the first filling sub-compression code to obtain a number of second filling sub-compression codes.

[0081] The second padding sub-compression code is obtained by concatenating the second padding sub-compression code.

[0082] In one embodiment, the step of sequentially inserting a plurality of index values ​​and a plurality of padding values ​​into the first padding sub-compression code to obtain a plurality of segments of the second padding sub-compression code includes:

[0083] Let the terminating bit of the first padding sub-compression code in each segment be the index value;

[0084] Determine whether the compressed value preceding the index value and the index value are incomplete compressed values;

[0085] If so, insert a padding value between the compressed value preceding the index value and the index value.

[0086] In one embodiment, the parallel decompression of the second padding compression code includes:

[0087] Simultaneously decompress the multi-segment compressed code in the second padding compressed code until the index value of the multi-segment compressed code in the second padding compressed code is decompressed.

[0088] Reference Figure 5 The diagram shown is a schematic diagram of a preferred embodiment of the electronic device 1 of this application.

[0089] The electronic device 1 includes, but is not limited to, a memory 11, a processor 12, a display 13, and a network interface 14. The electronic device 1 is connected to a network through the network interface 14 to obtain raw data. The network can be an Intranet, the Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth, Wi-Fi, a telephony network, or other wireless or wired networks.

[0090] The memory 11 includes at least one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, or the like. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, or the like. Of course, the memory 11 can include both an internal storage unit and an external storage device of the electronic device 1. In this embodiment, the memory 11 is generally used to store an operating system and various application software installed in the electronic device 1, such as program codes of the data decompression program 10, and the like. In addition, the memory 11 can also be used to temporarily store various data that has been output or will be output.

[0091] The processor 12 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 12 is generally used to control the overall operation of the electronic device 1, such as performing control and processing related to data interaction or communication, and the like. In this embodiment, the processor 12 is used to run program codes or process data stored in the memory 11, such as running program codes of the data decompression program 10, and the like.

[0092] The display 13 can be referred to as a display screen or a display unit. In some embodiments, the display 13 can be an LED display, a liquid crystal display, a touch liquid crystal display, an Organic Light-Emitting Diode (OLED) touch screen, or the like. The display 13 is used to display information processed in the electronic device 1 and to display a visualized user interface, such as a result of displaying data statistics.

[0093] The network interface 14 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0094] Figure 5 Only the electronic device 1 with components 11-14 and the data decompression program 10 is shown, but it should be understood that all the components shown are not required to be implemented, and more or fewer components can be alternatively implemented.

[0095] Optionally, the electronic device 1 can also include a user interface, which can include a display, an input unit such as a keyboard, and optionally a standard wired interface, a wireless interface. In some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, an Organic Light-Emitting Diode (OLED) touch screen, or the like. The display can also be appropriately referred to as a display screen or a display unit, and is used to display information processed in the electronic device 1 and to display a visualized user interface.

[0096] The electronic device 1 can also include a radio frequency (RF) circuit, a sensor, an audio circuit, and the like, which are not described here.

[0097] In the above embodiments, when the processor 12 executes the data decompression program 10 stored in the memory 11, the following steps can be implemented:

[0098] compressing a to-be-processed code word into a compressed code;

[0099] dividing the compressed code into a plurality of sub-compressed codes according to a preset number of bytes as a boundary, and performing a first padding operation on the sub-compressed codes to obtain a first padded compressed code;

[0100] performing a second padding operation on the first padded compressed code to obtain a second padded compressed code;

[0101] parallel decompressing the second padded compressed code to obtain a decompression result.

[0102] The storage device can be the memory 11 of the electronic device 1, or can be another storage device in communication connection with the electronic device 1.

[0103] For detailed description of the above steps, please refer to the above Figure 4 For the functional module diagram of the embodiment of the data decompression device 100 and Figure 1 For the flowchart of the embodiment of the data decompression method.

[0104] In addition, the embodiment of the present application also proposes a computer readable storage medium, which can be non-volatile or volatile. The computer readable storage medium can be any one or any combination of hard disk, multimedia card, SD card, flash memory card, SMC, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, etc. The computer readable storage medium includes a storage data area and a storage program area, and the storage program area stores a data decompression program 10. When the data decompression program 10 is executed by a processor, the following operations are realized:

[0105] Compressing the to-be-processed code word into a compressed code;

[0106] Dividing the compressed code into a plurality of segment compressed codes according to a preset number of bytes as a boundary, and performing a first padding operation on the segment compressed codes to obtain a first padded compressed code;

[0107] Performing a second padding operation on the first padded compressed code to obtain a second padded compressed code;

[0108] Parallelly decompressing the second padded compressed code to obtain a decompression result.

[0109] The specific implementation of the computer readable storage medium of the present application is substantially the same as that of the above-mentioned data decompression method, and will not be repeated here.

[0110] It should be noted that the above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. Moreover, the terms "include", "contain" or any other variant thereof in this paper are intended to cover non-exclusive inclusion, so that the process, device, article or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, device, article or method. Without more limitation, the element defined by the sentence "including a…" does not exclude the presence of another identical element in the process, device, article or method including the element.

[0111] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, can also be through hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software products, the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc) as described above, including a number of instructions to make a terminal device (may be a mobile phone, computer, electronic device, or network equipment, etc.) executes the method described in various embodiments of the present application.

[0112] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, any equivalent structure or equivalent process transformation using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data decompression method, characterized by, The method comprises: compressing a to-be-processed code word into a compressed code; dividing the compressed code into a plurality of segments of sub-compressed codes according to a preset number of bytes, and performing a first padding operation on the sub-compressed codes to obtain a first padded compressed code; performing a second padding operation on the first padded compressed code to obtain a second padded compressed code; parallel decompressing the second padded compressed code to obtain a decompression result; wherein the first padding operation on the sub-compressed codes comprises: inserting padding values into the plurality of segments of sub-compressed codes in sequence to obtain a plurality of segments of first padded sub-compressed codes; splicing the first padded sub-compressed codes to obtain the first padded compressed code; the inserting padding values into the plurality of segments of sub-compressed codes in sequence comprises: making a start bit of each segment of the sub-compressed codes a complete compressed value; judging whether a terminal bit of the sub-compressed codes is an incomplete compressed value within a byte of the sub-compressed codes; if so, inserting a padding value into the terminal bit of the sub-compressed codes; the second padding operation on the first padded compressed code comprises: inserting a plurality of index values and a plurality of padding values into the plurality of segments of first padded sub-compressed codes of the first padded compressed code in sequence to obtain a plurality of segments of second padded sub-compressed codes; splicing the second padded sub-compressed codes to obtain the second padded compressed code; the inserting a plurality of index values and a plurality of padding values into the plurality of segments of first padded sub-compressed codes in sequence to obtain a plurality of segments of second padded sub-compressed codes comprises: making a terminal bit of each segment of the first padded sub-compressed codes an index value; judging whether an incomplete compressed value exists between a compressed value of a previous bit of the index value and the index value; if so, inserting a padding value between the compressed value of the previous bit of the index value and the index value.

2. The data decompression method of claim 1, wherein, the compressing the to-be-processed code word into a compressed code comprises: performing a compression operation on the to-be-processed code word in a single byte based on a Huffman algorithm to obtain the compressed code, wherein the compressed code comprises a plurality of compressed values.

3. The data decompression method of claim 1 or 2, wherein, the parallel decompressing the second padded compressed code comprises: synchronously decompressing a plurality of segments of sub-compressed codes in the second padded compressed code until index values of the plurality of segments of sub-compressed codes in the second padded compressed code are decompressed.

4. A data decompression apparatus characterized by comprising: The device comprises: a compression module configured to compress a to-be-processed code into a compressed code; a first padding module configured to divide the compressed code into a plurality of segments of sub-compressed codes according to a preset number of bytes, and perform a first padding operation on the sub-compressed codes to obtain a first padded compressed code; a second padding module configured to perform a second padding operation on the first padded compressed code to obtain a second padded compressed code; a decompression module configured to parallel decompress the second padded compressed code to obtain a decompression result; wherein the first padding operation on the sub-compressed codes comprises: inserting padding values into the plurality of segments of sub-compressed codes in sequence to obtain a plurality of segments of first padded sub-compressed codes; splicing the first padded sub-compressed codes to obtain the first padded compressed code; the inserting padding values into the plurality of segments of sub-compressed codes in sequence comprises: The start bit of each segment of the sub-compressed code is a complete compressed value; It is judged whether the end bit of the sub-compressed code is an incomplete compressed value in the byte of the sub-compressed code; If yes, a padding value is inserted into the end bit of the sub-compressed code; The second padding operation on the first padding compressed code comprises: In a plurality of segments of the first padding sub-compressed code of the first padding compressed code, a plurality of index values and a plurality of padding values are sequentially inserted into the first padding sub-compressed code to obtain a plurality of segments of the second padding sub-compressed code; The second padding sub-compressed code is spliced to obtain the second padding compressed code; The sequentially inserting a plurality of index values and a plurality of padding values into the first padding sub-compressed code to obtain a plurality of segments of the second padding sub-compressed code comprises: The end bit of each segment of the first padding sub-compressed code is an index value; It is judged whether the compressed value of the previous bit of the index value and the index value is an incomplete compressed value; If yes, a padding value is inserted between the compressed value of the previous bit of the index value and the index value.

5. An electronic device, comprising: The computer program is executed by the processor to realize the steps of the data decompression method in any one of claims 1 to 3. The computer program is executed by the processor to realize the steps of the data decompression method in any one of claims 1 to 3. ​ 6. A computer-readable storage medium having stored thereon a computer program, characterized in that, ​

Citation Information

Patent Citations

  • Method and system for implementing parallel encoding of high-definition video

    CN101282478A

  • Parallel decompression of compressed data streams

    CN114116635A