CN116243854A - Data storage system and data storage method - Google Patents
Data storage system and data storage method Download PDFInfo
- Publication number
- CN116243854A CN116243854A CN202211655129.7A CN202211655129A CN116243854A CN 116243854 A CN116243854 A CN 116243854A CN 202211655129 A CN202211655129 A CN 202211655129A CN 116243854 A CN116243854 A CN 116243854A
- Authority
- CN
- China
- Prior art keywords
- data
- flash memory
- host
- compression
- write
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System (AREA)
Abstract
本申请实施例涉及存储设备应用领域,公开了一种数据存储系统及数据存储方法,该数据存储系统,包括:主机和闪存设备;主机包括:主机压缩模块,用于对写请求对应的写入数据进行压缩;主机解压模块,用于对读出数据进行解压;闪存设备包括:闪存压缩模块,用于在确定主机的写入数据对应的压缩决策标记为压缩时,对主机的写入数据进行压缩;闪存解压模块,用于在确定读请求对应的读出数据对应的解压缩决策标记为解压缩时,对读请求对应的读出数据进行解压。通过协同主机的数据压缩、解压和闪存设备的数据压缩、解压,本申请能够提高闪存设备的存储性能。
The embodiment of the present application relates to the application field of storage devices, and discloses a data storage system and a data storage method. The data storage system includes: a host and a flash memory device; the host includes: a host compression module, used for writing data compression; the host decompression module is used to decompress the read data; the flash memory device includes: a flash memory compression module, which is used to perform compression on the write data of the host when it is determined that the compression decision corresponding to the write data of the host is marked as compression Compression; a flash memory decompression module, configured to decompress the read data corresponding to the read request when it is determined that the decompression decision flag corresponding to the read data corresponding to the read request is decompressed. By cooperating with the data compression and decompression of the host and the data compression and decompression of the flash memory device, the present application can improve the storage performance of the flash memory device.
Description
技术领域technical field
本申请涉及存储设备应用领域,特别是涉及一种数据存储系统及数据存储方法。The present application relates to the application field of storage devices, in particular to a data storage system and a data storage method.
背景技术Background technique
闪存设备,例如:固态硬盘(Solid State Drives,SSD),是采用固态电子存储芯片阵列而制成的硬盘,固态硬盘包括控制单元和存储单元(FLASH存储芯片或DRAM存储芯片)。Flash memory devices, such as Solid State Drives (SSD), are hard disks made of arrays of solid state electronic memory chips. The solid state drives include a control unit and a storage unit (FLASH memory chip or DRAM memory chip).
目前,可计算存储架构支持在SSD内部对数据做压缩和解压。具体而言,数据写入SSD的时候对数据做压缩。主机端应用程序或文件系统读取数据的时候,SSD先在内部对数据解压,然后返回给主机。由于当前方案依赖闪存设备内部的计算资源做压缩或解压,容易导致闪存设备读写延时增大,影响闪存设备的存储性能。Currently, the Computable Storage Architecture supports data compression and decompression inside the SSD. Specifically, the data is compressed when the data is written to the SSD. When the host-side application or file system reads data, the SSD first decompresses the data internally and then returns it to the host. Since the current solution relies on the computing resources inside the flash memory device for compression or decompression, it is easy to increase the read and write delay of the flash memory device and affect the storage performance of the flash memory device.
基于此,现有技术亟待改进。Based on this, the prior art needs to be improved urgently.
发明内容Contents of the invention
本申请实施例提供一种数据存储系统及数据存储方法,通过协同主机的数据压缩、解压和闪存设备的数据压缩、解压,从而提高闪存设备的存储性能。The embodiments of the present application provide a data storage system and a data storage method, which improve the storage performance of the flash memory device by cooperating with the data compression and decompression of the host and the data compression and decompression of the flash memory device.
本申请实施例提供以下技术方案:The embodiment of the present application provides the following technical solutions:
第一方面,本申请实施例提供一种数据存储系统,包括:主机和闪存设备;In a first aspect, an embodiment of the present application provides a data storage system, including: a host and a flash memory device;
其中,主机,连接闪存设备,主机包括:Among them, the host is connected to the flash device, and the host includes:
主机压缩模块,用于在确定写请求对应的写入数据对应的压缩决策标记为压缩时,对写请求对应的写入数据进行压缩,以将压缩后的写入数据写入到闪存设备;The host compression module is configured to compress the write data corresponding to the write request when determining that the write data corresponding to the write request is marked as compressed, so as to write the compressed write data to the flash memory device;
主机解压模块,用于在确定闪存设备的读出数据对应的解压缩决策标记为解压缩时,对读出数据进行解压;The host decompression module is used to decompress the read data when it is determined that the decompression decision mark corresponding to the read data of the flash memory device is decompressed;
其中,闪存设备,连接主机,闪存设备包括:Among them, the flash memory device is connected to the host, and the flash memory device includes:
闪存压缩模块,用于在确定主机的写入数据对应的压缩决策标记为压缩时,对主机的写入数据进行压缩;The flash memory compression module is configured to compress the write data of the host when it is determined that the compression decision corresponding to the write data of the host is marked as compression;
闪存解压模块,用于在确定读请求对应的读出数据对应的解压缩决策标记为解压缩时,对读请求对应的读出数据进行解压。The flash memory decompression module is configured to decompress the read data corresponding to the read request when it is determined that the decompression decision flag corresponding to the read data corresponding to the read request is decompressed.
在一些实施例中,In some embodiments,
主机还包括:Hosts also include:
主机驱动模块,用于确定写请求对应的写入数据对应的压缩决策标记,和/或,确定闪存设备的读出数据对应的解压缩决策标记;The host driver module is configured to determine the compression decision flag corresponding to the write data corresponding to the write request, and/or determine the decompression decision flag corresponding to the read data of the flash memory device;
闪存设备还包括:Flash devices also include:
闪存控制模块,用于确定主机的写入数据对应的压缩决策标记,和/或,确定读请求对应的读出数据对应的解压缩决策标记。The flash memory control module is configured to determine a compression decision flag corresponding to the write data of the host, and/or determine a decompression decision flag corresponding to the read data corresponding to the read request.
在一些实施例中,In some embodiments,
主机驱动模块连接闪存控制模块,主机驱动模块和闪存控制模块之间进行写请求或读请求或数据的交互。The host driver module is connected to the flash memory control module, and the host driver module and the flash memory control module perform write request or read request or data interaction.
在一些实施例中,主机还包括:In some embodiments, the host also includes:
系统模块,连接主机驱动模块,用于向主机驱动模块发送写请求或读请求,以接收主机驱动模块返回的写请求对应的响应信息或读请求对应的响应信息,其中,系统模块包括应用系统和/或文件系统。The system module is connected to the host driver module, and is used to send a write request or a read request to the host driver module, so as to receive the response information corresponding to the write request or the response information corresponding to the read request returned by the host driver module, wherein the system module includes the application system and /or the file system.
第二方面,本申请实施例提供一种数据存储方法,应用于如第一方面的数据存储系统,方法包括:In the second aspect, the embodiment of the present application provides a data storage method, which is applied to the data storage system in the first aspect, and the method includes:
在主机接收到写请求之后,根据主机压缩控制策略,确定写请求对应的压缩决策标记;After the host receives the write request, determine the compression decision mark corresponding to the write request according to the host compression control strategy;
根据压缩决策标记,对写请求对应的写入数据进行压缩或不压缩,以向闪存设备发送写请求,其中,写请求包括压缩后的写入数据或原始的写入数据;Compressing or not compressing the write data corresponding to the write request according to the compression decision mark, so as to send the write request to the flash memory device, wherein the write request includes compressed write data or original write data;
在闪存设备接收到主机发送的写请求之后,根据写请求中的压缩标记信息,对写请求中的写入数据进行压缩或不压缩,以将压缩后的写入数据或原始的写入数据写入到闪存设备的闪存介质。After the flash memory device receives the write request sent by the host, it compresses or does not compress the write data in the write request according to the compression tag information in the write request, so as to write the compressed write data or the original write data flash media loaded into a flash device.
在一些实施例中,根据主机压缩控制策略,确定写请求对应的压缩决策标记,包括:In some embodiments, according to the host compression control strategy, determining the compression decision mark corresponding to the write request includes:
若主机的处理器的利用率小于预设的利用率阈值,并且,写请求对应的写入数据的数据压缩率小于预设的压缩率阈值,则确定写请求对应的压缩决策标记为压缩;If the utilization rate of the processor of the host is less than the preset utilization rate threshold, and the data compression rate of the written data corresponding to the write request is less than the preset compression rate threshold value, it is determined that the compression decision corresponding to the write request is marked as compression;
若主机的处理器的利用率不小于预设的利用率阈值,或者,写请求对应的写入数据的数据压缩率不小于预设的压缩率阈值,则确定写请求对应的压缩决策标记为不压缩。If the utilization rate of the processor of the host is not less than the preset utilization rate threshold, or the data compression rate of the written data corresponding to the write request is not less than the preset compression rate threshold value, then it is determined that the compression decision mark corresponding to the write request is not compression.
在一些实施例中,压缩标记信息包括已压缩或未压缩,根据写请求中的压缩标记信息,对写请求中的写入数据进行压缩或不压缩,包括:In some embodiments, the compression flag information includes compressed or uncompressed, and according to the compression flag information in the write request, the write data in the write request is compressed or uncompressed, including:
若压缩标记信息为未压缩,则根据闪存压缩控制策略,确定是否对写请求中的写入数据进行压缩,其中,闪存压缩控制策略包括:If the compression flag information is uncompressed, then determine whether to compress the write data in the write request according to the flash memory compression control strategy, wherein the flash memory compression control strategy includes:
若闪存设备的处理器的利用率小于预设的利用率阈值,并且,写请求对应的写入数据的数据压缩率小于预设的压缩率阈值,则确定对写请求对应的写入数据进行压缩;If the utilization rate of the processor of the flash memory device is less than the preset utilization rate threshold, and the data compression rate of the write data corresponding to the write request is less than the preset compression rate threshold, it is determined to compress the write data corresponding to the write request ;
若闪存设备的处理器的利用率不小于预设的利用率阈值,或者,写请求对应的写入数据的数据压缩率不小于预设的压缩率阈值,则确定对写请求对应的写入数据不压缩。If the utilization rate of the processor of the flash memory device is not less than the preset utilization rate threshold, or the data compression rate of the write data corresponding to the write request is not less than the preset compression rate threshold, then it is determined that the write data corresponding to the write request No compression.
第三方面,本申请实施例提供一种数据存储方法,应用于如第一方面的数据存储系统,方法包括:In the third aspect, the embodiment of the present application provides a data storage method, which is applied to the data storage system in the first aspect, and the method includes:
在主机接收到读请求之后,向闪存设备发送读请求;After the host receives the read request, it sends a read request to the flash memory device;
在闪存设备接收到读请求之后,若读请求对应的读出数据为压缩数据,则根据解压缩控制策略,确定读出数据对应的解压缩决策标记;After the flash memory device receives the read request, if the read data corresponding to the read request is compressed data, then determine the decompression decision mark corresponding to the read data according to the decompression control strategy;
闪存设备根据解压缩决策标记,确定是否对读出数据进行解压缩,以将解压缩后的读出数据或未解压的读出数据返回主机。The flash memory device determines whether to decompress the read data according to the decompression decision flag, so as to return the decompressed read data or undecompressed read data to the host.
在一些实施例中,根据解压缩控制策略,确定读出数据对应的解压缩决策标记,包括:In some embodiments, according to the decompression control strategy, determining the decompression decision flag corresponding to the read data includes:
若闪存设备中的解压缩队列未填满,并且,主机与闪存设备的接口带宽利用率小于预设的带宽利用率阈值,则确定读出数据对应的解压缩决策标记为解压缩;If the decompression queue in the flash memory device is not full, and the bandwidth utilization of the interface between the host and the flash memory device is less than the preset bandwidth utilization threshold, then determine that the decompression decision corresponding to the read data is marked as decompression;
若闪存设备中的解压缩队列已填满,或者,主机与闪存设备的接口带宽利用率不小于预设的带宽利用率阈值,则确定读出数据对应的解压缩决策标记为不解压缩。If the decompression queue in the flash memory device is full, or the bandwidth utilization rate of the interface between the host and the flash memory device is not less than the preset bandwidth utilization rate threshold, it is determined that the decompression decision corresponding to the read data is marked as no decompression.
在一些实施例中,方法还包括:In some embodiments, the method also includes:
在主机接收到闪存设备发送的未解压的读出数据之后,对未解压的读出数据进行解压。After the host receives the uncompressed read data sent by the flash memory device, it decompresses the uncompressed read data.
第四方面,本申请实施例还提供了一种非易失性计算机可读存储介质,计算机可读存储介质存储有计算机可执行指令,计算机可执行指令用于使数据存储系统能够执行如第二方面或第三方面的数据存储方法。In a fourth aspect, the embodiment of the present application also provides a non-volatile computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the data storage system to execute the second The data storage method of aspect or third aspect.
本申请实施例的有益效果是:区别于现有技术的情况下,本申请实施例提供的一种数据存储系统,包括:主机和闪存设备;其中,主机,连接闪存设备,主机包括:主机压缩模块,用于在确定写请求对应的写入数据对应的压缩决策标记为压缩时,对写请求对应的写入数据进行压缩,以将压缩后的写入数据写入到闪存设备;主机解压模块,用于在确定闪存设备的读出数据对应的解压缩决策标记为解压缩时,对读出数据进行解压;其中,闪存设备,连接主机,闪存设备包括:闪存压缩模块,用于在确定主机的写入数据对应的压缩决策标记为压缩时,对主机的写入数据进行压缩;闪存解压模块,用于在确定读请求对应的读出数据对应的解压缩决策标记为解压缩时,对读请求对应的读出数据进行解压。The beneficial effects of the embodiments of the present application are: different from the prior art, the data storage system provided by the embodiments of the present application includes: a host and a flash memory device; wherein, the host is connected to the flash memory device, and the host includes: host compression A module configured to compress the write data corresponding to the write request when determining that the compression decision corresponding to the write data corresponding to the write request is marked as compression, so as to write the compressed write data to the flash memory device; the host decompression module , used to decompress the read data when it is determined that the decompression decision corresponding to the read data of the flash memory device is decompressed; wherein, the flash memory device is connected to the host, and the flash memory device includes: a flash memory compression module, used to determine the host When the compression decision corresponding to the written data is marked as compressed, the written data of the host is compressed; the flash memory decompression module is used to determine that the decompression decision corresponding to the read data corresponding to the read request is marked as decompressed. Request the corresponding read data to decompress.
通过协同主机的数据压缩、解压和闪存设备的数据压缩、解压,本申请能够提高闪存设备的存储性能。By cooperating with the data compression and decompression of the host and the data compression and decompression of the flash memory device, the present application can improve the storage performance of the flash memory device.
附图说明Description of drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。One or more embodiments are exemplified by the pictures in the corresponding drawings, and these exemplifications do not constitute a limitation to the embodiments. Elements with the same reference numerals in the drawings represent similar elements. Unless otherwise stated, the drawings in the drawings are not limited to scale.
图1是本申请实施例提供的一种数据存储系统的结构示意图;FIG. 1 is a schematic structural diagram of a data storage system provided by an embodiment of the present application;
图2是本申请实施例提供的另一种数据存储系统的结构示意图;Fig. 2 is a schematic structural diagram of another data storage system provided by an embodiment of the present application;
图3是本申请实施例提供的一种闪存设备的结构示意图;FIG. 3 is a schematic structural diagram of a flash memory device provided by an embodiment of the present application;
图4是本申请实施例提供的一种主机的数据压缩和解压缩的示意图;Fig. 4 is a schematic diagram of data compression and decompression of a host provided by an embodiment of the present application;
图5是本申请实施例提供的一种闪存设备的数据压缩和解压缩的示意图;FIG. 5 is a schematic diagram of data compression and decompression of a flash memory device provided in an embodiment of the present application;
图6是本申请实施例提供的一种主机和闪存设备协同进行数据压缩和解压缩的示意图;FIG. 6 is a schematic diagram of a host and a flash memory device cooperating to perform data compression and decompression provided by an embodiment of the present application;
图7是本申请实施例提供的一种数据存储方法的流程示意图;FIG. 7 is a schematic flow diagram of a data storage method provided by an embodiment of the present application;
图8是图7中的步骤S701的细化流程图;FIG. 8 is a detailed flowchart of step S701 in FIG. 7;
图9是本申请实施例提供的一种数据写操作的示意图;FIG. 9 is a schematic diagram of a data writing operation provided by an embodiment of the present application;
图10是本申请实施例提供的一种闪存设备的固件模块的结构示意图;FIG. 10 is a schematic structural diagram of a firmware module of a flash memory device provided in an embodiment of the present application;
图11是本申请实施例提供的另一种数据存储方法的流程示意图;Fig. 11 is a schematic flowchart of another data storage method provided by the embodiment of the present application;
图12是图11中的步骤S112的细化流程图;Fig. 12 is a detailed flowchart of step S112 in Fig. 11;
图13是本申请实施例提供的一种数据读操作的示意图。FIG. 13 is a schematic diagram of a data read operation provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
需要说明的是,如果不冲突,本申请实施例中的各个特征可以相互结合,均在本申请的保护范围之内。另外,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。再者,本申请所采用的“第一”、“第二”、“第三”等字样并不对数据和执行次序进行限定,仅是对功能和作用基本相同的相同项或相似项进行区分。It should be noted that, if there is no conflict, various features in the embodiments of the present application may be combined with each other, and all of them are within the protection scope of the present application. In addition, although the functional modules are divided in the schematic diagram of the device, and the logical order is shown in the flowchart, in some cases, the division of modules in the device or the sequence shown in the flowchart can be performed in different ways. or the steps described. Furthermore, words such as "first", "second", and "third" used in this application do not limit the data and execution order, but only distinguish the same or similar items with basically the same function and effect.
下面结合说明书附图具体说明本申请的技术方案:The technical scheme of the present application is specifically described below in conjunction with the accompanying drawings of the description:
请参阅图1,图1是本申请实施例提供的一种数据存储系统的结构示意图;Please refer to FIG. 1. FIG. 1 is a schematic structural diagram of a data storage system provided by an embodiment of the present application;
如图1所示,该数据存储系统300,包括闪存设备100以及主机200,其中,闪存设备100通信连接该主机200。其中,闪存设备100通过有线或无线的方式与主机200通信连接,用以实现数据和/或命令和/或请求交互。As shown in FIG. 1 , the
请再参阅图2,图2是本申请实施例提供的另一种数据存储系统的结构示意图;Please refer to FIG. 2 again. FIG. 2 is a schematic structural diagram of another data storage system provided by an embodiment of the present application;
如图2所示,该数据存储系统300,包括:闪存设备100以及主机200。As shown in FIG. 2 , the
具体的,闪存设备100,包括:闪存介质110、闪存控制模块120、闪存解压模块130以及闪存压缩模块140。Specifically, the
闪存介质110,作为闪存设备100的存储介质,也称作闪存、Flash、Flash存储器或Flash颗粒,属于存储器件的一种,是一种非易失性存储器,在没有电流供应的条件下也能够长久地保存数据,其存储特性相当于硬盘,使得闪存介质110得以成为各类便携型数字设备的存储介质的基础。The
闪存控制模块120,连接该闪存介质110、闪存解压模块130以及闪存压缩模块140,用于控制闪存设备100的内部操作,并且,实现闪存设备100与主机200之间的数据和/或命令和/或请求的交互,其中,请求包括读请求和/或写请求。The flash memory control module 120 is connected to the
在本申请实施例中,闪存控制模块120为闪存设备的控制器,请再参阅图3,图3是本申请实施例提供的一种闪存设备的结构示意图;In the embodiment of the present application, the flash memory control module 120 is a controller of the flash memory device, please refer to FIG. 3 again. FIG. 3 is a schematic structural diagram of a flash memory device provided in the embodiment of the present application;
如图3所示,该闪存控制模块120,包括:数据转换器121、处理器122、缓存器123、闪存控制器124以及接口125。As shown in FIG. 3 , the flash memory control module 120 includes: a
数据转换器121,分别与处理器122和闪存控制器124连接,数据转换器121用于将二进制数据转换为十六进制数据,以及将十六进制数据转换为二进制数据。具体地,当闪存控制器124向闪存介质110写入数据时,通过数据转换器121将待写入的二进制数据转换为十六进制数据,然后再写入闪存介质110。当闪存控制器124从闪存介质110读取数据时,通过数据转换器121将闪存介质110中存储的十六进制数据转换为二进制数据,然后从二进制数据页寄存器中读取转换后的数据。其中,数据转换器121可以包括二进制数据寄存器和十六进制数据寄存器。二进制数据寄存器可以用于保存由十六进制转换为二进制后的数据,十六进制数据寄存器可以用于保存由二进制转换为十六进制后的数据。The
处理器122,分别与数据转换器121、缓存器123、闪存控制器124以及接口125连接,其中,处理器122与数据转换器121、缓存器123、闪存控制器124以及接口125可以通过总线或者其他方式连接,处理器用于运行存储在缓存器123中的非易失性软件程序、指令以及模块,从而实现本申请任一方法实施例。The processor 122 is respectively connected to the
缓存器123,主要用于缓存主机200发送的读/写指令以及根据主机200发送的读/写指令从闪存介质110获取的读数据或者写数据。The cache memory 123 is mainly used for caching the read/write command sent by the
闪存控制器124,与闪存介质110、数据转换器121、处理器122以及缓存器123连接,用于访问后端的闪存介质110,管理闪存介质110的各种参数和数据I/O。The
接口125,连接主机200以及数据转换器121、处理器122以及缓存器123,用于接收主机200发送的数据,或者,接收处理器122发送的数据,实现主机200与处理器122之间的数据传输,接口125可以为SATA-2接口、SATA-3接口、SAS接口、MSATA接口、PCI-E接口、NGFF接口、CFast接口、SFF-8639接口和M.2NVME/SATA协议。The
闪存解压模块130,连接闪存控制模块120,用于对闪存设备100的闪存介质110中的压缩数据进行解压。The flash memory decompression module 130 is connected to the flash memory control module 120 and used for decompressing the compressed data in the
闪存压缩模块140,连接闪存控制模块120,用于对主机200的主机驱动模块220发送的数据进行压缩。The flash memory compression module 140 is connected to the flash memory control module 120 and used for compressing the data sent by the
具体的,主机200,包括:系统模块210、主机驱动模块220、主机压缩模块230以及主机解压模块240。Specifically, the
系统模块210,连接主机驱动模块220,用于向主机驱动模块220发送写请求或读请求,以接收主机驱动模块返回的写请求对应的响应信息或读请求对应的响应信息,其中,该写请求包括逻辑地址信息和待写入闪存介质的数据,该写请求对应的响应信息包括写入成功信息或写入失败信息,该写请求被主机驱动模块220接收,使得该主机驱动模块220执行该写请求,将写请求中的写入数据写入到闪存设备的闪存介质;该读请求包括逻辑地址信息,该读请求对应的响应信息包括读请求对应的数据,该读请求被主机驱动模块220接收,使得该主机驱动模块220执行该写请求,以读取闪存设备的闪存介质中对应的数据。在本申请实施例中,系统模块210包括应用系统和/或文件系统。The system module 210 is connected to the
主机驱动模块220,连接系统模块210、主机压缩模块230以及主机解压模块240,该主机驱动模块220用于控制主机200的内部操作,并且,实现闪存设备100与主机200之间的数据和/或命令和/或请求的交互,其中,请求包括读请求和/或写请求。The
具体的,主机驱动模块220连接闪存控制模块120,主机驱动模块220和闪存控制模块120之间进行写请求或读请求或数据的交互。Specifically, the
主机压缩模块230,连接主机驱动模块220,用于对系统模块210发送的数据进行压缩。The host compression module 230 is connected to the
主机解压模块240,连接主机驱动模块220,用于对闪存设备100返回的压缩数据进行解压。The
在本申请实施例中,通过在主机和闪存设备中均设置压缩模块和解压模块,能够实现协同主机和闪存设备的处理能力,提高闪存设备的存储性能。In the embodiment of the present application, by setting a compression module and a decompression module in both the host computer and the flash memory device, it is possible to coordinate the processing capabilities of the host computer and the flash memory device, and improve the storage performance of the flash memory device.
下面举例说明数据压缩和解压缩的处理:The following example illustrates the processing of data compression and decompression:
请参阅图4,图4是本申请实施例提供的一种主机的数据压缩和解压缩的示意图;Please refer to FIG. 4. FIG. 4 is a schematic diagram of data compression and decompression of a host provided by an embodiment of the present application;
如图4所示,在主机中设置压缩模块和解压缩模块,由主机单独对主机端的数据进行压缩,或者,对闪存设备端的数据进行解压缩,但是,这种方式的压缩模块和解压缩模块通常是基于软件实现,其存在效率不高,速度慢的问题。As shown in Figure 4, a compression module and a decompression module are set in the host, and the host independently compresses the data on the host side, or decompresses the data on the flash device side, but the compression module and decompression module in this way are usually Based on software implementation, it has the problems of low efficiency and slow speed.
请再参阅图5,图5是本申请实施例提供的一种闪存设备的数据压缩和解压缩的示意图;Please refer to FIG. 5 again. FIG. 5 is a schematic diagram of data compression and decompression of a flash memory device provided by an embodiment of the present application;
如图5所示,在闪存设备中设置压缩模块和解压缩模块,由闪存设备单独对主机端的数据进行压缩,或者,对闪存设备端的数据进行解压缩,但是,这种方式下闪存设备的读性能受计算引擎做解压缩操作速度的严重制约。并且,主机的空闲计算资源没有在数据压缩的过程中得到利用,造成资源浪费和次优的总体系统读写性能。As shown in Figure 5, a compression module and a decompression module are set in the flash memory device, and the flash memory device independently compresses the data on the host side, or decompresses the data on the flash device side. However, the read performance of the flash memory device in this way It is severely restricted by the computing engine's decompression speed. Also, idle computing resources of the host are not utilized in the process of data compression, resulting in waste of resources and suboptimal overall system read and write performance.
有鉴于此,本申请实施例通过在主机和闪存设备中均设置压缩模块和解压模块,能够实现协同主机和闪存设备的处理能力,结合主机端的数据压缩和存储设备内部的数据压缩,充分利用主机和闪存设备的计算引擎的算力来以协同的方式做数据压缩和解压以达到最优的存储性能。In view of this, in the embodiment of the present application, by setting a compression module and a decompression module in both the host and the flash memory device, it is possible to cooperate with the processing capabilities of the host and the flash memory device, combine the data compression on the host side and the data compression inside the storage device, and make full use of the host The computing power of the computing engine of the flash memory device is used to perform data compression and decompression in a coordinated manner to achieve optimal storage performance.
具体的,请参阅图6,图6是本申请实施例提供的一种主机和闪存设备协同进行数据压缩和解压缩的示意图;Specifically, please refer to FIG. 6. FIG. 6 is a schematic diagram of a host and a flash memory device cooperating to perform data compression and decompression according to an embodiment of the present application;
如图6所示,该主机中包括主机压缩模块和主机解压模块,该闪存设备中包括闪存压缩模块和闪存解压模块。As shown in FIG. 6 , the host includes a host compression module and a host decompression module, and the flash memory device includes a flash memory compression module and a flash decompression module.
其中,在主机写数据时,主机驱动模块判断是否对该数据进行压缩,若是,则通过主机压缩模块对该数据进行压缩,并向闪存设备发送压缩后的数据;若否,则直接向闪存设备发送未压缩的数据。在闪存设备接收到主机发送的数据之后,判断该数据是否为压缩的数据,若是,则直接将该数据写入到闪存中,即写入到闪存介质中;若否,则通过闪存压缩模块对该数据进行压缩,并将压缩后的数据写入到闪存介质中。Wherein, when the host writes data, the host drive module judges whether to compress the data, if so, then compresses the data through the host compression module, and sends the compressed data to the flash memory device; if not, then directly sends the compressed data to the flash memory device Send uncompressed data. After the flash memory device receives the data sent by the host, it is judged whether the data is compressed data, if so, the data is directly written into the flash memory, that is, written into the flash memory medium; This data is compressed and the compressed data is written to the flash media.
在本申请实施例中,闪存压缩模块既支持盘内在线压缩也支持盘内离线压缩。具体的,闪存压缩模块既可以在数据写入的时候,在数据通路上先对数据进行压缩,再写入闪存介质,即盘内在线压缩;或者,闪存压缩模块也可以先将数据写入闪存介质,再以离线的方式将数据从闪存介质中取出,再进行压缩,然后写回压缩的数据,即盘内离线压缩。In the embodiment of the present application, the flash memory compression module supports both on-disk online compression and on-disk offline compression. Specifically, the flash memory compression module can compress the data on the data path when the data is written, and then write it to the flash memory medium, that is, online compression in the disk; or, the flash memory compression module can also first write the data into the flash memory Then take the data out of the flash media in an offline manner, compress it, and then write the compressed data back, that is, off-line compression on the disk.
其中,在读取闪存中的数据时,计算引擎判断该数据是否为压缩的数据,若是,则通过闪存解压模块对该数据进行解压,并将解压后的数据发送到主机;若否,则直接将该数据发送到主机。在主机接收到闪存设备发送的数据之后,判断该数据是否为压缩的数据,若是,则通过主机解压模块进行解压,并将解压后的数据返回文件系统;若否,则直接将该数据返回文件系统。Among them, when reading the data in the flash memory, the calculation engine judges whether the data is compressed data, if so, then decompress the data through the flash memory decompression module, and send the decompressed data to the host; if not, directly Send that data to the host. After the host receives the data sent by the flash memory device, it judges whether the data is compressed data, if so, decompresses it through the host decompression module, and returns the decompressed data to the file system; if not, directly returns the data to the file system.
在本申请实施例中,通过提供一种数据存储系统,包括:主机和闪存设备;其中,主机,连接闪存设备,主机包括:主机压缩模块,用于在确定写请求对应的写入数据对应的压缩决策标记为压缩时,对写请求对应的写入数据进行压缩,以将压缩后的写入数据写入到闪存设备;主机解压模块,用于在确定闪存设备的读出数据对应的解压缩决策标记为解压缩时,对读出数据进行解压;其中,闪存设备,连接主机,闪存设备包括:闪存压缩模块,用于在确定主机的写入数据对应的压缩决策标记为压缩时,对主机的写入数据进行压缩;闪存解压模块,用于在确定读请求对应的读出数据对应的解压缩决策标记为解压缩时,对读请求对应的读出数据进行解压。In the embodiment of the present application, a data storage system is provided, including: a host and a flash memory device; wherein, the host is connected to the flash memory device, and the host includes: a host compression module, configured to determine the write data corresponding to the write request When the compression decision is marked as compression, the write data corresponding to the write request is compressed to write the compressed write data to the flash memory device; the host decompression module is used to determine the decompression corresponding to the read data of the flash memory device When the decision is marked as decompression, the read data is decompressed; wherein, the flash memory device is connected to the host, and the flash memory device includes: a flash memory compression module, which is used to decompress the host when the compression decision corresponding to the written data of the host is marked as compression. The written data is compressed; the flash memory decompression module is configured to decompress the read data corresponding to the read request when the decompression decision flag corresponding to the read data corresponding to the read request is determined to be decompressed.
通过协同主机的数据压缩、解压和闪存设备的数据压缩、解压,本申请能够提高闪存设备的存储性能。By cooperating with the data compression and decompression of the host and the data compression and decompression of the flash memory device, the present application can improve the storage performance of the flash memory device.
请参阅图7,图7是本申请实施例提供的一种数据存储方法的流程示意图;Please refer to FIG. 7, which is a schematic flowchart of a data storage method provided by an embodiment of the present application;
其中,该数据存储方法,应用于上述实施例提供的数据存储系统。Wherein, the data storage method is applied to the data storage system provided in the foregoing embodiments.
如图7所示,该数据存储方法,包括:As shown in Figure 7, the data storage method includes:
步骤S701:在主机接收到写请求之后,根据主机压缩控制策略,确定写请求对应的压缩决策标记;Step S701: after the host receives the write request, determine the compression decision flag corresponding to the write request according to the host compression control strategy;
具体的,该压缩决策标记用于确定是否对该写请求对应的写入数据进行压缩,该压缩决策标记包括压缩或不压缩。Specifically, the compression decision flag is used to determine whether to compress the written data corresponding to the write request, and the compression decision flag includes compression or no compression.
在本申请实施例中,该主机压缩控制策略用于根据主机的处理器的利用率和写请求对应的写入数据的数据压缩率来确定是否对写请求对应的写入数据进行压缩,具体的,根据主机压缩控制策略,确定写请求对应的压缩决策标记,包括:In this embodiment of the present application, the host compression control strategy is used to determine whether to compress the write data corresponding to the write request according to the utilization rate of the processor of the host and the data compression rate of the write data corresponding to the write request, specifically , according to the host compression control policy, determine the compression decision flag corresponding to the write request, including:
若主机的处理器的利用率小于预设的利用率阈值,并且,写请求对应的写入数据的数据压缩率小于预设的压缩率阈值,则确定写请求对应的压缩决策标记为压缩;If the utilization rate of the processor of the host is less than the preset utilization rate threshold, and the data compression rate of the written data corresponding to the write request is less than the preset compression rate threshold value, it is determined that the compression decision corresponding to the write request is marked as compression;
若主机的处理器的利用率不小于预设的利用率阈值,或者,写请求对应的写入数据的数据压缩率不小于预设的压缩率阈值,则确定写请求对应的压缩决策标记为不压缩。If the utilization rate of the processor of the host is not less than the preset utilization rate threshold, or the data compression rate of the written data corresponding to the write request is not less than the preset compression rate threshold value, then it is determined that the compression decision mark corresponding to the write request is not compression.
具体的,请再参阅图8,图8是图7中的步骤S701的细化流程图;Specifically, please refer to FIG. 8 again. FIG. 8 is a detailed flowchart of step S701 in FIG. 7;
如图8所示,该步骤S701,包括:As shown in Figure 8, the step S701 includes:
步骤S7011:获取主机的处理器的利用率以及写请求对应的写入数据的数据压缩率;Step S7011: Obtain the utilization rate of the processor of the host and the data compression rate of the written data corresponding to the write request;
步骤S7012:判断主机的处理器的利用率是否小于预设的利用率阈值;Step S7012: judging whether the utilization rate of the processor of the host computer is less than a preset utilization rate threshold;
具体的,预设的利用率阈值根据具体需要进行设置,例如:70%、80%、90%等数值,假设该利用率阈值为80%,若主机的处理器的利用率小于80%,则进入步骤S7013;若主机的处理器的利用率大于或等于80%,则进入步骤S7015;Specifically, the preset utilization threshold is set according to specific needs, for example: 70%, 80%, 90% and other values, assuming that the utilization threshold is 80%, if the utilization rate of the processor of the host is less than 80%, then Go to step S7013; if the utilization rate of the processor of the host is greater than or equal to 80%, go to step S7015;
步骤S7013:判断写请求对应的写入数据的数据压缩率是否小于预设的压缩率阈值;Step S7013: Determine whether the data compression rate of the written data corresponding to the write request is less than a preset compression rate threshold;
具体的,预设的压缩率阈值根据具体需要进行设置,例如:70%、80%、90%等数值,假设该压缩率阈值为80%,若写请求对应的写入数据的数据压缩率小于80%,则进入步骤S7014;若写请求对应的写入数据的数据压缩率大于或等于80%,则进入步骤S7015。Specifically, the preset compression rate threshold is set according to specific needs, for example: 70%, 80%, 90% and other values, assuming that the compression rate threshold is 80%, if the data compression rate of the written data corresponding to the write request is less than 80%, enter step S7014; if the data compression ratio of the write data corresponding to the write request is greater than or equal to 80%, enter step S7015.
步骤S7014:确定写请求对应的压缩决策标记为压缩;Step S7014: Determine that the compression decision corresponding to the write request is marked as compression;
可以理解的是,若确定写请求对应的压缩决策标记为压缩,则意味着主机需要对该写请求对应的写入数据进行压缩。It can be understood that if it is determined that the compression decision corresponding to the write request is marked as compression, it means that the host needs to compress the written data corresponding to the write request.
步骤S7015:确定写请求对应的压缩决策标记为不压缩。Step S7015: Determine that the compression decision corresponding to the write request is marked as no compression.
可以理解的是,若确定写请求对应的压缩决策标记为不压缩,则意味着主机不需要对该写请求对应的写入数据进行压缩。It can be understood that if it is determined that the compression decision corresponding to the write request is marked as no compression, it means that the host does not need to compress the written data corresponding to the write request.
步骤S702:根据压缩决策标记,对写请求对应的写入数据进行压缩或不压缩,以向闪存设备发送写请求,其中,写请求包括压缩后的写入数据或原始的写入数据;Step S702: Compress or not compress the write data corresponding to the write request according to the compression decision flag, so as to send the write request to the flash memory device, wherein the write request includes compressed write data or original write data;
具体的,若压缩决策标记为压缩,则主机对写请求对应的写入数据进行压缩,以向闪存设备发送写请求,即将写请求中的压缩后的写入数据发送到闪存设备;若压缩决策标记为不压缩,则主机不对写请求对应的写入数据进行压缩,以向闪存设备发送写请求,即将写请求中的原始的写入数据发送到闪存设备。Specifically, if the compression decision is marked as compression, the host will compress the write data corresponding to the write request to send the write request to the flash memory device, that is, send the compressed write data in the write request to the flash memory device; if the compression decision If it is marked as no compression, the host does not compress the write data corresponding to the write request to send the write request to the flash memory device, that is, to send the original write data in the write request to the flash memory device.
步骤S703:在闪存设备接收到主机发送的写请求之后,根据写请求中的压缩标记信息,对写请求中的写入数据进行压缩或不压缩,以将压缩后的写入数据或原始的写入数据写入到闪存设备的闪存介质。Step S703: After the flash memory device receives the write request sent by the host, compress or uncompress the write data in the write request according to the compression tag information in the write request, so that the compressed write data or the original write data The input data is written to the flash media of the flash device.
具体的,在确定压缩决策标记之后,在写请求中加入压缩标记信息,其中,该压缩标记信息包括已压缩或未压缩,即闪存设备从主机接收到的写请求包含数据“已压缩”或者“未压缩”的标记,如果数据为已压缩,闪存设备就将数据写入闪存,如果数据未压缩,闪存设备就执行其内部的压缩决策逻辑来决定是否对这个写入数据进行压缩然后再写入闪存介质。可以理解的是,压缩决策标记与压缩标记信息对应,若压缩决策标记为压缩,则对应的压缩标记信息为已压缩,若压缩决策标记为不压缩,则对应的压缩标记信息为未压缩。Specifically, after the compression decision flag is determined, the compression flag information is added to the write request, wherein the compression flag information includes compressed or uncompressed, that is, the write request received by the flash memory device from the host contains data "compressed" or "compressed". If the data is compressed, the flash memory device will write the data into the flash memory. If the data is not compressed, the flash memory device will execute its internal compression decision logic to decide whether to compress the written data and then write flash media. It can be understood that the compression decision flag corresponds to the compression flag information. If the compression decision flag is compressed, the corresponding compression flag information is compressed, and if the compression decision flag is not compressed, the corresponding compression flag information is uncompressed.
在本申请实施例中,该写请求对应一段命令,在写请求中加入压缩标记信息相当于在写命令中添加一个标记位,例如:在NVMe基本规范v1.4中,命令的第8至15字节是预留字段,本申请实施例可以将第8字节写入1,来作为写入数据已压缩的标记。若第8字节未写入1,则表明写入数据未压缩。需要说明的是,此处的例子仅仅作为本申请实现上的一个举例说明,不对本申请的实际实现构成限制。In this embodiment of the application, the write request corresponds to a segment of commands. Adding compression flag information to the write request is equivalent to adding a flag bit to the write command. For example, in the NVMe basic specification v1.4, the 8th to 15th A byte is a reserved field, and in the embodiment of the present application, 1 can be written into the eighth byte as a mark that the written data has been compressed. If 1 is not written in the 8th byte, it indicates that the written data is not compressed. It should be noted that the example here is only used as an illustration of the implementation of the application, and does not limit the actual implementation of the application.
具体的,根据写请求中的压缩标记信息,对写请求中的写入数据进行压缩或不压缩,包括:Specifically, according to the compression mark information in the write request, the written data in the write request is compressed or not compressed, including:
若写请求中的压缩标记信息为未压缩,则闪存设备对写请求中的写入数据进行压缩;If the compression flag information in the write request is uncompressed, the flash memory device compresses the written data in the write request;
若写请求中的压缩标记信息为已压缩,则闪存设备不对写请求中的写入数据进行压缩。If the compression mark information in the write request is compressed, the flash memory device does not compress the written data in the write request.
可以理解的是,若闪存设备对写请求中的写入数据进行压缩,则将压缩后的写入数据写入到闪存设备的闪存介质中;若闪存设备不对写请求中的写入数据进行压缩,则将原始的写入数据写入到闪存设备的闪存介质。It can be understood that if the flash memory device compresses the write data in the write request, then write the compressed write data into the flash memory medium of the flash memory device; if the flash memory device does not compress the write data in the write request , then write the original write data to the flash medium of the flash device.
在一些实施例中,主机还包括主机压缩判断模块,该主机判断压缩模块连接主机驱动模块,其中,该主机压缩判断模块用于确定写请求对应的写入数据对应的压缩决策标记,并将该压缩决策标记返回到主机驱动模块。可以理解的是,该主机压缩判断模块可以包括处理器或微处理器,用于判断主机的处理器的利用率是否小于预设的利用率阈值,以及,判断写请求对应的写入数据的数据压缩率是否小于预设的压缩率阈值。In some embodiments, the host further includes a host compression judging module, and the host judging compression module is connected to the host driver module, wherein the host compression judging module is used to determine the compression decision flag corresponding to the write data corresponding to the write request, and set the Compression decision flags are returned to the host driver module. It can be understood that the host compression judging module may include a processor or a microprocessor for judging whether the utilization rate of the processor of the host is less than a preset utilization threshold, and judging whether the data written into the data corresponding to the write request Whether the compression rate is less than the preset compression rate threshold.
在一些实施例中,闪存设备还包括闪存压缩判断模块,该闪存压缩判断模块连接闪存控制模块,其中,该闪存压缩判断模块用于确定是否对写请求中的写入数据进行压缩。可以理解的是,该闪存压缩判断模块可以包括处理器或微处理器,用于获取闪存设备的处理器的利用率,以及精确估算写入数据的压缩率,进而判断闪存设备的处理器的利用率是否小于预设的利用率阈值,以及,判断写请求对应的写入数据的数据压缩率是否小于预设的压缩率阈值。In some embodiments, the flash memory device further includes a flash memory compression judging module connected to the flash memory control module, wherein the flash memory compression judging module is used to determine whether to compress the written data in the write request. It can be understood that the flash memory compression judging module may include a processor or a microprocessor, which is used to obtain the utilization rate of the processor of the flash memory device, and accurately estimate the compression rate of the written data, and then judge the utilization rate of the processor of the flash memory device. Whether the rate is less than a preset utilization rate threshold, and determine whether the data compression rate of the written data corresponding to the write request is less than the preset compression rate threshold.
请再参阅图9,图9是本申请实施例提供的一种数据写操作的示意图;Please refer to FIG. 9 again. FIG. 9 is a schematic diagram of a data writing operation provided by an embodiment of the present application;
如图9所示,主机包括主机压缩模块、主机压缩判断模块、系统模块以及主机驱动模块,闪存设备包括闪存压缩模块、闪存压缩判断模块、闪存控制模块以及闪存介质,其中,数据写操作的过程具体如下:As shown in Figure 9, the host includes a host compression module, a host compression judgment module, a system module, and a host driver module, and the flash memory device includes a flash memory compression module, a flash memory compression judgment module, a flash memory control module, and a flash memory medium, wherein the process of data writing operation details as follows:
(1)系统模块将写请求发送到主机驱动模块,其中,写请求包括逻辑地址信息和写入数据。在本申请实施例中,写请求包括主机写命令(HostCmd),该主机写命令包括:主机写命令的标识(Cmd ID)、逻辑块地址(Logical Block Address,Lba)以及待写入数据。(1) The system module sends a write request to the host driver module, wherein the write request includes logical address information and write data. In the embodiment of the present application, the write request includes a host write command (HostCmd), and the host write command includes: an identifier (Cmd ID) of the host write command, a logical block address (Logical Block Address, Lba) and data to be written.
(2)主机驱动模块根据主机压缩控制策略,确定写请求对应的压缩决策标记;或者,主机压缩判断模块根据主机压缩控制策略,确定写请求对应的压缩决策标记,并将该压缩决策标记返回到主机驱动模块。(2) The host driver module determines the compression decision mark corresponding to the write request according to the host compression control strategy; or, the host compression judgment module determines the compression decision mark corresponding to the write request according to the host compression control strategy, and returns the compression decision mark to Host driver module.
(3)主机驱动模块根据压缩决策标记,确定是否调用主机压缩模块对该写请求对应的写入数据进行压缩。若压缩决策标记为压缩,则控制主机压缩模块对该写入数据进行压缩;若压缩决策标记为不压缩,则不控制该主机压缩模块对该写入数据进行压缩。(3) The host driver module determines whether to invoke the host compression module to compress the written data corresponding to the write request according to the compression decision flag. If the compression decision is marked as compression, the host compression module is controlled to compress the written data; if the compression decision is marked as no compression, the host compression module is not controlled to compress the written data.
(4)主机驱动模块向闪存控制模块提交写请求,该写请求包括逻辑地址信息、压缩后的写入数据或原始的写入数据、压缩标记信息。(4) The host drive module submits a write request to the flash memory control module, and the write request includes logical address information, compressed write data or original write data, and compression mark information.
(5)闪存控制模块在接收到主机驱动模块发送的写请求之后,检查压缩标记信息,若压缩标记信息为已压缩,则将压缩后的写入数据写入到闪存介质;若压缩标记信息为未压缩,则闪存控制模块根据闪存压缩控制策略,确定是否对写请求中的写入数据进行压缩。或者,闪存控制模块调用闪存压缩判断模块判断是否对该读出数据进行压缩,使得闪存压缩判断模块将判断结果发送到该闪存控制模块。(5) The flash memory control module checks the compression mark information after receiving the write request sent by the host driver module, and if the compression mark information is compressed, then writes the compressed write data to the flash memory medium; if the compression mark information is If not compressed, the flash memory control module determines whether to compress the written data in the write request according to the flash memory compression control strategy. Alternatively, the flash memory control module calls the flash memory compression judgment module to judge whether to compress the read data, so that the flash memory compression judgment module sends the judgment result to the flash memory control module.
(6)闪存控制模块根据确定结果或判断结果来确定是否调用闪存压缩模块来对写入数据进行压缩,若确定结果为压缩,则对写入数据进行压缩;若确定结果为不压缩,则不对写入数据进行压缩。(6) The flash memory control module determines whether to call the flash memory compression module to compress the written data according to the determination result or the judgment result, if the determined result is compressed, then the written data is compressed; if the determined result is not compressed, then no Write data for compression.
(7)闪存控制模块在其固件模块中的闪存算法模块中记录写入地址的压缩标记以及逻辑物理地址映射信息,并将写请求对应的写入数据写入到闪存介质。(7) The flash memory control module records the compression mark of the write address and the logical physical address mapping information in the flash memory algorithm module in its firmware module, and writes the write data corresponding to the write request to the flash memory medium.
请再参阅图10,图10是本申请实施例提供的一种闪存设备的固件模块的结构示意图;Please refer to FIG. 10 again. FIG. 10 is a schematic structural diagram of a firmware module of a flash memory device provided by an embodiment of the present application;
其中,该固件模块用于连接主机(HOST)和闪存介质(NAND),实现数据IO的处理。Wherein, the firmware module is used to connect the host (HOST) and the flash memory medium (NAND) to realize the processing of data IO.
如图10所示,该固件模块10,连接主机200以及硬件模块20,包括:As shown in FIG. 10, the
前端模块101,即(Front End,FE),用于获取主机命令,以产生IO操作,其中,前端模块还用于负责和主机(Host)的通信协议,主机命令、固态硬盘命令的解析等操作;The front-
闪存算法模块102,即闪存转换层(Flash translation layer,FTL),连接数据处理模块,用于对IO操作进行映射处理,以确定下发的闪存介质;其中,闪存算法模块(FlashTranslation Layer,FTL)向固态硬盘控制器的后端模块(Back End,BE)发送IO操作,以使固态硬盘控制器的后端模块接收闪存算法模块发送的IO操作;The flash
后端模块103,即(Back End,BE),连接闪存算法模块,用于接收闪存算法模块发送的IO操作,以控制硬件模块对闪存介质进行读/写/擦操作;The back-
在本申请实施例中,硬件模块20,即(HW Op Nand Mode),指的是操作FLASH闪存的模块,连接后端模块103,由后端模块103进行控制,用于操作FLASH闪存,例如:根据IO操作,向对应的闪存介质进行操作,即完成数据到FLASH闪存的操作处理,操作包括读操作、写操作,和擦操作等。In the embodiment of the present application, the
其中,前端模块获取到主机命令后,进行处理以产生IO操作,并依次通过闪存算法模块、后端模块以及硬件模块,以对闪存介质进行操作。例如:主机读数据时,主机(Host)发送主机命令给闪存设备(device),闪存设备的前端模块(FE)接收到主机命令,进行处理后分发到闪存算法模块(FTL),闪存算法模块收到后,通过逻辑到物理的转化处理,然后将请求NAND读操作发送给后端模块(BE),后端模块接收到读操作之后,将硬件指令发送给硬件模块(HW Op Nand Mode),由硬件模块并行地进行操作NAND处理。Wherein, after the front-end module obtains the host command, it processes to generate an IO operation, and sequentially passes through the flash memory algorithm module, the back-end module and the hardware module to operate the flash memory medium. For example: when the host reads data, the host (Host) sends the host command to the flash memory device (device), and the front-end module (FE) of the flash memory device receives the host command, processes it and distributes it to the flash algorithm module (FTL), and the flash algorithm module receives After that, through logic-to-physical conversion processing, the requested NAND read operation is then sent to the back-end module (BE). After the back-end module receives the read operation, it sends the hardware instruction to the hardware module (HW Op Nand Mode), and the The hardware modules operate NAND processing in parallel.
(8)闪存控制模块将写请求的响应信息返回给主机驱动模块。(8) The flash memory control module returns the response information of the write request to the host driver module.
(9)主机驱动模块将写请求对应的响应信息返回给系统模块,以使系统模块将写请求对应的响应信息返回给写请求对应的应用程序,从而使本次的写操作结束。(9) The host drive module returns the response information corresponding to the write request to the system module, so that the system module returns the response information corresponding to the write request to the application program corresponding to the write request, so that the current write operation ends.
在本申请实施例中,通过主机和闪存设备的各个模块之间的交互和处理,从而完成数据写操作的过程,能够协同主机和闪存设备的处理,提高闪存设备的写性能。In the embodiment of the present application, the data writing process is completed through the interaction and processing between the host and each module of the flash memory device, and the processing of the host and the flash memory device can be coordinated to improve the write performance of the flash memory device.
在本申请实施例中,通过提供一种数据存储方法,应用于上述实施例的数据存储系统,该方法包括:在主机接收到写请求之后,根据主机压缩控制策略,确定写请求对应的压缩决策标记;根据压缩决策标记,对写请求对应的写入数据进行压缩或不压缩,以向闪存设备发送写请求,其中,写请求包括压缩后的写入数据或原始的写入数据;在闪存设备接收到主机发送的写请求之后,根据写请求中的压缩标记信息,对写请求中的写入数据进行压缩或不压缩,以将压缩后的写入数据或原始的写入数据写入到闪存设备的闪存介质。通过确定写请求对应的压缩决策标记,根据压缩决策标记来确定对写入数据进行压缩或不压缩,从而将压缩后的写入数据或原始的写入数据写入到闪存设备的闪存介质,本申请能够降低写延时,从而提高闪存设备的写性能。In this embodiment of the present application, a data storage method is provided, which is applied to the data storage system of the above embodiment, and the method includes: after the host receives the write request, according to the host compression control strategy, determine the compression decision corresponding to the write request mark; according to the compression decision mark, the write data corresponding to the write request is compressed or not compressed, so as to send the write request to the flash memory device, wherein the write request includes the compressed write data or the original write data; in the flash memory device After receiving the write request sent by the host, compress or uncompress the write data in the write request according to the compression tag information in the write request, so as to write the compressed write data or the original write data to the flash memory The device's flash media. By determining the compression decision flag corresponding to the write request, according to the compression decision flag, it is determined whether to compress or not compress the written data, so as to write the compressed written data or the original written data to the flash memory medium of the flash memory device. Application can reduce write latency, thereby improving the write performance of flash memory devices.
请参阅图11,图11是本申请实施例提供的另一种数据存储方法的流程示意图;Please refer to Fig. 11, Fig. 11 is a schematic flowchart of another data storage method provided by the embodiment of the present application;
其中,该数据存储方法,应用于上述实施例提供的数据存储系统。Wherein, the data storage method is applied to the data storage system provided in the foregoing embodiments.
如图11所示,该数据存储方法,包括:As shown in Figure 11, the data storage method includes:
步骤S111:在主机接收到读请求之后,向闪存设备发送读请求;Step S111: after the host receives the read request, send the read request to the flash memory device;
具体的,主机驱动模块在接收到系统模块发送的读请求之后,向闪存设备的闪存控制模块发送该读请求。Specifically, after receiving the read request sent by the system module, the host driver module sends the read request to the flash memory control module of the flash memory device.
步骤S112:在闪存设备接收到读请求之后,若读请求对应的读出数据为压缩数据,则根据解压缩控制策略,确定读出数据对应的解压缩决策标记;Step S112: After the flash memory device receives the read request, if the read data corresponding to the read request is compressed data, then determine the decompression decision flag corresponding to the read data according to the decompression control strategy;
在一些实施例中,根据解压缩控制策略,确定读出数据对应的解压缩决策标记,包括:In some embodiments, according to the decompression control strategy, determining the decompression decision flag corresponding to the read data includes:
若闪存设备中的解压缩队列未填满,并且,主机与闪存设备的接口带宽利用率小于预设的带宽利用率阈值,则确定读出数据对应的解压缩决策标记为解压缩;If the decompression queue in the flash memory device is not full, and the bandwidth utilization of the interface between the host and the flash memory device is less than the preset bandwidth utilization threshold, then determine that the decompression decision corresponding to the read data is marked as decompression;
若闪存设备中的解压缩队列已填满,或者,主机与闪存设备的接口带宽利用率不小于预设的带宽利用率阈值,则确定读出数据对应的解压缩决策标记为不解压缩。If the decompression queue in the flash memory device is full, or the bandwidth utilization rate of the interface between the host and the flash memory device is not less than the preset bandwidth utilization rate threshold, it is determined that the decompression decision corresponding to the read data is marked as no decompression.
另外,本申请还可以支持主机的读请求中设置“主机解压”标记,该主机解压标记用于通知闪存设备无需对读出的数据做解压,解压操作将由主机接收到读响应后在主机端执行。其中,返回给主机的数据是压缩形式还是非压缩形式,将由读响应中的一个位图来表示。In addition, this application can also support setting the "host decompression" flag in the read request of the host. The host decompression flag is used to notify the flash memory device that there is no need to decompress the read data, and the decompression operation will be executed on the host side after the host receives the read response. . Among them, whether the data returned to the host is compressed or uncompressed will be represented by a bitmap in the read response.
具体的,请再参阅图12,图12是图11中的步骤S112的细化流程图;Specifically, please refer to FIG. 12 again. FIG. 12 is a detailed flowchart of step S112 in FIG. 11;
如图12所示,该步骤S112,包括:As shown in Figure 12, the step S112 includes:
步骤S1121:获取闪存设备中的解压缩队列的队列信息以及主机与闪存设备的接口带宽利用率;Step S1121: Obtain the queue information of the decompression queue in the flash memory device and the bandwidth utilization rate of the interface between the host and the flash memory device;
具体的,闪存设备的固件模块中维护一个解压缩队列,该解压缩队列的队列信息用于标识该解压缩队列的当前状态,例如:当前的队列长度。可以理解的是,当前的队列长度小于或等于该解压缩队列的队列总长度。Specifically, a decompression queue is maintained in the firmware module of the flash memory device, and the queue information of the decompression queue is used to identify the current state of the decompression queue, for example, the current queue length. It can be understood that the current queue length is less than or equal to the total queue length of the decompression queue.
步骤S1122:判断闪存设备中的解压缩队列是否未填满;Step S1122: judging whether the decompression queue in the flash memory device is not full;
具体的,判断闪存设备中的解压缩队列是否未填满,包括:判断闪存设备的固件模块中的解压缩队列的当前的队列长度是否小于解压缩队列的队列总长度,若是,则确定闪存设备中的解压缩队列未填满;若否,则确定闪存设备中的解压缩队列已填满。Specifically, judging whether the decompression queue in the flash memory device is not full includes: judging whether the current queue length of the decompression queue in the firmware module of the flash memory device is less than the total length of the queue of the decompression queue, if so, then determining whether the flash memory device The decompression queue in the flash device is not filled; if not, it is determined that the decompression queue in the flash memory device is full.
若闪存设备中的解压缩队列未填满,则进入步骤S1123;If the decompression queue in the flash memory device is not full, then enter step S1123;
若闪存设备中的解压缩队列已填满,则进入步骤S1124。If the decompression queue in the flash memory device is full, go to step S1124.
步骤S1123:判断主机与闪存设备的接口带宽利用率是否小于预设的带宽利用率阈值;Step S1123: judging whether the bandwidth utilization rate of the interface between the host and the flash memory device is less than a preset bandwidth utilization rate threshold;
具体的,预设的带宽利用率阈值根据具体需要进行设置,例如:70%、80%、90%等数值,假设该带宽利用率阈值为80%,若主机与闪存设备的接口带宽利用率小于80%,则进入步骤S1124;若主机与闪存设备的接口带宽利用率大于或等于80%,则进入步骤S1125。Specifically, the preset bandwidth utilization threshold is set according to specific needs, for example: 70%, 80%, 90% and other values, assuming that the bandwidth utilization threshold is 80%, if the bandwidth utilization of the interface between the host and the flash memory device is less than 80%, then enter step S1124; if the bandwidth utilization rate of the interface between the host and the flash memory device is greater than or equal to 80%, then enter step S1125.
步骤S1124:确定读出数据对应的解压缩决策标记为解压缩;Step S1124: Determine that the decompression decision mark corresponding to the read data is decompression;
具体的,解压缩决策标记用于确定闪存设备是否对该读出数据进行解压缩,若解压缩决策标记为解压缩,则闪存设备中的闪存控制模块调用闪存解压模块对该读出数据进行解压;若解压缩决策标记为不解压缩,则闪存设备中的闪存控制模块不调用闪存解压模块对该读出数据进行解压。Specifically, the decompression decision flag is used to determine whether the flash memory device decompresses the read data. If the decompression decision mark is decompression, the flash memory control module in the flash memory device calls the flash memory decompression module to decompress the read data. ; If the decompression decision is marked as no decompression, the flash memory control module in the flash memory device does not call the flash memory decompression module to decompress the read data.
步骤S1125:确定读出数据对应的解压缩决策标记为不解压缩。Step S1125: Determine that the decompression decision mark corresponding to the read data is not decompressed.
步骤S113:闪存设备根据解压缩决策标记,确定是否对读出数据进行解压缩,以将解压缩后的读出数据或未解压的读出数据返回主机。Step S113: The flash memory device determines whether to decompress the read data according to the decompression decision flag, so as to return the decompressed read data or the uncompressed read data to the host.
具体的,若解压缩决策标记为解压缩,则闪存控制模块调用闪存解压模块对读出数据进行解压缩,并将解压缩后的读出数据返回主机的主机驱动模块;Specifically, if the decompression decision is marked as decompression, the flash memory control module calls the flash memory decompression module to decompress the read data, and returns the decompressed read data to the host drive module of the host;
若解压缩决策标记为不解压缩,则闪存控制模块不调用闪存解压模块对读出数据进行解压缩,并将未解压的读出数据返回主机的主机驱动模块。If the decompression decision is marked as no decompression, the flash control module does not call the flash decompression module to decompress the read data, and returns the undecompressed read data to the host drive module of the host.
请再参阅图13,图13是本申请实施例提供的一种数据读操作的示意图;Please refer to FIG. 13 again. FIG. 13 is a schematic diagram of a data read operation provided by an embodiment of the present application;
如图13所示,主机包括主机解压判断模块、主机解压模块、系统模块以及主机驱动模块,闪存设备包括闪存解压模块、闪存解压判断模块、闪存控制模块以及闪存介质,其中,数据读操作的过程具体如下:As shown in Figure 13, the host includes a host decompression judgment module, a host decompression module, a system module, and a host drive module, and the flash memory device includes a flash memory decompression module, a flash memory decompression judgment module, a flash memory control module, and a flash memory medium. details as follows:
(1)系统模块向主机驱动模块发送读请求,该读请求包括逻辑地址列表以及期待读出的数据长度。在本申请实施例中,读请求包括主机读命令(HostCmd),该主机读命令包括:主机写命令的标识(Cmd ID)、逻辑块地址(Logical Block Address,Lba)以及要读的地址长度(Len),其中,相对于主机而言,逻辑块地址一般是512Byte,4k等等。(1) The system module sends a read request to the host driver module, and the read request includes a list of logical addresses and the length of data expected to be read. In the embodiment of the present application, the read request includes a host read command (HostCmd), and the host read command includes: the identifier (Cmd ID) of the host write command, the logical block address (Logical Block Address, Lba) and the address length to be read ( Len), wherein, relative to the host, the logical block address is generally 512Byte, 4k, etc.
(2)主机驱动模块向闪存控制模块发送读请求。(2) The host drive module sends a read request to the flash memory control module.
(3)闪存控制模块查询固件模块中的闪存算法模块中记录的写入地址、压缩标记以及逻辑物理地址映射信息,从闪存介质中读取该读请求需要的读出数据。(3) The flash memory control module queries the write address, compression mark and logical physical address mapping information recorded in the flash memory algorithm module in the firmware module, and reads the read data required by the read request from the flash memory medium.
(4)闪存控制模块根据该读出数据对应的压缩标记信息,确定该读出数据是否为压缩后的数据,若是,则闪存控制模块进一步判断是否对该读出数据进行解压缩;或者,闪存控制模块调用闪存解压判断模块判断是否对该读出数据进行解压缩,使得闪存解压判断模块将判断结果发送到该闪存控制模块。(4) The flash memory control module determines whether the read data is compressed data according to the compression mark information corresponding to the read data, if so, the flash memory control module further judges whether the read data is decompressed; or, the flash memory The control module calls the flash memory decompression judgment module to judge whether to decompress the read data, so that the flash memory decompression judgment module sends the judgment result to the flash memory control module.
具体的,判断是否对该读出数据进行解压缩,包括:根据解压缩控制策略,确定读出数据对应的解压缩决策标记,其中,根据解压缩控制策略,确定读出数据对应的解压缩决策标记,包括:Specifically, judging whether to decompress the read data includes: determining the decompression decision flag corresponding to the read data according to the decompression control strategy, wherein, according to the decompression control strategy, determining the decompression decision corresponding to the read data tags, including:
若闪存设备中的解压缩队列未填满,并且,主机与闪存设备的接口带宽利用率小于预设的带宽利用率阈值,则确定读出数据对应的解压缩决策标记为解压缩;If the decompression queue in the flash memory device is not full, and the bandwidth utilization of the interface between the host and the flash memory device is less than the preset bandwidth utilization threshold, then determine that the decompression decision corresponding to the read data is marked as decompression;
若闪存设备中的解压缩队列已填满,或者,主机与闪存设备的接口带宽利用率不小于预设的带宽利用率阈值,则确定读出数据对应的解压缩决策标记为不解压缩。If the decompression queue in the flash memory device is full, or the bandwidth utilization rate of the interface between the host and the flash memory device is not less than the preset bandwidth utilization rate threshold, it is determined that the decompression decision corresponding to the read data is marked as no decompression.
(5)闪存控制模块根据解压缩决策标记,确定是否对该读出数据进行解压缩,若该解压缩决策标记为解压缩,则闪存控制模块调用闪存解压模块对该读出数据进行解压缩;若该解压缩决策标记为不解压缩,则闪存控制模块不调用闪存解压模块对该读出数据进行解压缩。(5) The flash memory control module determines whether the read data is decompressed according to the decompression decision mark, and if the decompression decision mark is decompressed, the flash memory control module calls the flash memory decompression module to decompress the read data; If the decompression decision is marked as no decompression, the flash memory control module does not call the flash memory decompression module to decompress the read data.
(6)闪存控制模块将读请求对应的响应信息返回主机驱动模块,其中,该读请求对应的响应信息包括读出数据以及读出数据的压缩标记,该压缩标记用于指示该读出数据的压缩状态,压缩状态包括未压缩或已压缩,即压缩标记包括未压缩或已压缩。(6) The flash memory control module returns the response information corresponding to the read request to the host driver module, wherein the response information corresponding to the read request includes the read data and the compression mark of the read data, and the compression mark is used to indicate the compression mark of the read data Compression state, the compression state includes uncompressed or compressed, that is, the compression flag includes uncompressed or compressed.
(7)主机驱动模块检查闪存控制模块返回的读请求对应的响应信息,若读请求对应的响应信息中的读出数据的压缩标记,若读出数据的压缩标记为未压缩,则在主机中,确定该读出数据对应的解压缩决策标记为不解压缩;若读出数据的压缩标记为已压缩,则在主机中,确定该读出数据对应的解压缩决策标记为解压缩。(7) The host drive module checks the response information corresponding to the read request returned by the flash memory control module. If the compression mark of the read data in the response information corresponding to the read request is uncompressed, then in the host , determine that the decompression decision mark corresponding to the read data is not decompressed; if the compression mark of the read data is compressed, then in the host, determine that the decompression decision mark corresponding to the read data is decompression.
(8)主机驱动模块根据解压缩决策标记来确定是否调用主机解压模块对该读出数据进行解压缩。若解压缩决策标记为解压缩,则对该读出数据进行解压缩;若解压缩决策标记为不解压缩,则不对该写入数据进行解压缩。可以理解的是,在主机接收到闪存设备发送的未解压的读出数据之后,主机对未解压的读出数据进行解压。(8) The host driver module determines whether to call the host decompression module to decompress the read data according to the decompression decision flag. If the decompression decision is marked as decompression, the read data is decompressed; if the decompression decision is marked as no decompression, the written data is not decompressed. It can be understood that, after the host receives the uncompressed read data sent by the flash memory device, the host decompresses the uncompressed read data.
(9)主机驱动模块向系统模块返回读请求对应的响应信息,以使系统模块将读请求对应的响应信息返回给读请求对应的应用程序,从而使本次的读操作结束。(9) The host drive module returns the response information corresponding to the read request to the system module, so that the system module returns the response information corresponding to the read request to the application program corresponding to the read request, so that the current read operation ends.
在本申请实施例中,通过主机和闪存设备的各个模块之间的交互和处理,从而完成数据读操作的过程,能够协同主机和闪存设备的处理,提高闪存设备的读性能。In the embodiment of the present application, the data read operation process is completed through the interaction and processing between the host and each module of the flash memory device, and the processing of the host and the flash memory device can be coordinated to improve the read performance of the flash memory device.
并且,通过闪存设备的闪存控制模块与固件模块之间的统一协议,不改变传统的逻辑页数据结构,添加数据状态信息来指示逻辑页是压缩状态或者非压缩状态,例如:在包含多个页的读响应数据中添加一个位图,位图中的每个位用于标记对应的页面是压缩还是非压缩状态,并且主机端的固态盘驱动和固态盘内部的固件在系统运行时能够根据压缩状态或者非压缩状态来有区别地对写入的数据页做相应的读写处理,能够提高闪存设备的整体性能。Moreover, through the unified protocol between the flash memory control module and the firmware module of the flash memory device, the traditional logical page data structure is not changed, and data status information is added to indicate whether the logical page is in a compressed state or an uncompressed state, for example: when multiple pages are included Each bit in the bitmap is used to mark whether the corresponding page is compressed or uncompressed, and the solid-state disk drive on the host side and the firmware inside the solid-state disk can be based on the compressed state when the system is running Or perform corresponding read and write processing on the written data pages in a non-compressed state, which can improve the overall performance of the flash memory device.
并且,通过利用主机的空闲计算资源来提升闪存设备可达到的IOPS、带宽,能够降低读写延时。In addition, by using the idle computing resources of the host to increase the IOPS and bandwidth that can be achieved by the flash memory device, the read and write delay can be reduced.
在本申请实施例中,通过提供一种数据存储方法,应用于上述实施例的数据存储系统,该方法包括:在主机接收到读请求之后,向闪存设备发送读请求;在闪存设备接收到读请求之后,若读请求对应的读出数据为压缩数据,则根据解压缩控制策略,确定读出数据对应的解压缩决策标记;闪存设备根据解压缩决策标记,确定是否对读出数据进行解压缩,以将解压缩后的读出数据或未解压的读出数据返回主机。通过解压缩控制策略确定读出数据对应的解压缩决策标记,根据解压缩决策标记来确定是否对读出数据进行解压缩,以将解压缩后的读出数据或未解压的读出数据返回主机,本申请能够降低闪存设备的读延时,从而提高闪存设备的读性能。In this embodiment of the present application, by providing a data storage method, which is applied to the data storage system of the above embodiment, the method includes: sending a read request to the flash memory device after the host receives the read request; After the request, if the read data corresponding to the read request is compressed data, determine the decompression decision flag corresponding to the read data according to the decompression control strategy; the flash memory device determines whether to decompress the read data according to the decompression decision flag , to return decompressed read data or uncompressed read data to the host. Determine the decompression decision mark corresponding to the read data through the decompression control strategy, and determine whether to decompress the read data according to the decompression decision mark, so as to return the decompressed read data or uncompressed read data to the host , the present application can reduce the read delay of the flash memory device, thereby improving the read performance of the flash memory device.
本申请实施例还提供了一种非易失性计算机存储介质,计算机存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如上述一个或多个处理器可执行上述任意方法实施例中的数据存储方法,例如,执行上述任意方法实施例中的数据存储方法,例如,执行以上描述的各个步骤。The embodiment of the present application also provides a non-volatile computer storage medium. The computer storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors. For example, the above-mentioned one or more processors may Execute the data storage method in any of the above method embodiments, for example, execute the data storage method in any of the above method embodiments, for example, perform the steps described above.
以上所描述的装置或设备实施例仅仅是示意性的,其中作为分离部件说明的单元模块可以是或者也可以不是物理上分开的,作为模块单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络模块单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The above-described device or device embodiments are only illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as modular units may or may not be physical units, that is It can be located in one place, or it can be distributed to multiple network module units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用直至得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solutions or the part that contributes to related technologies can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, disk , optical disk, etc., including several instructions until a computer device (which may be a personal computer, server, or network device, etc.) executes the methods of each embodiment or some parts of the embodiment.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上的本申请的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; under the thinking of the present application, the above embodiments or technical features in different embodiments can also be combined, The steps can be performed in any order, and there are many other variations of the different aspects of the application as above, which are not presented in detail for the sake of brevity; although the application has been described in detail with reference to the preceding examples, those of ordinary skill in the art It should be understood that it is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technology of each embodiment of the application. scope of the program.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211655129.7A CN116243854B (en) | 2022-12-22 | 2022-12-22 | Data storage system and data storage method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211655129.7A CN116243854B (en) | 2022-12-22 | 2022-12-22 | Data storage system and data storage method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116243854A true CN116243854A (en) | 2023-06-09 |
CN116243854B CN116243854B (en) | 2024-12-06 |
Family
ID=86623281
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211655129.7A Active CN116243854B (en) | 2022-12-22 | 2022-12-22 | Data storage system and data storage method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116243854B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012794A (en) * | 2010-11-19 | 2011-04-13 | 北京兆易创新科技有限公司 | Solid state disk and access control method thereof, and solid state disk controller |
CN109614043A (en) * | 2018-12-04 | 2019-04-12 | 郑州云海信息技术有限公司 | A data compression method, apparatus, system and computer-readable storage medium |
CN110795497A (en) * | 2018-08-02 | 2020-02-14 | 阿里巴巴集团控股有限公司 | Cooperative compression in distributed storage systems |
CN111984610A (en) * | 2020-09-27 | 2020-11-24 | 苏州浪潮智能科技有限公司 | Data compression method, apparatus and computer readable storage medium |
US20210081544A1 (en) * | 2019-09-12 | 2021-03-18 | International Business Machines Corporation | Dynamic compression with dynamic multi-stage encryption for a data storage system |
CN114461589A (en) * | 2021-08-24 | 2022-05-10 | 荣耀终端有限公司 | Method for reading compressed file, file system and electronic equipment |
-
2022
- 2022-12-22 CN CN202211655129.7A patent/CN116243854B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102012794A (en) * | 2010-11-19 | 2011-04-13 | 北京兆易创新科技有限公司 | Solid state disk and access control method thereof, and solid state disk controller |
CN110795497A (en) * | 2018-08-02 | 2020-02-14 | 阿里巴巴集团控股有限公司 | Cooperative compression in distributed storage systems |
CN109614043A (en) * | 2018-12-04 | 2019-04-12 | 郑州云海信息技术有限公司 | A data compression method, apparatus, system and computer-readable storage medium |
US20210081544A1 (en) * | 2019-09-12 | 2021-03-18 | International Business Machines Corporation | Dynamic compression with dynamic multi-stage encryption for a data storage system |
CN111984610A (en) * | 2020-09-27 | 2020-11-24 | 苏州浪潮智能科技有限公司 | Data compression method, apparatus and computer readable storage medium |
CN114461589A (en) * | 2021-08-24 | 2022-05-10 | 荣耀终端有限公司 | Method for reading compressed file, file system and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN116243854B (en) | 2024-12-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103136109B (en) | A kind of solid-state memory system FTL write with compression function and read method | |
CN112035381A (en) | Storage system and storage data processing method | |
CN105094709A (en) | Dynamic data compression method for solid-state disc storage system | |
WO2017132797A1 (en) | Data arrangement method, storage apparatus, storage controller and storage array | |
CN118363914B (en) | Data processing method, solid state disk device and host | |
CN115826882B (en) | Storage method, device, equipment and storage medium | |
WO2023226797A1 (en) | Data compression method and flash memory device | |
CN114860158A (en) | High-speed data acquisition and recording method | |
KR20210018570A (en) | Controller, operating method thereof and storage device including the same | |
CN116774905A (en) | A storage device and related data partition management method | |
CN114265791A (en) | Data scheduling method, chip and electronic equipment | |
US20240241826A1 (en) | Computing node cluster, data aggregation method, and related device | |
CN111176566B (en) | eMMC read-write control method supporting queue command and storage medium | |
CN115079936A (en) | Data writing method and device | |
CN115587076B (en) | Data decompression system, graphics processing system, component, device and decompression method | |
WO2024130890A1 (en) | Solid state drive garbage collection method, solid state drive garbage collection acceleration apparatus, and device and computer medium | |
CN116243854A (en) | Data storage system and data storage method | |
CN117149070A (en) | Data transmission method and solid state disk system | |
CN113495850B (en) | Method, apparatus and computer readable storage medium for managing garbage collection program | |
TW202314529A (en) | Method and apparatus for programming data into flash memory | |
US12242725B2 (en) | Electronic device and computing system including same | |
US20050204081A1 (en) | [data compression/decompression device and system applying the same] | |
CN117806570B (en) | Online memory expansion method, device, equipment and storage medium | |
US20250110668A1 (en) | Cxl memory module and controller, method for accessing data, and storage system | |
US11733917B2 (en) | High bandwidth controller memory buffer (CMB) for peer to peer data transfer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Country or region after: China Address after: 518000 3501, venture capital building, No. 9, Tengfei Road, huanggekeng community, Longcheng street, Longgang District, Shenzhen, Guangdong Province Applicant after: Shenzhen Dapu Microelectronics Co.,Ltd. Address before: 518000 room 3501, venture capital building, No. 9, Tengfei Road, Longgang District, Shenzhen, Guangdong Province Applicant before: SHENZHEN DAPU MICROELECTRONICS Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |