Online decompression device and method
Through the file control module and the decompression module of the online decompression device work together, the processor's participation in the decompression process is reduced, the problem of high processor utilization is solved, and the effect of reducing power consumption and improving computing efficiency is achieved.
Patent Information
- Application Number
- CN202311665177.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, the processor utilization rate is high during the decompression process, resulting in increased power consumption and processor utilization.
An online decompression device and method are provided, which receives the decompression request of the processor through the file control module, moves the data block to be decompressed to multiple decompression queues, and performs decompression operations by the decompression module to reduce the processor's participation in the decompression process.
By reducing the direct participation of the processor in the decompression process, the utilization of the processor during the understanding of the compression process is reduced, thereby reducing power consumption and improving the processor's computing efficiency.
Smart Images

Figure CN120104038A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of chip technology, and in particular to an online decompression device and method. Background Art
[0002] Due to the limited storage space, files need to be compressed, especially for files that are not frequently used and occupy a large amount of space, which need to be stored after compression to save the limited external storage space of electronic devices. When the compressed files are used, they need to be decompressed online so that they can be correctly read and used by the application.
[0003] In the related art, decompression is achieved through software services. The performance of software decompression is limited by the processor capability, and software decompression will increase the power consumption and utilization of the processor.
[0004] Therefore, how to reduce the utilization rate of the processor during the decompression process is one of the problems that those skilled in the art need to solve urgently. Summary of the invention
[0005] The embodiment of the present application provides an online decompression device and method for reducing the utilization rate of the processor during the decompression process. To achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides an online decompression device, which includes: a file control module and a decompression module. The file control module is used to receive a decompression request from a processor. The file control module is also used to move the data blocks to be decompressed in the external memory to N decompression queues according to the decompression request. The file control module is also used to send a first message to the decompression module. The decompression module is used to decompress the data blocks to be decompressed in the first decompression queue to the internal memory according to the first information. The decompression module is also used to send a second message to the file control module. The decompression request is used to indicate the decompression of the file to be decompressed, the data blocks to be decompressed are the data blocks of the file to be decompressed, the first information is used to indicate the decompression operation of the data blocks to be decompressed in the first decompression queue, the first decompression queue is any one of the N decompression queues, and the second information is used to indicate that the data blocks to be decompressed in the first decompression queue have been decompressed to the internal memory.
[0007] In the related art, decompression needs to be performed by software on the processor, that is, the processor must participate in the entire decompression process. In the solution provided by the embodiment of the present application, the processor only needs to send a decompression request to the file control module of the online decompression device, and the subsequent decompression process is performed by the online decompression device, thereby reducing the utilization rate of the processor during the decompression process.
[0008] In a possible implementation, the file control module is further used to: send third information to the decompression module, wherein the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and that the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
[0009] It can be seen that in the solution provided in the embodiment of the present application, the file control module of the online decompression device can indicate to the decompression module through the third information that the current file to be decompressed is about to be decompressed.
[0010] In a possible implementation, the file control module is further used to: send fourth information to the processor, where the fourth information is used to indicate that the file to be decompressed has been decompressed.
[0011] It can be seen that in the solution provided in the embodiment of the present application, the file control module of the online decompression device can indicate to the processor through the fourth information that the decompression of the file to be decompressed has been completed, so that the processor can issue a new decompression task.
[0012] In a possible implementation, the file control module is further configured to generate a plurality of data blocks to be decompressed according to the file to be decompressed.
[0013] Exemplarily, the file to be decompressed may be segmented into a plurality of data blocks to be decompressed according to a preset compression granularity, wherein the preset segmentation granularity may be 4 kilobytes (KB), 16KB, 64KB, 1 megabyte (MB) or others.
[0014] It can be seen that in the solution provided in the embodiment of the present application, the file control module of the online decompression device can divide the file to be decompressed into multiple data blocks to be decompressed, so there is no need to decompress the entire file at one time, thereby improving the decompression performance.
[0015] In a possible implementation, the above N is an integer greater than 1.
[0016] It can be understood that, if N is an integer greater than 1, it means that there are multiple decompression queues, and the multiple decompression queues can perform decompression operations simultaneously, thereby improving the decompression performance and reducing the decompression time.
[0017] In a possible implementation, the device may further include a coordination module.
[0018] In a possible implementation, the above-mentioned collaboration module is used to receive the above-mentioned first information from the file control module. The above-mentioned collaboration module is also used to send the above-mentioned fifth information to the above-mentioned decompression module. The above-mentioned collaboration module is also used to receive the above-mentioned second information from the decompression module. The above-mentioned collaboration module is also used to send the above-mentioned sixth information to the above-mentioned file control module. The above-mentioned fifth information is used to indicate that a decompression operation is performed on the data blocks to be decompressed in the first decompression queue, and the above-mentioned sixth information is used to indicate that the data blocks to be decompressed in the above-mentioned first decompression queue have been decompressed to the internal memory.
[0019] In a possible implementation, the above-mentioned collaborative module is used to receive the third information from the file control module, and the above-mentioned third information is used to indicate that the data block to be decompressed in the above-mentioned first decompression queue is to be decompressed and the data block to be decompressed in the above-mentioned first decompression queue is the last data block of the file to be decompressed. The above-mentioned collaborative module is also used to send the above-mentioned seventh information to the above-mentioned decompression module, and the above-mentioned seventh information is used to indicate that the data block to be decompressed in the above-mentioned first decompression queue is to be decompressed and the data block to be decompressed in the above-mentioned first decompression queue is the last data block of the file to be decompressed.
[0020] It can be seen that in the solution provided in the embodiment of the present application, the communication between the modules between the online decompression devices can be realized through the collaborative module. Compared with realizing the communication between the modules between the online decompression devices through the processor, realizing the communication between the modules between the online decompression devices through the collaborative module can further reduce the utilization rate of the processor during the decompression process.
[0021] In a possible implementation, the N decompression queues are arranged in the online decompression device or in the internal memory.
[0022] In a second aspect, an embodiment of the present application provides an online decompression method, the method comprising: receiving a decompression request from a processor, the decompression request being used to indicate decompression of a file to be decompressed. According to the decompression request, a data block to be decompressed in an external memory is moved to N decompression queues, the data block to be decompressed being a data block of the file to be decompressed. Sending first information to a decompression module, the first information being used to indicate a decompression operation on the data block to be decompressed in a first decompression queue, the first decompression queue being any of the N decompression queues. Decompressing the data block to be decompressed in the first decompression queue to an internal memory according to the first information. Sending second information to a file control module, the second information being used to indicate that the data block to be decompressed in the first decompression queue has been decompressed to an internal memory.
[0023] In a possible implementation, the method may further include: sending third information to the decompression module, wherein the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
[0024] In a possible implementation manner, the method may further include: sending fourth information to the processor, where the fourth information is used to indicate that the file to be decompressed has been decompressed.
[0025] In a possible implementation manner, the method may further include: generating a plurality of data blocks to be decompressed according to the file to be decompressed.
[0026] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, an internal memory, an external memory, and the above-mentioned online decompression device in the first aspect or any possible implementation thereof.
[0027] In a fourth aspect, an embodiment of the present application further provides an online decompression device, which includes: at least one processor, when the at least one processor executes program code or instructions, it implements the above method in the above second aspect or any possible implementation method thereof.
[0028] Optionally, the online decompression device may further include at least one memory, and the at least one memory is used to store the program code or instruction.
[0029] In a fifth aspect, an embodiment of the present application further provides a chip, comprising: an input interface, an output interface, and at least one processor. Optionally, the chip also includes a memory. The at least one processor is used to execute the code in the memory, and when the at least one processor executes the code, the chip implements the above-mentioned method in the above-mentioned second aspect or any possible implementation thereof.
[0030] Optionally, the above chip may also be an integrated circuit.
[0031] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium for storing a computer program, wherein the computer program includes methods for implementing the above-mentioned second aspect or any possible implementation thereof.
[0032] In a seventh aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement the method in the second aspect or any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 A schematic diagram of the structure of an online decompression device provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of the structure of another online decompression device provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the structure of another online decompression device provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0038] Figure 5 A flowchart of an online decompression method provided in an embodiment of the present application;
[0039] Figure 6 A flowchart of another online decompression method provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.
[0042] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0043] The terms "first" and "second" and the like in the description and drawings of the embodiments of the present application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0044] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0045] It should be noted that in the description of the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as having priority or advantage over other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0046] Due to the limited storage space, files need to be compressed, especially for files that are not frequently used and occupy a large amount of space, which need to be stored after compression to save the limited external storage space of electronic devices. When the compressed files are used, they need to be decompressed online so that they can be correctly read and used by the application.
[0047] To this end, the embodiment of the present application provides an online decompression device 100 for reducing the utilization rate of the processor during the decompression process. Figure 1 As shown, the online decompression device 100 includes a file control module 101 and a decompression module 102 .
[0048] The file control module 101 is used to receive a decompression request from a processor, where the decompression request is used to instruct decompression of the file to be decompressed.
[0049] The file control module 101 is further configured to move the data blocks to be decompressed in the external memory to N decompression queues according to the decompression request, wherein the data blocks to be decompressed are data blocks of the file to be decompressed.
[0050] The file control module 101 is further used to send first information to the decompression module, where the first information is used to instruct to perform a decompression operation on the to-be-decompressed data blocks in the first decompression queue, where the first decompression queue is any one of the N decompression queues.
[0051] The decompression module 102 is used to decompress the to-be-decompressed data blocks in the first decompression queue into an internal memory according to the first information.
[0052] The decompression module 102 is further used to send second information to the file control module, where the second information is used to indicate that the data blocks to be decompressed in the first decompression queue have been decompressed into the internal memory.
[0053] In the related art, decompression needs to be performed by software on the processor, that is, the processor must participate in the entire decompression process. In the solution provided by the embodiment of the present application, the processor only needs to send a decompression request to the file control module of the online decompression device, and the subsequent decompression process is performed by the online decompression device, thereby reducing the utilization rate of the processor during the decompression process.
[0054] In a possible implementation, the file control module 101 is further used to: send third information to the decompression module, wherein the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and that the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
[0055] In a possible implementation, the file control module 101 is further used to: send fourth information to the processor, where the fourth information is used to indicate that the file to be decompressed has been decompressed.
[0056] In a possible implementation, the file control module 101 is further configured to generate a plurality of data blocks to be decompressed according to the file to be decompressed.
[0057] Exemplarily, the file control module 101 may divide the to-be-decompressed file into a plurality of to-be-decompressed data blocks according to a preset compression granularity, wherein the preset division granularity may be 4KB, 16KB, 64KB, 1MB or others.
[0058] It can be understood that during the decompression process, through the collaboration of software and hardware, the application running on the processor does not need to be blocked waiting for the decompression to be completed, thereby achieving concurrency between the decompression and the application.
[0059] Exemplarily, the decompression queue may be a circular buffer.
[0060] It is understandable that if the file to be decompressed needs to be fully or partially loaded into the memory, and then the decompression module is notified to decompress it, it is impossible to effectively work in parallel between file loading and decompression. The file decompression data adopts a circular buffer method to achieve concurrent decompression, data loading, data use, etc., and realize online real-time use.
[0061] Exemplarily, the decompression module 102 may be a data compression unit (DCU).
[0062] In a possible implementation, the above N is an integer greater than 1.
[0063] It can be understood that, if N is an integer greater than 1, it means that there are multiple decompression queues, and the multiple decompression queues can perform decompression operations simultaneously, thereby improving the decompression performance and reducing the decompression time.
[0064] In the related art, decompression needs to be performed by software on the processor, that is, the processor must participate in the entire decompression process. In the solution provided by the embodiment of the present application, the processor only needs to send a decompression request to the file control module of the online decompression device, and the subsequent decompression process is performed by the online decompression device, thereby reducing the utilization rate of the processor during the decompression process.
[0065] Compared with executing file decompression through software on the processor, executing file decompression through a hardened decompression module can achieve processor load offloading and improve processor computing energy efficiency.
[0066] like Figure 2 As shown, the online decompression device 100 may further include a coordination module 103 .
[0067] The above-mentioned cooperation module 103 is used to receive the above-mentioned first information from the file control module.
[0068] The above-mentioned cooperation module 103 is further used to send the above-mentioned fifth information to the above-mentioned decompression module, and the above-mentioned fifth information is used to instruct to perform a decompression operation on the to-be-decompressed data blocks in the first decompression queue.
[0069] The above-mentioned cooperation module 103 is also used to receive the above-mentioned second information from the decompression module.
[0070] The above-mentioned collaboration module 103 is also used to send the above-mentioned sixth information to the above-mentioned file control module, and the above-mentioned sixth information is used to indicate that the data blocks to be decompressed in the above-mentioned first decompression queue have been decompressed to the internal memory.
[0071] The above-mentioned collaborative module 103 is also used to receive third information from the file control module, and the above-mentioned third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the above-mentioned first decompression queue and the data block to be decompressed in the above-mentioned first decompression queue is the last data block of the file to be decompressed.
[0072] The above-mentioned collaborative module 103 is also used to send the above-mentioned seventh information to the above-mentioned decompression module, and the above-mentioned seventh information is used to indicate that a decompression operation is performed on the data block to be decompressed in the above-mentioned first decompression queue and the data block to be decompressed in the above-mentioned first decompression queue is the last data block of the file to be decompressed.
[0073] Exemplarily, the above-mentioned collaboration module 103 may be a heterogeneous taskschedule (HTS).
[0074] It is understandable that the coordinated control functions between file loading and decompression require the processor to complete the control scheduling, and the processor cannot be put into sleep mode, which results in high energy consumption. The hardened file control module supports the control of loading files to be decompressed, driving decompression, and data movement, which can reduce the overhead of processor computing resources.
[0075] like Figure 3 As shown, the N decompression queues may be arranged in the online decompression device 100 .
[0076] In a possible implementation, the N decompression queues may also be set in the internal memory.
[0077] The present application also provides an electronic device, such as Figure 4 As shown, the electronic device 400 includes an online decompression device 100 , a processor 401 , an internal memory 402 and an external memory 403 .
[0078] Exemplarily, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, etc. The embodiments of the present application do not impose any special restrictions on the specific form of the device.
[0079] Exemplarily, the processor 401 may be a central processing unit (CPU), a graphics processing unit (GPU), a general-purpose processor network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 401 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0080] Exemplarily, the internal memory 402 may be a random access memory (RAM). By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM).
[0081] Exemplarily, the external memory 403 may be a universal flash storage (UFS), an embedded multi media card (EMMC), a solid state drive (SSD), a hard disk drive (HDD), or other external memory.
[0082] Figure 5 An online decompression method provided by an embodiment of the present application is shown, and the method includes:
[0083] S501: The processor sends a decompression request to the file control module.
[0084] Accordingly, the file control module receives a decompression request from the processor.
[0085] The decompression request is used to instruct decompression of the file to be decompressed.
[0086] Exemplarily, the above-mentioned file to be decompressed can be a compressed file in 7z, Rochelle archive (RAR), zip or other formats, which is not limited in this embodiment of the present application.
[0087] Exemplarily, the user application (application, APP) running in the processor can specify the online decompression file according to the scenario and specify the target memory address after decompression, as well as call the corresponding software interface and specify the parameter implementation (such as the parameters can include decompression Decompress, file name Filename, path DecAddr). The file system module of the operating system running in the processor, after receiving the file name and path to be decompressed sent by the APP, performs a parsing query to determine the block address of the file in the external memory, and further converts it into a call command for block input output (Block IO) reading, and sends it to the file control module through the driver module of the external memory.
[0088] S502: The file control module moves the to-be-decompressed data blocks in the external memory to N decompression queues according to the decompression request.
[0089] The data block to be decompressed is a data block of the file to be decompressed.
[0090] Exemplarily, the file control module can be configured according to a specific granularity (such as 4KB, 16KB, 64KB, 1MB) based on information such as the location and size of the file to be decompressed in the decompression request, and start loading file data in blocks from a specified location in the external storage into the decompression queue.
[0091] In a possible implementation, the file control module may also generate a plurality of data blocks to be decompressed according to the above-mentioned file to be decompressed.
[0092] S503: The file control module sends first information to the decompression module.
[0093] Correspondingly, the decompression module receives the first information from the file control module.
[0094] The first information is used to instruct to perform a decompression operation on the to-be-decompressed data blocks in the first decompression queue, and the first decompression queue is any one of the N decompression queues.
[0095] Exemplarily, the file control module may send first information to the decompression module, indicating that the first block of file data has been moved to address 0 of the decompression queue, and the decompression work may be started.
[0096] Exemplarily, the first information may be an E1 event, and the rule corresponding to the E1 event may be "load the data to be decompressed into the decompression queue No. x, and decompression may be started."
[0097] S504: The decompression module decompresses the to-be-decompressed data blocks in the first decompression queue into the internal memory according to the first information.
[0098] Exemplarily, the decompression module may decompress the to-be-decompressed data blocks in the first decompression queue according to the first information, and after the decompression is completed, the decompressed data blocks may be moved to the internal memory according to the target memory address.
[0099] In a possible implementation, the decompression module may also decompress the to-be-decompressed data blocks in the first decompression queue into the internal memory according to the first information, that is, the decompressed data may be stored in the internal system cache or the internal memory.
[0100] S505: The decompression module sends second information to the file control module.
[0101] Correspondingly, the file control module receives the second information from the decompression module.
[0102] The second information is used to indicate that the data blocks to be decompressed in the first decompression queue have been decompressed into the internal memory.
[0103] Exemplarily, the decompression module may send second information to the file control module to notify the file control module that the to-be-decompressed data block may continue to be loaded.
[0104] Exemplarily, the second information may be an E7 event, and the rule corresponding to the E7 event may be “notify the decompression queue No. x that the data has been decompressed and that the decompression can continue.”
[0105] It can be understood that the above steps are repeated until the file to be decompressed is completely decompressed.
[0106] In a possible implementation, the file control module may also send third information to the decompression module, wherein the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and that the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
[0107] Exemplarily, the third information may be an E2 event, and the rule corresponding to the E2 event may be "the last block of data to be decompressed is loaded into the decompression queue No. x, decompression can be started, and there is no subsequent data."
[0108] In a possible implementation, the file control module may further send fourth information to the processor, where the fourth information is used to indicate that the file to be decompressed has been decompressed.
[0109] Figure 6Another online decompression method provided by an embodiment of the present application is shown, the method comprising:
[0110] S601: The processor sends a decompression request to the file control module.
[0111] Accordingly, the file control module receives a decompression request from the processor.
[0112] S602: The file control module moves the to-be-decompressed data blocks in the external memory to N decompression queues according to the decompression request.
[0113] The data block to be decompressed is a data block of the file to be decompressed.
[0114] In a possible implementation, the file control module may also generate a plurality of data blocks to be decompressed according to the above-mentioned file to be decompressed.
[0115] S603: The file control module sends first information to the collaboration module.
[0116] Correspondingly, the cooperation module receives the first information from the file control module.
[0117] The first information is used to instruct to perform a decompression operation on the to-be-decompressed data blocks in the first decompression queue, and the first decompression queue is any one of the N decompression queues.
[0118] S604. The collaboration module sends the fifth information to the decompression module.
[0119] Accordingly, the decompression module receives the fifth information from the cooperation module.
[0120] The fifth information is used to instruct to perform a decompression operation on the data blocks to be decompressed in the first decompression queue.
[0121] Exemplarily, the fifth information may be an E5 event, and the rule corresponding to the E5 event may be “notify the decompression queue No. x that data can be started for decompression, and then continue to be decompressed”.
[0122] S605. The decompression module decompresses the to-be-decompressed data blocks in the first decompression queue into an internal memory according to the fifth information.
[0123] S606: The decompression module sends second information to the coordination module.
[0124] Accordingly, the cooperation module receives the second information from the decompression module.
[0125] The second information is used to indicate that the data blocks to be decompressed in the first decompression queue have been decompressed into the internal memory.
[0126] S607: The collaboration module sends sixth information to the file control module.
[0127] Correspondingly, the file control module receives the second information from the cooperation module.
[0128] The sixth information is used to indicate that the data blocks to be decompressed in the first decompression queue have been decompressed into the internal memory.
[0129] Exemplarily, the sixth information may be an E3 event, and the rule corresponding to the E3 event may be “notify the decompression queue No. x that the decompression is completed and has been released for the next data migration”.
[0130] In a possible implementation, the file control module may further send third information to the collaboration module, wherein the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
[0131] In a possible implementation, the collaboration module may further send seventh information to the decompression module, wherein the seventh information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
[0132] Exemplarily, the seventh information may be an E6 event, and the rule corresponding to the E6 event may be “notify the decompression queue No. x that the data is the last data block”.
[0133] In a possible implementation, the decompression module may further send eighth information to the coordination module, wherein the eighth information is used to indicate that the data in the first decompression queue is being decompressed.
[0134] Exemplarily, the eighth information may be an E8 event, and the rule corresponding to the E8 event may be “notification that a back pressure mechanism needs to be entered, and data in the decompression queue No. x is being decompressed”.
[0135] In a possible implementation, the collaboration module may further send ninth information to the file control module, wherein the ninth information is used to indicate that the data in the first decompression queue is being decompressed.
[0136] Exemplarily, the ninth information may be an E4 event, and the rule corresponding to the E4 event may be “notifying that the data decompression queue has reached back pressure”.
[0137] As shown in Table 1, the embodiment of the present application further provides a correspondence table between events and rules, and the correspondence table between events and rules is used to describe the information interaction and information interaction between the above-mentioned collaboration module, file control module and decompression module.
[0138] Table 1
[0139]
[0140] The embodiment of the present application also provides a chip. Figure 7 Schematic diagram of the structure of a chip 700 is shown. The chip 700 includes one or more processors 701 and an interface circuit 702. Optionally, the chip 700 may also include a bus 703.
[0141] The processor 701 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above online decompression method may be completed by a hardware integrated logic circuit in the processor 701 or by software instructions.
[0142] Optionally, the processor 701 may be a general purpose processor, a digital signal processing (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods and steps disclosed in the embodiments of the present application may be implemented or executed. The general purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0143] The interface circuit 702 can be used to send or receive data, instructions or information. The processor 701 can use the data, instructions or other information received by the interface circuit 702 to process, and can send the processing completion information through the interface circuit 702.
[0144] Optionally, the chip also includes a memory, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory (NVRAM).
[0145] Optionally, the memory stores executable software modules or data structures, and the processor can perform corresponding operations by calling operation instructions stored in the memory (the operation instructions can be stored in the operating system).
[0146] Optionally, the chip can be used in the online decompression device involved in the embodiment of the present application. Optionally, the interface circuit 702 can be used to output the execution result of the processor 701. The online decompression method provided by one or more embodiments of the embodiment of the present application can refer to the above embodiments, which will not be repeated here.
[0147] It should be noted that the functions corresponding to the processor 701 and the interface circuit 702 can be implemented through hardware design, software design, or a combination of hardware and software, and there is no limitation here.
[0148] An embodiment of the present application also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an online decompression device, the online decompression device executes the above-mentioned related method steps to implement the online decompression method in the above-mentioned embodiment.
[0149] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the online decompression method in the above-mentioned embodiment.
[0150] The embodiment of the present application also provides an online decompression device, which can be a chip, an integrated circuit, a component or a module. Specifically, the device may include a connected processor and a memory for storing instructions, or the device includes at least one processor for obtaining instructions from an external memory. When the device is running, the processor can execute instructions so that the chip executes the online decompression method in the above-mentioned method embodiments.
[0151] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0152] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0154] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0155] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0157] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0158] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An online decompression device, It is characterized in that The device comprises: a file control module and a decompression module; The file control module is used to receive a decompression request from the processor, wherein the decompression request is used to instruct to decompress the file to be decompressed; The file control module is further used to move the data blocks to be decompressed in the external memory to N decompression queues according to the decompression request, wherein the data blocks to be decompressed are data blocks of the file to be decompressed; The file control module is further used to send first information to the decompression module, wherein the first information is used to instruct to perform a decompression operation on the to-be-decompressed data blocks in the first decompression queue, and the first decompression queue is any decompression queue among the N decompression queues; The decompression module is used to decompress the to-be-decompressed data blocks in the first decompression queue into an internal memory according to the first information; The decompression module is further used to send second information to the file control module, where the second information is used to indicate that the to-be-decompressed data blocks in the first decompression queue have been decompressed into the internal memory.
2. The device according to claim 1, It is characterized in that The file control module is also used for: Sending third information to the decompression module, wherein the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
3. The device according to claim 1 or 2, It is characterized in that The file control module is also used for: Sending fourth information to the processor, where the fourth information is used to indicate that the file to be decompressed has been decompressed.
4. The device according to any one of claims 1 to 3, It is characterized in that The file control module is also used for: A plurality of data blocks to be decompressed are generated according to the file to be decompressed.
5. The device according to any one of claims 1 to 4, It is characterized in that The device also includes: a coordination module; The coordination module is used to receive the first information from the control module; The coordination module is further used to send fifth information to the decompression module, where the fifth information is used to instruct to perform a decompression operation on the to-be-decompressed data blocks in the first decompression queue; The coordination module is further used to receive the second information from the decompression module; The coordination module is further used to send sixth information to the control module, where the sixth information is used to indicate that the to-be-decompressed data blocks in the first decompression queue have been decompressed into the internal memory.
6. The device according to any one of claims 1 to 5, It is characterized in that The device also includes: a coordination module; The coordination module is used to receive third information from the control module, where the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed; The coordination module is further used to send seventh information to the decompression module, where the seventh information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and that the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
7. The device according to any one of claims 1 to 6, It is characterized in that The N decompression queues are arranged in the online decompression device or in the internal memory.
8. An online decompression method, It is characterized in that include: receiving a decompression request from a processor, wherein the decompression request is used to instruct decompression of a to-be-decompressed file; Moving the data blocks to be decompressed in the external memory to N decompression queues according to the decompression request, the data blocks to be decompressed are data blocks of the file to be decompressed; Sending first information to the decompression module, where the first information is used to instruct to perform a decompression operation on a to-be-decompressed data block in a first decompression queue, where the first decompression queue is any one of the N decompression queues; decompressing the to-be-decompressed data blocks in the first decompression queue into an internal memory according to the first information; Sending second information to the file control module, where the second information is used to indicate that the to-be-decompressed data blocks in the first decompression queue have been decompressed into the internal memory.
9. The method according to claim 8, It is characterized in that The method further comprises: Sending third information to the decompression module, wherein the third information is used to indicate that a decompression operation is performed on the data block to be decompressed in the first decompression queue and the data block to be decompressed in the first decompression queue is the last data block of the file to be decompressed.
10. The method according to claim 8 or 9, It is characterized in that The method further comprises: Sending fourth information to the processor, where the fourth information is used to indicate that the file to be decompressed has been decompressed.
11. The method according to any one of claims 8 to 10, It is characterized in that The method further comprises: A plurality of data blocks to be decompressed are generated according to the file to be decompressed.
12. An electronic device, It is characterized in that The electronic device comprises a processor, an internal memory, an external memory and the online decompression device according to any one of claims 1 to 7.
13. A computer-readable storage medium for storing a computer program, It is characterized in that When the computer program is executed on a computer or a processor, the computer or the processor is enabled to implement the method according to any one of claims 8 to 11.
14. A computer program product comprising instructions, It is characterized in that When the instructions are executed on a computer or a processor, the computer or the processor is enabled to implement the method according to any one of claims 8 to 11.
15. A chip comprising at least one processor and a memory, It is characterized in that The at least one processor executes a program or instruction stored in the memory to implement the method according to any one of claims 8 to 11.