A data access system, method, processor and electronic device

By storing compressed data and compressed information in the same storage address and using a compression/decompression engine to generate compressed data blocks, the problem of additional memory access in traditional solutions is solved, improving the system's access performance and data transmission efficiency.

CN122173461APending Publication Date: 2026-06-09T-HEAD (SHANGHAI) SEMICON CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In traditional solutions, compressed data and compressed information are stored in different memory address spaces, which means that each access request needs to access memory twice, introducing additional latency and bandwidth overhead, and affecting system performance.

Method used

The compressed data and corresponding compressed information are stored in the same storage address. The compression and decompression engine compresses and decompresses the data to be compressed, generates compressed data blocks, and stores the compressed data blocks and compressed information, including compression identifier, compression length and data compression method, in the data storage unit.

Benefits of technology

This avoids additional memory access to compressed information, improves system access performance, and enhances data transmission efficiency and computing resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173461A_ABST
    Figure CN122173461A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data access system, method, processor and electronic device, the data access system comprises a compression and decompression engine and a data storage unit, the compression and decompression engine is configured to compress to-be-compressed data to obtain corresponding compressed data blocks, and decompress to-be-decompressed data to obtain read data, the data storage unit is configured to store data blocks, the data blocks comprise the compressed data blocks and uncompressed data blocks, the compressed data blocks comprise compressed data and compression information, the compression information comprises a data compression mode, a compression length and a compression identifier used for marking the compressed data blocks, the data access system stores the compressed data and corresponding compression information in the same storage address, avoids additional memory access of the compression information when the compressed data is accessed, and improves system access performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semiconductor technology, and more specifically, to a data access system, method, processor, and electronic device. Background Technology

[0002] Faced with ever-increasing demands for computing power, chips are integrating more and more computing units. During data processing, these units calculate and update hundreds of millions of parameters. If memory bandwidth is insufficient, data transmission speed becomes a bottleneck limiting overall data processing speed, resulting in the underutilization of expensive computing resources. To address the constraint of memory bandwidth, memory compression technology has emerged.

[0003] In traditional solutions, compressed information and data are stored in different memory address spaces. Each access request requires two memory accesses: the first access to the compressed information space to determine the compressed length, and then the second access to the data space to obtain the compressed data. While compressing data saves bandwidth, accessing compressed information introduces additional latency and bandwidth overhead, and may even cause a degradation in performance. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a data access system, method, processor, and electronic device to store compressed data and corresponding compressed information in the same storage address, thereby avoiding additional memory access to compressed information when accessing compressed data and improving the access performance of the system.

[0005] In a first aspect, embodiments of the present invention provide a data access system, the data access system comprising:

[0006] The compression / decompression engine is configured to compress the data to be compressed to obtain the corresponding compressed data blocks, and to decompress the data to be decompressed to obtain the data to be read.

[0007] A data storage unit is configured to store data blocks, the data blocks including compressed data blocks and uncompressed data blocks, the compressed data blocks including compressed data and compression information, the compression information including data compression method, compression length and compression identifier for marking the compressed data blocks.

[0008] In a second aspect, embodiments of the present invention provide a data access method applicable to a data access system, the data access system including a data storage unit, the data storage unit being configured to store data blocks, the data blocks including compressed data blocks and uncompressed data blocks, the data access method including:

[0009] Data write request;

[0010] In response to the data write request carrying a compression instruction, the data to be compressed carried by the data write request is compressed to generate a corresponding compressed data block. The compressed data block includes compressed data and compression information. The compression information includes data compression method, compression length, and compression identifier for marking the compressed data block.

[0011] The compressed data block is stored in the data storage unit.

[0012] Thirdly, embodiments of the present invention provide a data access method applicable to a data access system, the data access system including a data storage unit, the data storage unit being configured to store data blocks, the data blocks including compressed data blocks and uncompressed data blocks, the data access method including:

[0013] Obtain a data read request, the data read request including the access address and data length;

[0014] Read the corresponding data block from the data storage unit according to the access address;

[0015] In response to the read data block having a corresponding compression identifier, the data block is decompressed based on the data compression method and compression length in the data block to obtain the data block to be fed back;

[0016] The feedback refers to the data block to be fed back.

[0017] Fourthly, embodiments of the present invention provide a processor including a plurality of processing cores, the processing cores running the data access system as described in the first aspect.

[0018] Fifthly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the processor is the processor described in the fourth aspect, and the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor according to a corresponding method.

[0019] The data access system of this invention includes a compression / decompression engine and a data storage unit. The compression / decompression engine is configured to compress data to be compressed to obtain corresponding compressed data blocks, and to decompress data to be decompressed to obtain read data. The data storage unit is configured to store data blocks, which include the compressed data blocks and uncompressed data blocks. The compressed data blocks include compressed data and compression information. The compression information includes a data compression method, a compression length, and a compression identifier for marking the compressed data blocks. The data access system stores the compressed data and the corresponding compression information in the same storage address, avoiding additional memory access to the compressed information when accessing the compressed data, thus improving the system's access performance. Attached Figure Description

[0020] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0021] Figure 1 This is a schematic diagram of a data access system according to an embodiment of the present invention;

[0022] Figure 2 This is a schematic diagram of the structure of a compressed data block according to an embodiment of the present invention;

[0023] Figure 3 This is a schematic diagram illustrating the mapping of the flipped identifier storage area in the data storage unit according to an embodiment of the present invention;

[0024] Figure 4 This is a flowchart of a data access method according to an embodiment of the present invention;

[0025] Figure 5 This is a flowchart of a data access method according to an embodiment of the present invention;

[0026] Figure 6 This is a data flow diagram of the data access system in this embodiment of the invention when writing compressed data;

[0027] Figure 7 This is a data flow diagram of the data access system in this embodiment of the invention when writing uncompressed data;

[0028] Figure 8 This is a data flow diagram of the data access system in this embodiment of the invention when reading compressed data;

[0029] Figure 9 This is a data flow diagram of the data access system in this embodiment of the invention when reading compressed data;

[0030] Figure 10 This is a data flow diagram of the data access system in this embodiment of the invention when reading uncompressed data;

[0031] Figure 11 This is a flowchart of a data writing method applicable to a data access system according to an embodiment of the present invention;

[0032] Figure 12 This is a flowchart of a data reading method applicable to a data access system according to an embodiment of the present invention;

[0033] Figure 13 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0034] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0035] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0036] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".

[0037] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0038] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only under the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.

[0039] The explosive growth of generative AI has brought about a new wave in the development of artificial intelligence. Rapid iteration of large models requires massive computing power. Faced with this ever-increasing demand, chips are integrating more and more computing units. During the training of large models, these units calculate and update hundreds of millions of parameters. Each iteration of the model requires reading large amounts of training data from memory and writing back the updated parameter values. If memory bandwidth is insufficient, the data transfer speed becomes a bottleneck limiting the overall training speed, resulting in underutilization of computing resources. Therefore, memory bandwidth, i.e., the total amount of data that can be transferred per second between memory and computing units, has become a key bottleneck for improving computing performance.

[0040] To address the limitations of memory bandwidth, memory compression technology has emerged. Memory compression aims to improve memory transfer efficiency by reducing the amount of data required for storage and transmission through algorithms. These techniques include data redundancy removal, encoding optimization, and compressed information caching. By applying memory compression technology, the amount of data accessed per memory session can be reduced without sacrificing data integrity and accuracy, allowing computing units to obtain and process data more quickly.

[0041] Memory compression can be implemented at multiple levels. For example, at the hardware level, memory controllers that support compression algorithms can be designed. In some cases, the computing core can also operate directly on the compressed data, thus avoiding the overhead of decompression. At the software level, the required memory space can be reduced by optimizing data structures and storage formats. In traditional solutions, compressed information (such as the compressed data length and compression algorithm selection) and the actual data are stored in different memory address spaces. Each access request requires two memory accesses: the first access to the compressed information space to determine the compressed length, and then the second access to the data space to obtain the compressed data. While compressing the data saves bandwidth, accessing the compressed information introduces additional latency and bandwidth overhead, and may even cause a performance degradation.

[0042] To address the aforementioned issues, this invention provides a data access system based on the coexistence of compressed information and compressed data. This system stores compressed information and its corresponding compressed data in the same address, thereby avoiding additional access to the compressed information.

[0043] Figure 1 This is a schematic diagram of a data access system according to an embodiment of the present invention. Figure 1 As shown, the data access system 100 includes a compression / decompression engine 110 and a data storage unit 120.

[0044] The compression / decompression engine 110 is configured to compress the data to be compressed to obtain the corresponding compressed data block, and to decompress the data to be decompressed to obtain the read data.

[0045] Specifically, the compression / decompression engine 110's main functions are divided into two parts: data compression and data decompression. Data compression involves encoding and converting the original data (i.e., the data to be compressed) to reduce the storage space it occupies. Data compression algorithms replace repetitive information or patterns with shorter code representations, thus achieving compression. This is significant for saving storage space and reducing network transmission bandwidth. When compressed data is needed, the uncompressed version, identical or nearly identical to the original data, is restored by reversing the corresponding data compression algorithm. This ensures data integrity and availability while achieving the goals of efficient storage and fast transmission.

[0046] In one possible implementation, the compression / decompression engine 110 can not only maintain a high compression ratio while ensuring low computational overhead, but also be optimized for different application scenarios and data types. For example, in video streaming processing, the compression / decompression engine may need to prioritize compression speed over compression ratio, while in file archiving scenarios, it may focus more on compression ratio and the size of the compressed file.

[0047] In one possible implementation, the compression / decompression engine 110 also provides encryption functionality, which can encrypt data during the compression process to ensure that even if the data is intercepted during transmission, it cannot be easily deciphered, thereby increasing data security.

[0048] In one possible implementation, the data compression algorithm described above can be a Lempel-Ziv (LZ) series algorithm, such as LZ77, LZ78, DEFLATE, LZW (Lempel-Ziv-Welch), LZMA (Lempel-Ziv-Markov chain Algorithm), LZ4, and Snappy, etc. It can also be a dictionary encoding, such as Huffman coding or arithmetic coding. It is easy to understand that the algorithms described above are merely examples, and any data compression algorithm can be selected according to the actual application scenario and usage requirements.

[0049] The data storage unit 120 is configured to store data blocks, including compressed data blocks and uncompressed data blocks. The compressed data blocks include compressed data and compression information, including data compression method, compression length, and compression identifier (Compression ID, CID) for marking the compressed data blocks.

[0050] Specifically, data storage unit 120 is memory or a sub-memory storage unit. Besides storing compressed data blocks, data storage unit 120 can also store uncompressed data blocks. Adding compressed information to compressed data blocks not only avoids separate memory access to the compressed information but also distinguishes between compressed and uncompressed data blocks. Furthermore, within a compressed data block, to distinguish whether a segment of data is compressed information or compressed data itself, a fixed sequence can be added as a compression identifier. When the compression identifier is identified, it can be used as a reference to determine other compressed information and compressed data based on relative distance. In summary, the compression identifier is used to mark compressed data blocks. The compression length is used for memory access, and the data compression method is used to determine the decompression method during decompression. The data compression method here can be a pre-set and stored data compression algorithm code, such as the pre-set LZ77 algorithm corresponding to number 000000, the LZ78 algorithm corresponding to number 000001, the DEFLATE algorithm corresponding to number 000010, the LZW (Lempel-Ziv-Welch) algorithm corresponding to number 000011, etc.

[0051] Figure 2 This is a schematic diagram of the structure of a compressed data block according to an embodiment of the present invention. Figure 2 As shown, the compressed data block 200 includes compressed data 210 and compressed information 220.

[0052] The compression information 220 includes compression identifier 221, compression length 222, and data compression method 223.

[0053] The storage locations for the above-mentioned data types are in a pre-defined fixed pattern. For example, assuming the size of the compressed data block is 128B, the data from low to high bits are as follows: 24 bits for the compression identifier, 2 bits for the compression length (0 / 1 / 2 / 3 represent 32B / 64B / 96B respectively), 6 bits for the data compression method (supporting 64 data compression algorithms), and 992 bits for the compressed data.

[0054] It should be noted that if the size of the data to be compressed is 128B, and the compressed data block is still between 96B and 108B, then the compression has failed.

[0055] Optionally, after confirming that compression has failed, you can try to compress again until compression is successful.

[0056] Optionally, after determining that compression has failed, a compression failure message can be output, and a request can be made to obtain a recompression instruction or an instruction to store the data block in an uncompressed data block format.

[0057] Optionally, after retrying compression a predetermined number of times but still failing, a compression failure message is output, and the data block is stored in the data format of an uncompressed data block.

[0058] When reading data, if the lower 24 bits match the given compression identifier, the data is considered to be compressed data, and its compressed length is stored in bits [25:24]. The decompression engine selects the corresponding decompression algorithm according to the compression method stored in bits [31:26].

[0059] Therefore, by using a method that coexists compressed information and data, all information can be obtained with a single access. Utilizing the remaining space after data compression to store compressed information, and storing compressed information and its corresponding compressed data at the same address, avoids the need to retrieve compressed information separately. Although this affects the compression ratio, the short length of the compressed information will not significantly impact the overall compression performance.

[0060] The length of the above-mentioned compressed information can be adjusted according to the actual situation. The length of the data compression method is related to the number of data compression algorithms supported by the compression and decompression engine 110. The more data compression algorithms supported by the compression and decompression engine 110, the longer the data compression method will be. The length of the compression identifier is related to the compression efficiency and obfuscation rate.

[0061] Specifically, the compression identifier introduced to address the issue of compressed information confusion is itself susceptible to confusion. The lower bits of an uncompressed data block may contain the same value as the compression identifier. Therefore, it is necessary to distinguish whether the lower bits of a data block are part of the uncompressed data block itself or the compression identifier of the compressed data. The probability of confusion is 2. -l Where l is the length of the compression identifier. The longer the compression identifier, the lower the probability of obfuscation. The appropriate length of the compression identifier needs to be determined in conjunction with the total memory space. Increasing the length can reduce the probability of obfuscation, but it will also have a greater impact on compression efficiency. Therefore, the length of the compression identifier can be determined based on the compression efficiency and obfuscation rate in actual applications.

[0062] In one possible implementation, a flipped identifier can be introduced to avoid the aforementioned problem of confusion in the compressed identifier, thereby shortening the length of the compressed identifier.

[0063] Specifically, the data storage unit is divided into a data block storage area 121 and a flip identifier storage area 122. The data block storage area 121 is configured to store the data blocks, and the flip identifier storage area 122 is configured to store flip identifiers. The flip identifiers are used to mark whether the value at a predetermined position of the data block is equal to the compressed identifier after flipping.

[0064] Specifically, when a data block is an uncompressed data block and the value in the lower bits (i.e., the predetermined position) of the uncompressed data block is the same as the compression identifier, the value in the predetermined position can be flipped to distinguish it from the compression identifier, and the flipped identifier is updated to the first value. Further, the value in the lower bits (i.e., the predetermined position) of the uncompressed data block may be the same as the flipped compression identifier. In this case, it is also necessary to distinguish between "the value after flipping the value in the predetermined position to distinguish it from the compression identifier" and "the value in the lower bits of the uncompressed data block itself that is the same as the flipped compression identifier." Optionally, the flipped identifier of the latter (i.e., the uncompressed data block whose lower bits are the same as the flipped compression identifier) ​​is determined as the second value. Optionally, the first value is 1, and the second value is 0. It should be understood that this embodiment does not limit the specific value of the flipped identifier; it only needs to be able to identify whether the lower bits of the uncompressed data block that meets the conditions have been flipped. The uncompressed data blocks that meet the conditions include uncompressed data blocks whose lower bits are the same as the compression identifier and the flipped identifiers corresponding to uncompressed data blocks whose lower bits are the same as the flipped compression identifier.

[0065] Except for the situations described above, there is no confusion regarding the flip identifier, so it is not necessary to determine or update the flip identifier in any other case. Specifically, when the data block is an uncompressed data block and the value at the predetermined position is different from both the compression identifier and the flipped compression identifier, it is not necessary to flip the value at the predetermined position of the data block based on the flip identifier. When the data block is a compressed data block, the predetermined position will necessarily contain the compression identifier, so it is also not necessary to flip the value at the predetermined position of the data block. Therefore, it is not necessary to use the flip identifier in any of these cases.

[0066] Optionally, no corresponding flip flag is set for "uncompressed data blocks whose predetermined positions are the same as the flipped compression flag". When reading an uncompressed data block, if the value at the predetermined position of the uncompressed data block is equal to the flipped compression flag, the corresponding flip flag is queried. If the flip flag can be found, it means that the value at the predetermined position of the uncompressed data block was flipped during writing, and it needs to be flipped back when reading the data. If the flip flag cannot be found, it means that the value at the predetermined position of the uncompressed data block has not been flipped, and it can be read directly. For example, if the value at the predetermined position of uncompressed data block A is equal to the compression flag, and the value at the predetermined position of uncompressed data block B is equal to the flipped compression flag, there is no risk of confusion with the compression flag when writing uncompressed data block B, so the value at the predetermined position is not flipped. When writing uncompressed data block A, the value at a predetermined position is flipped to distinguish it from the compressed identifier. However, this can be confused with data blocks like uncompressed data block B (where the value at the predetermined position equals the flipped compressed identifier). Therefore, a flip identifier can be added to differentiate between these two cases. That is, an uncompressed data block A is associated with a flip identifier, while uncompressed data block B is not. When reading an uncompressed data block, if the value at the predetermined position is found to equal the flipped compressed identifier, the corresponding flip identifier is queried. If the compressed identifier is found, the data block is an uncompressed data block like uncompressed data block A that requires flipping; if it is not found, the data block is an uncompressed data block like uncompressed data block B that does not require flipping.

[0067] It is worth noting that the flip identifier storage area 122 stores the flip identifier addresses of various types of data blocks. If a data block has a corresponding flip identifier, the corresponding flip identifier is stored in the corresponding address. If a data block does not have a corresponding flip identifier, the corresponding flip identifier address may not store a value, or may store an invalid value. An invalid value is a value that is different from the flip identifier of an uncompressed data block.

[0068] Optionally, "compressed data blocks" and "uncompressed data blocks whose value at a predetermined position is neither equal to the compression identifier nor equal to the flipped compression identifier" do not have corresponding flip identifiers, and the flip identifier address mapped to the data block address is either not stored or contains an invalid value. The flip identifier for "uncompressed data blocks whose value at a predetermined position is equal to the compression identifier" is a first value, which is stored in the corresponding position at the flip identifier address mapped to the data block address. The flip identifier for "uncompressed data blocks whose value at a predetermined position is equal to the flipped compression identifier" is a second value, which is also stored in the corresponding position at the flip identifier address mapped to the data block address.

[0069] Optionally, "compressed data blocks," "uncompressed data blocks whose values ​​at predetermined positions are neither equal to the compression identifier nor equal to the flipped compression identifier," and "uncompressed data blocks whose values ​​at predetermined positions are equal to the flipped compression identifier" do not have corresponding flip identifiers, and the flip identifier address mapped to the data block address is either not stored or contains an invalid value. "Uncompressed data blocks whose values ​​at predetermined positions are equal to the compression identifier" do have flip identifiers, and these flip identifiers are stored in the corresponding position at the flip identifier address mapped to the data block address.

[0070] The flip identifier storage area 122 is mapped to the lower address bits. Each 128B data block corresponds to a 1-bit flip identifier. There is a mapping relationship between the storage address of the data block and the storage address of the corresponding flip identifier. For example, the storage address of the flip identifier is equal to the storage address of the corresponding data block shifted right by 10 bits. The capacity of the flip identifier storage area 122 is 1 / 1024 of the space of the data storage unit.

[0071] Figure 3 This is a schematic diagram illustrating the mapping of the flipped identifier storage area in the data storage unit according to an embodiment of the present invention. Figure 3 As shown, assuming the data storage unit has a capacity of 1GB, the capacity of the flipped identifier storage area is 1MB.

[0072] In one possible implementation, the data access system further includes a data transceiver unit 130, which is configured to receive data access requests and corresponding request responses.

[0073] Specifically, the data transceiver unit 130 is the Last Level Cache (LLC), a shared cache level located among all cores in modern multi-core processor architectures. In a multi-level cache architecture, each CPU core typically has its own private L1 cache and L2 cache, while the LLC is a large cache shared by all cores, located at the bottom of the cache hierarchy. The LLC is designed to reduce memory access latency, improve data access speed, and thus enhance overall system performance; it serves as the entry point for memory access.

[0074] The data access system based on the above embodiments can already store compressed information and compressed data together, avoiding separate access to compressed information. For data write requests, the bandwidth occupied during data writing has been optimized. However, for data read requests, compressed information can be cached to maximize the bandwidth benefits of data read.

[0075] In one possible implementation, the data access system further includes a compressed length cache unit 140 and a data processing unit 150.

[0076] The compression length cache unit 140 is configured to store the compression length corresponding to each of the compressed data blocks. The data processing unit 150 is configured to adjust the corresponding data access request according to the compression length of the accessed compressed data block, wherein the data access request includes an access address and a data length.

[0077] Specifically, since the data processed by the last-level cache is already decompressed and uncompressed, when it issues a data read request to memory, it doesn't know whether the corresponding data in memory is in compressed format. Therefore, it defaults to requesting the complete data block. If the requested data is in compressed format, the actual length will be less than the default data bandwidth, leading to bandwidth waste. Compressed length caching is designed to solve this problem. The compressed length cache unit 140 stores the length of the data block, with each data block requiring 2 bits for representation. If there are more granular compressed lengths, only the compressed length bits need to be added. The compressed length information for all data blocks occupies a total of 1 / 512 of the memory space. Ideally, if the capacity of the compressed length cache unit 140 equals this value, there will be no cache misses. For each data read request, its actual data length can be obtained from the compressed length cache unit 140 in advance, thereby maximizing read bandwidth savings. However, considering the limited on-chip resources, the actual capacity of the compressed length cache unit 140 should be balanced between overhead and performance.

[0078] Optionally, the data processing unit 150 is further configured to generate a flip identifier for each of the data blocks, and to flip the values ​​at predetermined positions of uncompressed data blocks whose flip identifiers satisfy predetermined conditions.

[0079] In other words, the data processing unit 150 can generate corresponding flip identifiers for each of the uncompressed data blocks when writing data blocks based on the above-mentioned flip identifier setting rules, and when reading data blocks, if the value at a predetermined position of the data block is equal to the flip identifier, then the value at the predetermined position is flipped.

[0080] In one possible implementation, the data access system further includes a request management component 160, which manages records for which the compressed length is not found in the compressed length cache unit 140, and releases the record when a notification from the data processing unit 15 indicates that the compressed length has been cached.

[0081] The request management component 160, also known as the Miss Status Handling Register (MSHR), is a mechanism in the processor cache system used to manage cache miss states. A cache miss occurs when a processor core requests data that is not in its cache. MSHR tracks these miss requests, ensuring that each request is processed correctly and effectively managing multiple simultaneous misses.

[0082] Specifically, when the corresponding compressed length is not found in the compressed length cache unit 140, the request management component 160 can maintain the request state until the data processing unit 150 obtains the corresponding compressed data block, stores the compressed length in the data processing unit 150, and sends a notification to the request management component 160. After receiving the notification, the request management component 160 can release the corresponding request, so that subsequent data read requests at the same address will no longer experience cache misses, thereby saving bandwidth.

[0083] It is easy to understand that in the above data access system, apart from the compression / decompression engine 110 and the data storage unit 120, all other modules can be adjusted according to actual needs.

[0084] The data access system of this invention includes a compression / decompression engine and a data storage unit. The compression / decompression engine is configured to compress data to be compressed to obtain corresponding compressed data blocks, and to decompress data to be decompressed to obtain read data. The data storage unit is configured to store data blocks, which include the compressed data blocks and uncompressed data blocks. The compressed data blocks include compressed data and compression information. The compression information includes a data compression method, a compression length, and a compression identifier for marking the compressed data blocks. The data access system stores the compressed data and the corresponding compression information in the same storage address, avoiding additional memory access to the compressed information when accessing the compressed data, thus improving the system's access performance.

[0085] The following explanation of the data access system and the functions of its modules is based on a specific data processing flow. To facilitate the explanation of each module's function, the following explanation uses a data processing system including all the modules mentioned above as an example. However, this is easy to understand because each other module can be adjusted according to actual needs. Therefore, the data processing flow corresponding to each module in the specific processing flow is bound to the corresponding module and changes as modules are added or removed.

[0086] Figure 4 This is a flowchart of a data access method according to an embodiment of the present invention. The data access method is applicable to the data access system described in the above embodiments, such as... Figure 4As shown, the data access method includes the following steps:

[0087] Step S401: Obtain the data write request.

[0088] The data write request carries the data to be compressed and the compression instructions.

[0089] Step S402: In response to the data write request carrying a compression instruction, compress the data to be compressed carried in the data write request to generate a corresponding compressed data block.

[0090] The compressed data block includes compressed data and compression information. The compression information includes the data compression method, compression length, and compression identifier used to mark the compressed data block.

[0091] Step S403: Store the compressed data block into the data storage unit.

[0092] The data access method of this invention is applicable to a data access system, which includes a data storage unit configured to store data blocks. Each data block includes compressed and uncompressed data blocks. The method involves obtaining a data write request, responding to the data write request carrying a compression instruction, compressing the data to be compressed carried by the data write request to generate a corresponding compressed data block. The compressed data block includes compressed data and compression information. The compression information includes a data compression method, a compression length, and a compression identifier used to mark the compressed data block. The compressed data block is then stored in the data storage unit. This data access system stores compressed data and corresponding compression information at the same storage address, avoiding additional memory access to the compressed information when accessing compressed data, thus improving the system's access performance.

[0093] Figure 5 This is a flowchart of a data access method according to an embodiment of the present invention. Figure 5 As shown, the data access method includes the following steps:

[0094] Step S501: Obtain a data read request, wherein the data read request includes an access address and a data length.

[0095] Step S502: Read the corresponding data block from the data storage unit according to the access address.

[0096] Step S503: In response to the read data block having a corresponding compression identifier, the data block is decompressed based on the data compression method and compression length in the data block to obtain the data block to be fed back.

[0097] Step S504: Feedback the data block to be fed back.

[0098] The data access method of this invention is applicable to a data access system, which includes a data storage unit configured to store data blocks. Each data storage unit includes compressed and uncompressed data blocks. The method involves obtaining a data read request, which includes an access address and a data length. The corresponding data block is read from the data storage unit based on the access address. In response to the read data block having a corresponding compression identifier, the data block is decompressed based on its compression method and compression length to obtain a data block to be fed back. This data access system stores compressed data and corresponding compression information at the same storage address, avoiding additional memory access to compressed information when accessing compressed data and improving system access performance.

[0099] Figure 6 This is a data flow diagram of the data access system in an embodiment of the present invention when writing compressed data. For example... Figure 6 As shown, the data flow of the data access system when writing compressed data includes:

[0100] In step S601, the data transceiver unit 130 sends a data write request to the compression / decompression engine 110.

[0101] The data write request carries the data to be compressed and the compression instructions.

[0102] Step S602: The compression / decompression engine 110 compresses the data to be compressed.

[0103] Step S603: Compression / decompression engine 110 determines whether compression was successful.

[0104] If compression is successful, proceed to steps S604-S609; if compression is unsuccessful, proceed to steps S610-S613.

[0105] In step S604, the compression / decompression engine 110 sends compressed data blocks to the data processing unit 150.

[0106] In step S605, the data processing unit 150 generates corresponding compression information, and splices the compression information and compression data according to a pre-set fixed pattern to obtain the corresponding compressed data block.

[0107] In step S606, the data processing unit 150 sends a compressed data block to the data storage unit 120.

[0108] In step S607, the data storage unit 120 stores the compressed data block to the data block storage area 121.

[0109] In step S608, the data processing unit 150 sends the compressed length to the compressed length buffer unit 140.

[0110] Step S609: The compression length cache unit 140 stores the compression length.

[0111] In step S610, the compression / decompression engine 110 sends a compression failure notification to the data transceiver unit 130.

[0112] In step S611, the compression / decompression engine 110 sends uncompressed data blocks to the data processing unit 150.

[0113] In step S612, the data processing unit 150 sends the uncompressed data block to the data storage unit 120.

[0114] In step S613, the data storage unit 120 stores the compressed data block to the data block storage area 121.

[0115] In one possible implementation, if compression fails in step S603 above, the following can also be performed. Figure 7 Steps S702-S704 are shown.

[0116] Figure 7 This is a data flow diagram of the data access system in an embodiment of the present invention when writing uncompressed data. For example... Figure 7 As shown, the data flow of the data access system when writing uncompressed data includes:

[0117] In step S701, the data transceiver unit 130 sends a data write request to the data processing unit 150.

[0118] The data write request carries an uncompressed data block.

[0119] In step S702, the data processing unit 150 determines the corresponding flip identifier.

[0120] In one possible implementation, when the value at a predetermined position of the uncompressed data block is equal to the compression identifier, the corresponding flip identifier is determined as a first value. When the value at a predetermined position of the uncompressed data block is equal to the flipped compression identifier, the corresponding flip identifier is determined as a second value. When the value at a predetermined position of the uncompressed data block is neither equal to the compression identifier nor equal to the flipped compression identifier, it is not necessary to determine the corresponding compression identifier.

[0121] In one possible implementation, when the value at a predetermined position in the uncompressed data block equals the compression flag, the corresponding flip flag is determined to be a first value. Otherwise, it is not necessary to determine the corresponding compression flag.

[0122] In step S703, the data processing unit 150 sends an uncompressed data block and a corresponding flip identifier to the data storage unit 120.

[0123] In step S704, the data storage unit 120 stores the uncompressed data block in the data block storage area 121 and stores the flip identifier in the flip identifier storage area 122.

[0124] Figure 8 This is a data flow diagram of the data access system in this embodiment of the invention when reading compressed data. Figure 8 The data flow diagram is shown when the compressed length of the compressed data block to be read is stored in the compressed length cache unit 140.

[0125] like Figure 8 As shown, the data flow of the data access system when reading compressed data includes:

[0126] In step S801, the data transceiver unit 130 sends an initial access request to the data processing unit 150.

[0127] The initial access request carries the access address and data length.

[0128] In step S802, after receiving the initial access request, the data processing unit 150 sends a compressed length read request to the compressed length cache unit 140.

[0129] Specifically, the data processing unit 150 queries the compression length cache unit 140 according to the access address to read the corresponding compression length.

[0130] Step S803: If the corresponding compressed length is stored in the compressed length cache unit 140, the compressed length is returned to the data processing unit 150.

[0131] In step S804, the data processing unit 150 adjusts the data length to the corresponding compressed length to obtain the corresponding data read request.

[0132] In step S805, the data processing unit 150 sends a data read request to the data storage unit 120.

[0133] In step S806, the data storage unit 120 determines the compressed data block from the data block storage area 121 according to the data length.

[0134] In step S807, the data storage unit 120 returns a compressed data block to the data processing unit 150.

[0135] In step S808, the data processing unit 150 sends compressed data blocks to the compression / decompression engine 110.

[0136] In step S809, the compression / decompression engine 110 decompresses the compressed data block to obtain the decompressed data.

[0137] In step S810, the compression / decompression engine 110 sends the decompressed data to the data transceiver unit 130.

[0138] Figure 9 This is a data flow diagram of the data access system in this embodiment of the invention when reading compressed data. Figure 9 The data flow diagram is shown when the compressed length of the compressed data block to be read is not stored in the compressed length cache unit 140, as follows: Figure 9 As shown, the data flow of the data access system when reading compressed data includes:

[0139] In step S901, the data transceiver unit 130 sends an initial access request to the data processing unit 150.

[0140] The initial access request carries the access address and data length.

[0141] In step S902, after receiving the initial access request, the data processing unit 150 sends a compressed length read request to the compressed length cache unit 140.

[0142] In step S903, if the corresponding compressed length is not stored in the compressed length cache unit 140, a read failure notification is returned to the data processing unit 150.

[0143] In step S904, the data processing unit 150 sends a compression length request failure notification to the request management component 160.

[0144] Step S905: Request management component 160 to store a failure notification for compressed length request.

[0145] In step S906, the data processing unit 150 sends an initial access request to the data storage unit 120.

[0146] In step S907, the data storage unit 120 determines the compressed data block from the data block storage area 121.

[0147] In step S908, the data storage unit 120 returns a compressed data block to the data processing unit 150.

[0148] In step S909, the data processing unit 150 obtains the compression identifier from the compressed data block.

[0149] In step S910, the data processing unit 150 sends a compression identifier to the compression length buffer unit 140.

[0150] Step S911, the compression length cache unit 140 stores the compression identifier.

[0151] In step S912, the data processing unit 150 sends a release notification to the request management component 160.

[0152] Step S913: Request management component 160 to release the corresponding compression length request failure notification.

[0153] In step S914, the data processing unit 150 sends compressed data blocks to the compression / decompression engine 110.

[0154] In step S915, the compression / decompression engine 110 decompresses the compressed data block to obtain the decompressed data.

[0155] In step S916, the compression / decompression engine 110 sends the decompressed data to the data transceiver unit 130.

[0156] During the data flow described above, after successfully obtaining a compressed data block, the compression identifier of the compressed data block is stored in the compressed length cache unit 140, which helps to compensate for defects caused by cache loss. Simultaneously, the request management component 160 monitors the compressed length cache.

[0157] Figure 10 This is a data flow diagram of the data access system in an embodiment of the present invention when reading uncompressed data. For example... Figure 10 As shown, the data flow of the data access system when reading uncompressed data includes:

[0158] In step S1001, the data transceiver unit 130 sends a data read request to the data processing unit 150.

[0159] The initial access request carries the access address and data length.

[0160] In step S1002, the data processing unit 150 sends a data read request to the data storage unit 120.

[0161] In step S1003, the data storage unit 120 determines the uncompressed data block from the data block storage area 121.

[0162] In step S1004, the data storage unit 120 returns the uncompressed data block to the data processing unit 150.

[0163] In step S1005, the data storage unit 120 determines whether the value at the predetermined position of the uncompressed data block is the flipped compression identifier.

[0164] If yes, proceed to step S1006; otherwise, proceed to step 1010.

[0165] In step S1006, the data storage unit 120 sends a flip identifier acquisition request to the data storage unit 120.

[0166] In step S1007, the data storage unit 120 determines the corresponding flip identifier from the flip identifier storage area 122.

[0167] In step S1008, the data storage unit 120 returns the flip identifier to the data processing unit 150.

[0168] In step S1009, in response to the value of the flip identifier being a first value, the data processing unit 150 flips the value at a predetermined position of the read data block to generate a data block to be fed back (i.e., the flipped uncompressed data block).

[0169] In step S1010, the data processing unit 150 sends an uncompressed data block to the data transceiver unit 130.

[0170] It is worth noting that, Figures 4-8 The data flow shown is based on a data processing system that includes all the modules mentioned above. However, for ease of description, only the modules related to the corresponding data processing flow are retained. In actual use, modules can be added or deleted according to the actual situation.

[0171] Figure 11 This is a flowchart illustrating a data writing method applicable to a data access system according to an embodiment of the present invention. The data access method is applicable to the data access system described in the above embodiments, such as... Figure 11 As shown, the data writing method applicable to the data access system includes the following steps:

[0172] Step S1101: Obtain the data write request.

[0173] Step S1102: Determine whether the data write request carries a compression command.

[0174] If yes, proceed to step S1103; otherwise, proceed to step S1107.

[0175] Step S1103: Compress the data to be compressed carried in the data writing request.

[0176] The compressed data block includes compressed data and compression information. The compression information includes the data compression method, compression length, and compression identifier used to mark the compressed data block.

[0177] Step S1104: Determine whether the compression was successful.

[0178] If compression is successful, proceed to step S1105; if compression is unsuccessful, proceed to step S1107.

[0179] Step S1105: Generate compressed information.

[0180] The compression information includes the data compression method, compression length, and compression identifier used to mark the compressed data block.

[0181] Step S1106: Determine the corresponding compressed data block based on the compression information and compressed data.

[0182] Specifically, the structure of compressed data blocks is as follows: Figure 2 As shown, the data block consists of the compression identifier, compression length, data compression method, and compressed data from low to high bits.

[0183] Step S1107: Store the compressed length in the compressed length cache unit.

[0184] Step S1108: Store the compressed data block obtained by compression into the data block storage area of ​​the data storage unit.

[0185] Step S1109: Send a compression failure notification.

[0186] In one possible implementation, after determining that compression has failed, one can try to recompress until compression is successful.

[0187] In one possible implementation, after determining that compression has failed, a compression failure message is output, and a request is made for a recompression instruction or an instruction to store the data block in an uncompressed data block format.

[0188] Optionally, a compression failure message can be output after retrying compression a predetermined number of times but still failing to compress.

[0189] Step S1110: The data to be compressed is determined as an uncompressed data block.

[0190] Step S1111: Determine the value at a predetermined position in the data block carried by the data write request.

[0191] Step S1112: Determine whether the value at the predetermined position is equal to the compression identifier.

[0192] If equal, proceed to step S1113; if not equal, proceed to step S1115.

[0193] Step S1113: Flip the value at the predetermined position to generate an uncompressed data block to be written.

[0194] Step S1114: Determine the flip flag as the first value.

[0195] Step S1115: Determine whether the value at the predetermined position is equal to the flipped compression identifier.

[0196] If equal, proceed to step S1115; if not equal, proceed to step S1117.

[0197] Step S1116: Determine the flip identifier as the second value.

[0198] Step S1117: Store the flip identifier in the corresponding storage address of the flip identifier storage area of ​​the data storage unit.

[0199] Step S1118: According to the mapping relationship, the data block to be written is stored in the data block storage area of ​​the data storage unit, and there is a mapping relationship between the storage address of the data block and the storage address of the corresponding flip identifier.

[0200] The data blocks can be either compressed or uncompressed.

[0201] The specific implementation steps of steps S1101-S1118 are as described in the corresponding content of the above embodiments, and will not be repeated here.

[0202] The data access method of this invention is applicable to a data access system, which includes a data storage unit configured to store data blocks. Each data block includes compressed and uncompressed data blocks. The method involves obtaining a data write request, responding to the data write request carrying a compression instruction, compressing the data to be compressed carried by the data write request to generate a corresponding compressed data block. The compressed data block includes compressed data and compression information. The compression information includes a data compression method, a compression length, and a compression identifier used to mark the compressed data block. The compressed data block is then stored in the data storage unit. This data access system stores compressed data and corresponding compression information at the same storage address, avoiding additional memory access to the compressed information when accessing compressed data, thus improving the system's access performance.

[0203] Figure 12 This is a flowchart illustrating a data reading method applicable to a data access system according to an embodiment of the present invention. The data access method is applicable to the data access system described in the above embodiments, such as... Figure 12 As shown, the data reading method applicable to the data access system includes the following steps:

[0204] Step S1201: Receive the initial access request.

[0205] The initial access request includes the access address and the data length.

[0206] Step S1202: Query the compressed length cache unit according to the access address.

[0207] Step S1203: Determine if a corresponding compression length exists.

[0208] If it exists, proceed to step S1204; if it does not exist, proceed to step S1205.

[0209] Step S1204: Adjust the data length to the corresponding compressed length to obtain the data read request.

[0210] Step S1205: The initial access request is determined as the data read request.

[0211] Step S1206: Place the data read request into the request management component.

[0212] Step S1207: Read the corresponding data block from the data storage unit according to the access address.

[0213] Step S1208: Determine whether the read data block has a corresponding compression identifier.

[0214] If it exists, proceed to step S1215; if it does not exist, proceed to step S1209.

[0215] Step S1209: Decompress the data block based on the data compression method and compression length in the data block to obtain the data block to be fed back.

[0216] Step S1210: Determine whether the value at the predetermined position is equal to the compressed identifier after flipping.

[0217] If it equals, proceed to step S1211; if it does not exist, proceed to step S1214.

[0218] Step S1211: Query the flip identifier corresponding to the data block.

[0219] Step S1212: Determine whether the flip flag is the first value.

[0220] If yes, proceed to step S1213; otherwise, proceed to step S1214.

[0221] Step S1213: Flip the value at the predetermined position of the read data block to generate a data block to be fed back.

[0222] Assuming the compression identifier is 0x444, the flipping process is as follows: first, convert 0x444 from hexadecimal to binary, which is 100 0100 0100. Then, flip each bit to get 1011 1011 1011. Finally, convert the flipped code back to hexadecimal, which is 0xBBB.

[0223] Step S1214: The read data block is determined as the data block to be fed back.

[0224] Specifically, if the flip flag is the first value, the value at the predetermined position is flipped to obtain the corresponding data block to be fed back. If the flip flag is the second value or no value is read, the data block is directly identified as the data block to be fed back.

[0225] Step S1215: Decompress the data block based on the data compression method and compression length in the data block to obtain the data block to be fed back.

[0226] Step S1216: Send a release notification to the request management component so that the request management component releases the corresponding data read request.

[0227] Step S1217: Feedback the data block to be fed back.

[0228] The data access method of this invention is applicable to a data access system, which includes a data storage unit configured to store data blocks. Each data block includes compressed and uncompressed data blocks. The method involves obtaining a data write request, responding to the data write request carrying a compression instruction, compressing the data to be compressed carried by the data write request to generate a corresponding compressed data block. The compressed data block includes compressed data and compression information. The compression information includes a data compression method, a compression length, and a compression identifier used to mark the compressed data block. The compressed data block is then stored in the data storage unit. This data access system stores compressed data and corresponding compression information at the same storage address, avoiding additional memory access to the compressed information when accessing compressed data, thus improving the system's access performance.

[0229] Another embodiment of the present invention relates to a processor including a plurality of processing cores, wherein at least one processing core is a general-purpose graphics processing unit or other processor having a multi-core architecture, running a data access system as described in the above embodiments.

[0230] Figure 13 This is a schematic diagram of an electronic device according to an embodiment of the present invention. In this embodiment, the electronic device 1300 includes a server, a terminal, etc. Figure 13As shown, the electronic device 1300 includes at least one processor 1301; a memory 1302 communicatively connected to the at least one processor 1301; and a communication component 1303 communicatively connected to a scanning device. The processor 1301 includes multiple processing cores, wherein at least one processing core is a general-purpose graphics processing unit or other processor with a multi-core architecture, and runs the data access system as described in the above embodiments. The communication component 1303 receives and transmits data under the control of the processor 1301; wherein the memory 1302 stores instructions executable by the at least one processor 1301, which are executed by the at least one processor 1301 to implement the above data access method.

[0231] Specifically, the electronic device includes: one or more processors 1301 and a memory 1302. Figure 13 Taking a processor 1301 as an example, the processor 1301 and the memory 1302 can be connected via a bus or other means. Figure 13 Taking a bus connection as an example, memory 1302, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Processor 1301 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions, and modules stored in memory 1302, thereby realizing the above-mentioned data access method.

[0232] Memory 1302 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; the data storage area may store an option list, etc. Furthermore, memory 1302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 1302 may optionally include memory remotely located relative to processor 1301, and these remote memories may be connected to external devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0233] One or more modules are stored in memory 1302 and, when executed by one or more processors 1301, perform the data access method in any of the above method embodiments.

[0234] The above-mentioned products can perform the methods provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the methods. For technical details not described in detail in this embodiment, please refer to the methods provided in the embodiments of this application.

[0235] In this embodiment of the invention, the compression / decompression engine is configured to compress the data to be compressed to obtain corresponding compressed data blocks, and to decompress the data to be decompressed to obtain the read data. The data storage unit is configured to store data blocks, the data blocks including the compressed data blocks and uncompressed data blocks. The compressed data blocks include compressed data and compression information. The compression information includes data compression method, compression length, and compression identifier for marking the compressed data blocks. The above data access system stores the compressed data and the corresponding compression information in the same storage address, avoiding additional memory access to the compressed information when accessing the compressed data, and improving the access performance of the system.

[0236] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.

[0237] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0238] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data access system, characterized in that, The data access system includes: The compression / decompression engine is configured to compress the data to be compressed to obtain the corresponding compressed data blocks, and to decompress the data to be decompressed to obtain the data to be read. A data storage unit is configured to store data blocks, the data blocks including compressed data blocks and uncompressed data blocks, the compressed data blocks including compressed data and compression information, the compression information including data compression method, compression length and compression identifier for marking the compressed data blocks.

2. The data access system according to claim 1, characterized in that, The data storage unit includes a data block storage area and a flip identifier storage area; The data block storage area is configured to store the data blocks; The flip identifier storage area is configured to store flip identifiers, which are used to mark whether the value at a predetermined position of the data block is equal to the flipped compression identifier.

3. The data access system according to claim 2, characterized in that, There is a mapping relationship between the storage address of the data block and the storage address of the corresponding flip identifier.

4. The data access system according to claim 2, characterized in that, The data access system also includes: A compression length cache unit is configured to store the compression length corresponding to each of the compressed data blocks; The data processing unit is configured to adjust the corresponding data access request based on the compression length of the accessed compressed data block, the data access request including the access address and the data length.

5. The data access system according to claim 4, characterized in that, The data processing unit is further configured to generate a flip identifier for each of the data blocks, and to flip the value at a predetermined position of the uncompressed data block whose flip identifier meets a predetermined condition.

6. The data access system according to any one of claims 1-5, characterized in that, The data access system also includes: The data transceiver unit is configured to receive data access requests and provide corresponding request responses.

7. A data access method, applicable to a data access system, characterized in that, The data access system includes a data storage unit configured to store data blocks, the data blocks including compressed data blocks and uncompressed data blocks, and the data access method includes: Data write request; In response to the data write request carrying a compression instruction, the data to be compressed carried by the data write request is compressed to generate a corresponding compressed data block. The compressed data block includes compressed data and compression information. The compression information includes data compression method, compression length, and compression identifier for marking the compressed data block. The compressed data block is stored in the data storage unit.

8. The data access method according to claim 7, characterized in that, The data access method further includes: In response to the fact that the data write request does not carry a compression instruction, the value at a predetermined position in the data block carried by the data write request is determined; In response to the value at the predetermined position being equal to the compression identifier, the value at the predetermined position is flipped to generate an uncompressed data block to be written; Generate a flip sign; The uncompressed data block to be written is stored in the data block storage area of ​​the data storage unit, and there is a mapping relationship between the storage address of the data block and the storage address of the corresponding flip identifier; According to the mapping relationship, the flip identifier is stored in the corresponding storage address of the flip identifier storage area of ​​the data storage unit.

9. A data access method, applicable to a data access system, characterized in that, The data access system includes a data storage unit configured to store data blocks, the data blocks including compressed data blocks and uncompressed data blocks, and the data access method includes: Obtain a data read request, the data read request including the access address and data length; Read the corresponding data block from the data storage unit according to the access address; In response to the read data block having a corresponding compression identifier, the data block is decompressed based on the data compression method and compression length in the data block to obtain the data block to be fed back; The feedback refers to the data block to be fed back.

10. The data access method according to claim 9, characterized in that, The data acquisition and reading request includes: Receive an initial access request, which includes an access address and a data length; Query the compressed length cache unit based on the access address; In response to the discovery that the access address has a corresponding compressed length, the data length is adjusted to the corresponding compressed length to obtain the data read request.

11. The data access method according to claim 9, characterized in that, The data storage unit includes a data block storage area and a flip identifier storage area. The data block storage area is configured to store the data block, and the flip identifier storage area is configured to store a flip identifier. The flip identifier is used to identify whether the value at a predetermined position of the data block is equal to the compressed identifier after flipping. The data access method further includes: In response to the fact that the value at a predetermined position of the read data block is equal to the flipped compression identifier, the flip identifier corresponding to the data block is queried; In response to the value of the flip flag being a first value, the value at a predetermined position of the read data block is flipped to generate a data block to be fed back. In response to the value of the flip flag being a second value, the read data block is determined as the data block to be fed back.

12. The data access method according to claim 10, characterized in that, The data acquisition and reading request includes: In response to the query finding that the access address does not have a corresponding compressed length, the initial access request is determined as the data read request; Place the data read request into the request management component; The method further includes: In response to the fact that the data block read based on the initial access request has a corresponding compression identifier, the compressed length of the read data block is stored in the compressed length cache unit.

13. A processor comprising a plurality of processing cores, characterized in that, The processing core operates the data access system as described in any one of claims 1-6.

14. An electronic device comprising a memory and a processor, characterized in that, The processor as described in claim 13, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor according to a corresponding method.