A data processing method, device and storage medium for reducing memory overhead

By dynamically allocating memory space according to the capacity and type of the original data block, and optimizing memory usage in combination with virtual file systems and information index files, the problem of memory waste in the existing technology is solved and more efficient memory management is achieved.

CN113835872BActive Publication Date: 2025-08-26BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010595146.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-24
Publication Date
2025-08-26
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

The prior art allocates the same memory space for various raw data blocks of different capacity during data compression, resulting in waste of memory space and increased overhead.

Method used

The memory space of the corresponding compressed data block is allocated according to the capacity of the original data block, and a proportional relationship is adopted, combining compression type and decompression identification to optimize the use of memory space, and optimize memory mapping and release through virtual file systems and information index files.

Benefits of technology

Reduces the waste of memory space, reduces memory overhead, and improves memory usage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113835872B_ABST
    Figure CN113835872B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing method, device, and storage medium for reducing memory overhead. The method includes: determining a corresponding relationship between at least one original data block and a compressed data block during a data compression process; allocating memory space for storing the corresponding compressed data block based on the capacity of the at least one original data block; and the capacity of the at least one original data block is proportional to the capacity of the memory space for storing the corresponding compressed data block. In the present disclosure, a memory space allocation method is used in which the capacity of at least one original data block is proportional to the capacity of the memory space for storing the corresponding compressed data block, so that the allocated memory space is related to the capacity of the original data block. Compared with the method of allocating the same memory space to original data blocks of different capacities in the prior art, this method saves memory space and reduces memory overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to mobile terminal data processing technology, and in particular to a data processing method, device, and storage medium for reducing memory overhead. Background Art

[0002] During the data compression process, when allocating memory space for storing the corresponding compressed data block to the at least one original data block, a fixed-capacity storage space is allocated, thereby causing a waste of memory space. Summary of the Invention

[0003] To overcome the problems existing in the related art, the present disclosure provides a data processing device and a storage medium for reducing memory overhead.

[0004] According to a first aspect of an embodiment of this document, a data processing method for reducing memory overhead is provided, which is applied to an electronic device and includes:

[0005] During the data compression process, determining a correspondence between at least one original data block and a compressed data block;

[0006] Memory space for storing the corresponding compressed data block is allocated according to the capacity of the at least one original data block; the capacity of the at least one original data block is proportional to the capacity of the memory space for storing the corresponding compressed data block.

[0007] In one embodiment, the method further comprises: determining a compression type of the at least one original data block, the compression type including a full compression type and a partial compression type, and counting a plurality of original data blocks with the same compression type included in the data segment to be processed;

[0008] A cache space is simultaneously allocated to the plurality of original data blocks with the same compression type, and the cache space is simultaneously released after compression is completed.

[0009] In one embodiment, the method further comprises:

[0010] During the simulated decompression process, marking each compressed data block as having an in-place decompression flag;

[0011] During the actual decompression process, it is determined whether the compressed data block carries an in-place decompression flag. If it carries the in-place decompression flag, the memory pages allocated by the virtual file system are used to store the decompressed data. If it does not carry the in-place decompression flag, the capacity of the memory space to be applied for storing the decompressed data is determined. When the capacity is greater than the maximum continuous free space capacity in the currently available memory block, new memory space is applied for storing the decompressed data.

[0012] In one embodiment, the method further comprises:

[0013] Recording identifiers of a plurality of uncompressed original data blocks corresponding to the compressed data block in an information index file of the compressed data block;

[0014] During data decompression, a compressed data block is read into a memory; a plurality of uncompressed original data blocks corresponding to the compressed data block are determined according to an information index file of the compressed data block;

[0015] Allocate memory pages for each raw data block;

[0016] Mapping the memory page configured for the original data block to a virtual space of continuous addresses;

[0017] A decompression algorithm is called to decompress the data in the virtual space.

[0018] In one embodiment, determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to the information index file of the compressed data block includes:

[0019] Determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to type information and position information of the original data block in the information index file of the compressed data block;

[0020] The type information includes: a starting data block type and a non-starting data block type; and the position information includes position indication information of each non-starting data block compared to the starting data block.

[0021] According to a second aspect of an embodiment of this document, a data processing device for reducing memory overhead is provided, which is applied to an electronic device and includes:

[0022] A first determining module is configured to determine a correspondence between at least one original data block and a compressed data block during a data compression process;

[0023] The first allocation module is configured to allocate memory space for storing corresponding compressed data blocks according to the capacity of the at least one original data block; the capacity of the at least one original data block is proportional to the capacity of the memory space for storing corresponding compressed data blocks.

[0024] In one embodiment, the device further comprises:

[0025] A second determining module is configured to determine a compression type of the at least one original data block, where the compression type includes a full compression type and a partial compression type;

[0026] A statistics module is configured to count a plurality of original data blocks with the same compression type contained in the data segment to be processed;

[0027] The second allocation module is configured to simultaneously allocate cache intervals to the multiple original data blocks with the same compression type, and simultaneously release the cache space after compression is completed.

[0028] In one embodiment, the device further comprises:

[0029] A marking module, used for marking whether each compressed data block has an in-place decompression flag during the simulated decompression process;

[0030] A judgment module, used for judging whether the compressed data block carries an in-place decompression flag during the actual decompression process;

[0031] The storage module is used to use the memory pages allocated by the virtual file system to store the decompressed data when carrying the in-place decompression flag, and when not carrying the in-place decompression flag, determine the capacity of the memory space to be applied for storing the decompressed data, and apply for new memory space to store the decompressed data when the capacity is greater than the maximum continuous free space capacity in the currently available memory block.

[0032] In one embodiment, the device comprises:

[0033] a recording module, configured to record, in an information index file of a compressed data block, identifiers of a plurality of uncompressed original data blocks corresponding to the compressed data block;

[0034] The reading module is used to read a compressed data block into the memory during the data decompression process;

[0035] A third allocation module is configured to determine, based on the information index file of the compressed data block, a plurality of uncompressed original data blocks corresponding to the compressed data block; allocate a memory page to each original data block; and map the memory page configured for the original data block to a virtual space of continuous addresses;

[0036] The calling module is used to call a decompression algorithm to decompress the data in the virtual space.

[0037] In one embodiment, the third allocation module is further configured to determine a plurality of uncompressed original data blocks corresponding to the compressed data block according to the information index file of the compressed data block using the following method:

[0038] Determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to type information and position information of the original data block in the information index file of the compressed data block;

[0039] The type information includes: a starting data block type and a non-starting data block type; and the position information includes position indication information of each non-starting data block compared to the starting data block.

[0040] According to a third aspect of the embodiments of this document, there is provided a data processing device, including:

[0041] processor;

[0042] a memory for storing processor-executable instructions;

[0043] The processor is configured to execute the executable instructions in the memory to implement the steps of the above method.

[0044] According to a fourth aspect of the embodiments of this document, a non-temporary computer-readable storage medium is provided, on which executable instructions are stored, characterized in that the executable instructions implement the steps of the above method when executed by a processor.

[0045] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: using a memory space allocation method in which the capacity of at least one original data block is proportional to the capacity of the memory space used to store the corresponding compressed data block, so that the allocated memory space is related to the capacity of the original data block. Compared with the method of allocating the same memory space to original data blocks of various capacities in the prior art, memory space is saved and memory overhead is reduced.

[0046] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0048] Figure 1 is a flow chart showing a data processing method for reducing memory overhead according to an exemplary embodiment;

[0049] Figure 2 is a schematic diagram showing a corresponding relationship between an original data block and a compressed data block according to an exemplary embodiment;

[0050] Figure 3 is a structural diagram of a data processing device for reducing memory overhead according to an exemplary embodiment;

[0051] Figure 4 The figure is a structural diagram of a data processing device for reducing memory overhead according to an exemplary embodiment. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0053] The present disclosure provides a data processing method. Figure 1 , Figure 1 FIG. 1 is a flow chart showing a data processing method for reducing memory overhead according to an exemplary embodiment. Figure 1 As shown, this method includes:

[0054] Step S11 : during the data compression process, determining a correspondence between at least one original data block and a compressed data block.

[0055] Step S12: allocating memory space for storing corresponding compressed data blocks according to the capacity of the at least one original data block; the capacity of the at least one original data block is proportional to the capacity of the memory space for storing corresponding compressed data blocks.

[0056] The capacity of at least one original data block is proportional to the capacity of the memory space used to store the corresponding compressed data block, including: the capacity of the original data block is equal to the capacity of the memory space used to store the corresponding compressed data block. Alternatively, the ratio of the capacity of the memory space used to store the corresponding compressed data block to the capacity of the original data block is an integer greater than 1 and less than a predetermined ratio. For example, this ratio is 1.1, 1.05, 1.2, etc.

[0057] For example, if at least one original data block includes three original data blocks, the capacity of these three original data blocks is 1KB, 2KB, and 3KB, respectively. The memory space allocated to store the corresponding compressed data blocks for these three original data blocks is 6KB. However, in the prior art, each original data block is allocated the same memory capacity, for example, 4KB for each original data block. Consequently, the memory space required to store the corresponding compressed data blocks for these three original data blocks is 12KB.

[0058] In this embodiment, a memory space allocation method is used in which the capacity of at least one original data block is proportional to the capacity of the memory space used to store the corresponding compressed data block, so that the allocated memory space is related to the capacity of the original data block. Compared with the method of allocating the same memory space to original data blocks of various capacities in the prior art, this saves memory space and reduces memory overhead.

[0059] The present disclosure also provides a data processing method for reducing memory overhead, which includes: Figure 1 The method shown also includes: determining the compression type of the at least one original data block, the type including a full compression type and a partial compression type, counting multiple original data blocks with the same compression type contained in the data segment to be processed; simultaneously allocating cache intervals for the multiple original data blocks with the same compression type, and simultaneously releasing the cache space after compression is completed.

[0060] Compared with the existing technology of allocating a cache interval for each original data block in sequence according to the compression order and releasing the cache interval after use, the number of data copies can be reduced, thereby reducing the memory data processing overhead.

[0061] The present disclosure also provides a data processing method for reducing memory overhead, which includes: Figure 1 The method further includes: marking, during the simulated decompression process, whether each compressed data block has an in-place decompression flag. During the actual decompression process, determining whether the compressed data block carries the in-place decompression flag, and if the compressed data block carries the in-place decompression flag, using memory pages allocated by the virtual file system to store the decompressed data; if the compressed data block does not carry the in-place decompression flag, determining the capacity of the memory space required to store the decompressed data, and if the capacity is greater than the maximum continuous free space in the currently available memory block, applying for new memory space to store the decompressed data.

[0062] This method can reduce memory allocation overhead.

[0063] The present disclosure also provides a data processing method for reducing memory overhead, which includes: Figure 1 The method shown in the figure also includes: recording the identifiers of the plurality of uncompressed original data blocks corresponding to the compressed data block in the information index file of the compressed data block;

[0064] During data decompression, a compressed data block is read into a memory; a plurality of uncompressed original data blocks corresponding to the compressed data block are determined according to an information index file of the compressed data block;

[0065] Allocate memory pages for each raw data block;

[0066] Mapping the memory page configured for the original data block to a virtual space of continuous addresses;

[0067] A decompression algorithm is called to decompress the data in the virtual space.

[0068] The method of determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to the information index file of the compressed data block includes: determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to type information and position information of the original data blocks in the information index file of the compressed data block; the type information includes: a starting data block type and a non-starting data block type; and the position information includes position indication information of each non-starting data block compared to the starting data block.

[0069] For example: Figure 2 As shown, during the compression process, original data blocks D0, D1, D2, D3, and D4 are compressed into compressed data block C0, and original data blocks D5, D6, D7, and D8 are compressed into compressed data block C1.

[0070] During the decompression process, compressed data block C0 is read into memory. The compressed data includes an information index file, which precedes all compressed data blocks. The information index file for compressed data block C0 contains a description of the corresponding original data block. The description parameters include: whether it is a header block, the number of data blocks offset from the header block if it is not a header block, and the offset address information from the header block if it is not a header block.

[0071] The description parameters of the original data block D0 include: an identifier of the header block.

[0072] The description parameters of the original data block D1 include: an identifier that it is not a header block, a data block offset number from the header block of 1, and an offset address of address 1.

[0073] The description parameters of the original data block D2 include: an identifier that it is not a header block, a data block offset number of 2 from the header block, and an offset address of address 2.

[0074] The description parameters of the original data block D3 include: it is not a header block, the number of data block offsets from the header block is 3, and the offset address is address 3.

[0075] According to the information index file of the compressed data block C0, it is determined that the uncompressed original data blocks corresponding to the compressed data block C0 are D0, D1, D2, D3, and D4.

[0076] A physical storage page is allocated to each of the original data blocks D0, D1, D2, D3, and D4.

[0077] The physical storage pages configured for the original data blocks D0, D1, D2, D3, and D4 are mapped to a virtual space of consecutive addresses.

[0078] A decompression algorithm is called to decompress the data in the virtual space.

[0079] The present disclosure provides a data processing device for reducing memory overhead. Figure 3 , Figure 3 FIG. 1 is a structural diagram of a data processing device according to an exemplary embodiment. Figure 3 As shown, this device includes:

[0080] The first determining module 301 is configured to determine a correspondence between at least one original data block and a compressed data block during a data compression process;

[0081] The first allocation module 302 is configured to allocate memory space for storing corresponding compressed data blocks according to the capacity of the at least one original data block; the capacity of the at least one original data block is proportional to the capacity of the memory space for storing corresponding compressed data blocks.

[0082] The present disclosure also provides a data processing device for reducing memory overhead, which includes: Figure 3 The device as shown, and the device also includes:

[0083] A second determining module is configured to determine a compression type of the at least one original data block, where the compression type includes a full compression type and a partial compression type;

[0084] A statistics module is configured to count a plurality of original data blocks with the same compression type contained in the data segment to be processed;

[0085] The second allocation module is configured to simultaneously allocate cache intervals to the multiple original data blocks with the same compression type, and simultaneously release the cache space after compression is completed.

[0086] The present disclosure also provides a data processing device for reducing memory overhead, which includes: Figure 3 The device as shown, and the device also includes:

[0087] A marking module, used for marking whether each compressed data block has an in-place decompression flag during the simulated decompression process;

[0088] A judgment module, used for judging whether the compressed data block carries an in-place decompression flag during the actual decompression process;

[0089] The storage module is used to use the memory pages allocated by the virtual file system to store the decompressed data when carrying the in-place decompression flag, and when not carrying the in-place decompression flag, determine the capacity of the memory space to be applied for storing the decompressed data, and apply for new memory space to store the decompressed data when the capacity is greater than the maximum continuous free space capacity in the currently available memory block.

[0090] The present disclosure also provides a data processing device for reducing memory overhead, which includes: Figure 3 The device as shown, and the device also includes:

[0091] a recording module, configured to record, in an information index file of a compressed data block, identifiers of a plurality of uncompressed original data blocks corresponding to the compressed data block;

[0092] The reading module is used to read a compressed data block into the memory during the data decompression process;

[0093] A third allocation module is configured to determine, based on the information index file of the compressed data block, a plurality of uncompressed original data blocks corresponding to the compressed data block; allocate a memory page to each original data block; and map the memory page configured for the original data block to a virtual space of continuous addresses;

[0094] The calling module is used to call a decompression algorithm to decompress the data in the virtual space.

[0095] In one embodiment, the third allocation module is further configured to determine a plurality of uncompressed original data blocks corresponding to the compressed data block according to the information index file of the compressed data block using the following method:

[0096] Determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to type information and position information of the original data block in the information index file of the compressed data block;

[0097] The type information includes: a starting data block type and a non-starting data block type; and the position information includes position indication information of each non-starting data block compared to the starting data block.

[0098] Figure 4 FIG4 is a block diagram illustrating an apparatus 400 for data processing to reduce memory overhead according to an exemplary embodiment. For example, apparatus 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0099] Reference Figure 4 , apparatus 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

[0100] Processing component 402 generally controls the overall operation of device 400, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the above-described method. In addition, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 405 and processing component 402.

[0101] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0102] The power supply component 406 provides power to the various components of the device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 400.

[0103] The multimedia component 405 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 405 includes a front camera and / or a rear camera. When the device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0104] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC) that is configured to receive external audio signals when the device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.

[0105] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0106] The sensor assembly 414 includes one or more sensors for providing various aspects of the status assessment of the device 400. For example, the sensor assembly 414 can detect the open / closed state of the device 400, the relative positioning of components, such as the display and keypad of the device 400. The sensor assembly 414 can also detect changes in the position of the device 400 or a component of the device 400, the presence or absence of user contact with the device 400, the orientation or acceleration / deceleration of the device 400, and temperature changes of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0107] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0108] In an exemplary embodiment, the apparatus 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.

[0109] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by the processor 420 of the apparatus 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0110] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.

[0111] It should be understood that the present invention is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A data processing method for reducing memory overhead, characterized in that: Used in electronic equipment, including: During the data compression process, determining a correspondence between at least one original data block and a compressed data block; Allocating memory space for storing the corresponding compressed data block according to the capacity of the at least one original data block; the capacity of the at least one original data block is proportional to the capacity of the memory space for storing the corresponding compressed data block; Recording identifiers of a plurality of uncompressed original data blocks corresponding to the compressed data block in an information index file of the compressed data block; During data decompression, a compressed data block is read into a memory; a plurality of uncompressed original data blocks corresponding to the compressed data block are determined according to an information index file of the compressed data block; Allocate memory pages for each raw data block; Mapping the memory page configured for the original data block to a virtual space of continuous addresses; A decompression algorithm is called to decompress the data in the virtual space.

2. The data processing method according to claim 1, wherein: The method further includes: determining a compression type of the at least one original data block, the compression type including a complete compression type and a partial compression type, and counting a plurality of original data blocks with the same compression type contained in the data segment to be processed; A cache space is simultaneously allocated to the plurality of original data blocks with the same compression type, and the cache space is simultaneously released after the compression is completed.

3. The data processing method according to claim 1, wherein: The method further comprises: During the simulated decompression process, marking each compressed data block as having an in-place decompression flag; During the actual decompression process, it is determined whether the compressed data block carries an in-place decompression flag. If it carries the in-place decompression flag, the memory pages allocated by the virtual file system are used to store the decompressed data. If it does not carry the in-place decompression flag, the capacity of the memory space to be applied for storing the decompressed data is determined. When the capacity is greater than the maximum continuous free space capacity in the currently available memory block, new memory space is applied for storing the decompressed data.

4. The data processing method according to claim 1, wherein: Determining, according to the information index file of the compressed data block, a plurality of uncompressed original data blocks corresponding to the compressed data block, comprising: Determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to type information and position information of the original data block in the information index file of the compressed data block; The type information includes: a starting data block type and a non-starting data block type; and the position information includes position indication information of each non-starting data block compared to the starting data block.

5. A data processing device for reducing memory overhead, characterized in that: Used in electronic equipment, including: A first determining module is configured to determine a correspondence between at least one original data block and a compressed data block during a data compression process; a first allocation module configured to allocate memory space for storing the corresponding compressed data block according to the capacity of the at least one original data block; the capacity of the at least one original data block is proportional to the capacity of the memory space for storing the corresponding compressed data block; a recording module, configured to record, in an information index file of a compressed data block, identifiers of a plurality of uncompressed original data blocks corresponding to the compressed data block; The reading module is used to read a compressed data block into the memory during the data decompression process; A third allocation module is configured to determine, based on the information index file of the compressed data block, a plurality of uncompressed original data blocks corresponding to the compressed data block; allocate a memory page to each original data block; and map the memory page configured for the original data block to a virtual space of continuous addresses; The calling module is used to call a decompression algorithm to decompress the data in the virtual space.

6. The data processing device according to claim 5, wherein: The device further comprises: A second determining module is configured to determine a compression type of the at least one original data block, where the compression type includes a full compression type and a partial compression type; A statistics module is configured to count a plurality of original data blocks with the same compression type contained in the data segment to be processed; The second allocation module is configured to simultaneously allocate cache intervals to the multiple original data blocks with the same compression type, and simultaneously release the cache space after the compression is completed.

7. The data processing device according to claim 5, wherein: The device further comprises: A marking module, used for marking whether each compressed data block has an in-place decompression flag during the simulated decompression process; A judgment module, used for judging whether the compressed data block carries an in-place decompression flag during the actual decompression process; The storage module is used to use the memory pages allocated by the virtual file system to store the decompressed data when carrying the in-place decompression flag, and when not carrying the in-place decompression flag, determine the capacity of the memory space to be applied for storing the decompressed data, and apply for new memory space to store the decompressed data when the capacity is greater than the maximum continuous free space capacity in the currently available memory block.

8. The data processing device according to claim 5, wherein: The third allocation module is further configured to determine a plurality of uncompressed original data blocks corresponding to the compressed data block according to the information index file of the compressed data block using the following method: Determining a plurality of uncompressed original data blocks corresponding to the compressed data block according to type information and position information of the original data block in the information index file of the compressed data block; The type information includes: starting data block type and non-starting data block type; The position information includes position indication information of each non-starting data block compared to the starting data block.

9. A data processing device, characterized in that: include: processor; memory for storing processor-executable instructions; The processor is configured to execute the executable instructions in the memory to implement the steps of the method according to any one of claims 1 to 4.

10. A non-transitory computer-readable storage medium having executable instructions stored thereon, characterized in that: When the executable instruction is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Solid state storage capacity management systems and methods

    CN107688437A

  • Tensor data block access method and device

    CN111079917A