[go: up one dir, main page]

CN111813340A - Solid-state drive-based command response method, system, device and electronic device - Google Patents

Solid-state drive-based command response method, system, device and electronic device Download PDF

Info

Publication number
CN111813340A
CN111813340A CN202010663906.7A CN202010663906A CN111813340A CN 111813340 A CN111813340 A CN 111813340A CN 202010663906 A CN202010663906 A CN 202010663906A CN 111813340 A CN111813340 A CN 111813340A
Authority
CN
China
Prior art keywords
data
block
target block
solid
responded
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.)
Pending
Application number
CN202010663906.7A
Other languages
Chinese (zh)
Inventor
张宏海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010663906.7A priority Critical patent/CN111813340A/en
Publication of CN111813340A publication Critical patent/CN111813340A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

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)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明实施例提供了一种基于固态硬盘的指令响应方法、系统、装置及电子设备,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。

Figure 202010663906

Embodiments of the present invention provide a method, system, device, and electronic device for responding to commands based on solid-state drives. Since the electronic device records block information of blocks included in each solid-state drive connected to the electronic device, the electronic device can The recorded block information selects the target block used to respond to the operation command to be responded from the blocks contained in each solid-state drive, and integrates each solid-state drive connected to the electronic device as a whole, avoiding each solid-state drive responding to the operation independently. The instruction reduces the difference in the usage of each solid-state hard disk, thereby facilitating the use and maintenance of the solid-state hard disk in the storage device.

Figure 202010663906

Description

基于固态硬盘的指令响应方法、系统、装置及电子设备Solid-state drive-based command response method, system, device and electronic device

技术领域technical field

本发明涉及数据存储技术领域,特别是涉及一种基于固态硬盘的指令响应方法、系统、装置及电子设备。The present invention relates to the technical field of data storage, and in particular, to an instruction response method, system, device and electronic device based on a solid-state hard disk.

背景技术Background technique

固态硬盘(SSD,Solid State Disk)是用固态电子存储芯片阵列制成的硬盘,具有高速、高环境适应能力和低噪音的优点,基于这些优点,当前在各个领域使用固态硬盘进行数据的读写已成为趋势。Solid State Disk (SSD, Solid State Disk) is a hard disk made of solid-state electronic storage chip array, which has the advantages of high speed, high environmental adaptability and low noise. Based on these advantages, SSD is currently used in various fields to read and write data. has become a trend.

由于固态硬盘的特殊性,每个固态硬盘均包含有控制单元,每个固态硬盘均由其包含的控制单元对各种操作指令进行响应。Due to the particularity of the solid state drive, each solid state drive includes a control unit, and each solid state drive responds to various operation commands by the control unit included in the solid state drive.

由于单个固态硬盘的容量有限,故而在实际使用的过程中往往会将多个固态硬盘集成在一个存储设备进行使用,又由于每个固态硬盘都是独自对各自所接收的操作指令进行响应,使得一个存储设备中包含的固态硬盘的使用情况往往存在较大的差异性,不利于对存储设备中固态硬盘的使用和维护。Due to the limited capacity of a single solid-state drive, in actual use, multiple solid-state drives are often integrated into one storage device for use, and since each solid-state drive responds to its own operation instructions, making The usage conditions of the solid-state drives included in a storage device are often quite different, which is not conducive to the use and maintenance of the solid-state drives in the storage device.

发明内容SUMMARY OF THE INVENTION

本发明实施例的目的在于提供一种基于固态硬盘的指令响应方法、系统、装置及电子设备,以有利于对存储设备中固态硬盘的使用和维护。具体技术方案如下:The purpose of the embodiments of the present invention is to provide an instruction response method, system, device and electronic device based on a solid-state hard disk, so as to facilitate the use and maintenance of the solid-state hard disk in the storage device. The specific technical solutions are as follows:

本发明实施例提供了一种基于固态硬盘的指令响应方法,应用于电子设备,所述电子设备连接有固态硬盘,所述方法包括:An embodiment of the present invention provides an instruction response method based on a solid-state hard disk, which is applied to an electronic device, where the electronic device is connected with a solid-state hard disk, and the method includes:

获得待响应操作指令;Obtain the operation command to be responded;

基于本地记录的区块信息,从所连接的各个固态硬盘包含的与所述待响应操作指令的类型相匹配的所有区块中,选择用于响应所述待响应操作指令的目标区块;Based on the locally recorded block information, from all the blocks contained in the connected solid-state drives that match the type of the operation instruction to be responded, select a target block for responding to the operation instruction to be responded;

控制所述目标区块所属的固态硬盘在所述目标区块上响应所述待响应操作指令。The solid state drive to which the target block belongs is controlled to respond to the to-be-responded operation command on the target block.

本发明的一个实施例中,所述待响应操作指令为:用于指示对所述固态硬盘中出现的损坏区块进行重映射的指令;In an embodiment of the present invention, the operation instruction to be responded is: an instruction for instructing to remap the damaged block appearing in the solid-state hard disk;

所述基于本地记录的区块信息,从所连接的各个固态硬盘包含的与所述待响应操作指令的类型相匹配的所有区块中,选择用于响应所述待响应操作指令的目标区块,包括:Based on the locally recorded block information, from all the blocks contained in the connected solid-state drives that match the type of the operation instruction to be responded to, select a target block for responding to the operation instruction to be responded to ,include:

从本地记录的区块信息指示的重映射区块中,选择用于对所述损坏区块进行重映射的目标区块,其中,所述重映射区块包括:所连接的各个固态硬盘中用于对损坏的区块进行映射的所有区块;From the remapping blocks indicated by the locally recorded block information, a target block for remapping the damaged block is selected, wherein the remapping block includes: for all blocks that map corrupted blocks;

所述控制所述目标区块所属的固态硬盘在所述目标区块上响应所述待响应操作指令,包括:The controlling the solid state drive to which the target block belongs to respond to the operation command to be responded on the target block includes:

控制所述目标区块所属的固态硬盘将所述损坏区块重映射至所述目标区块,并对所述区块信息中所述目标区块的信息进行更新。Controlling the solid state drive to which the target block belongs to remap the damaged block to the target block, and update the information of the target block in the block information.

本发明的一个实施例中,所述重映射区块是所述电子设备根据各个所述固态硬盘所支持业务的信息配置的。In an embodiment of the present invention, the remapping block is configured by the electronic device according to information of services supported by each of the solid-state drives.

本发明的一个实施例中,所述待响应操作指令为:数据写入指令;In an embodiment of the present invention, the operation instruction to be responded is: a data write instruction;

所述基于本地记录的区块信息,从所连接的各个固态硬盘包含的与所述待响应操作指令的类型相匹配的所有区块中,选择用于响应所述待响应操作指令的目标区块,包括:Based on the locally recorded block information, from all the blocks contained in the connected solid-state drives that match the type of the operation instruction to be responded to, select a target block for responding to the operation instruction to be responded to ,include:

从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块,其中,所述数据区块包括:所连接的各个固态硬盘中用于写入数据的所有区块;From the data blocks indicated by the locally recorded block information, a target block for writing data is selected based on the remaining erasing times of each data block, wherein the data blocks include: All blocks in the SSD for writing data;

所述控制所述目标区块所属的固态硬盘在所述目标区块上响应所述待响应操作指令,包括:The controlling the solid state drive to which the target block belongs to respond to the operation command to be responded on the target block includes:

控制所述目标区块所属的固态硬盘将所述数据写入指令所指示的待写入数据写入至所述目标区块,并对所述区块信息中所述目标区块的信息进行更新。Controlling the solid state drive to which the target block belongs to write the data to be written indicated by the data writing instruction to the target block, and updating the information of the target block in the block information .

本发明的一个实施例中,在所述获得待响应操作指令之后,还包括:In an embodiment of the present invention, after obtaining the operation instruction to be responded, the method further includes:

在所述待写入数据为随机数据时,将所述待写入数据缓存至预设的缓存空间,当所述缓存空间中已缓存数据的数据量大于预设阈值后,或所述缓存空间中缓存数据超过预设时长未进行数据写入时,执行所述从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块的步骤;When the data to be written is random data, the data to be written is cached in a preset cache space, and when the amount of cached data in the cache space is greater than a preset threshold, or the cache space When the cached data exceeds the preset duration without data writing, execute the data block indicated from the locally recorded block information, based on the remaining number of erasing and rewriting of each data block, select the data block for writing data. the steps of the target block;

和/或,and / or,

在所述待写入数据为顺序数据时,直接执行所述从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块的步骤。When the data to be written is sequential data, directly execute the data blocks indicated by the locally recorded block information, and select a target for writing data based on the remaining erasing times of each data block. block steps.

本发明的一个实施例中,所述电子设备包括非易失的存储介质,所述方法还包括:In an embodiment of the present invention, the electronic device includes a non-volatile storage medium, and the method further includes:

在所述电子设备掉电后,将所述缓存空间中缓存的数据搬移至所述非易失的存储介质;After the electronic device is powered off, move the data cached in the cache space to the non-volatile storage medium;

在所述电子设备重新上电后,将所述非易失的存储介质中存储的数据恢复至所述缓存空间。After the electronic device is powered on again, the data stored in the non-volatile storage medium is restored to the cache space.

本发明实施例还提供了一种基于固态硬盘的指令响应系统,所述系统包括:电子设备和与所述电子设备连接的固态硬盘,其中:An embodiment of the present invention further provides an instruction response system based on a solid-state hard disk, the system comprising: an electronic device and a solid-state hard disk connected to the electronic device, wherein:

所述电子设备,用于获得待响应操作指令,并且基于本地记录的区块信息,从所连接的各个固态硬盘包含的与所述待响应操作指令的类型相匹配的所有区块中,选择用于响应所述待响应操作指令的目标区块,以及向所述目标区块所属的固态硬盘发送指示所述待响应操作指令的控制指令;The electronic device is used to obtain the operation instruction to be responded, and based on the locally recorded block information, from all the blocks contained in the connected solid-state hard disks that match the type of the operation instruction to be responded to, select the operation instruction to be responded to. in response to the target block of the operation command to be responded, and sending a control command indicating the operation command to be responded to the solid-state drive to which the target block belongs;

所述目标区块所属的固态硬盘,用于在接收到所述控制指令后,在所述目标区块上响应所述待响应操作指令。The solid-state disk to which the target block belongs is used for responding to the to-be-responded operation command on the target block after receiving the control command.

本发明的一个实施例中,所述待响应操作指令为:用于指示对所述固态硬盘中出现的损坏区块进行重映射的指令;In an embodiment of the present invention, the operation instruction to be responded is: an instruction for instructing to remap the damaged block appearing in the solid-state hard disk;

所述电子设备,具体用于从本地记录的区块信息指示的重映射区块中,选择用于对所述损坏区块进行重映射的目标区块,其中,所述重映射区块包括:所连接的各个固态硬盘中用于对损坏的区块进行映射的所有区块;The electronic device is specifically configured to select a target block for remapping the damaged block from the remapping block indicated by the locally recorded block information, wherein the remapping block includes: All blocks used to map damaged blocks in each connected SSD;

所述目标区块所属的固态硬盘,具体用于将所述损坏区块重映射至所述目标区块,并向所述电子设备发生指示对所述区块信息中所述目标区块的信息进行更新的指令。The solid-state drive to which the target block belongs, and is specifically used for remapping the damaged block to the target block, and generating information indicating the target block in the block information to the electronic device Instructions to make updates.

本发明的一个实施例中,所述重映射区块是所述电子设备根据各个所述固态硬盘所支持业务的信息配置的。In an embodiment of the present invention, the remapping block is configured by the electronic device according to information of services supported by each of the solid-state drives.

本发明的一个实施例中,所述待响应操作指令为:数据写入指令;In an embodiment of the present invention, the operation instruction to be responded is: a data write instruction;

所述电子设备,具体用从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块,其中,所述数据区块包括:所连接的各个固态硬盘中用于写入数据的所有区块;The electronic equipment, specifically, selects a target block for writing data based on the remaining erasing and rewriting times of each data block in the data block indicated by the locally recorded block information, wherein the data area Blocks include: all blocks used to write data in each connected solid-state drive;

所述目标区块所属的固态硬盘,具体用于将所述数据写入指令所指示的待写入数据写入至所述目标区块,并向所述电子设备发送指示对所述区块信息中所述目标区块的信息进行更新的指令。The solid-state drive to which the target block belongs, which is specifically used to write the data to be written indicated by the data writing instruction to the target block, and send an instruction to the electronic device for information about the block The instruction to update the information of the target block described in .

本发明的一个实施例中,所述电子设备,还包括缓存空间;In an embodiment of the present invention, the electronic device further includes a cache space;

所述电子设备,还用于在执行所述获得待响应操作指令之后,执行以下步骤:The electronic device is further configured to perform the following steps after obtaining the operation instruction to be responded:

在所述待写入数据为随机数据时,将所述待写入数据缓存至预设的所述缓存空间,当所述缓存空间中已缓存数据的数据量大于预设阈值后,或所述缓存空间中缓存数据超过预设时长未进行数据写入时,执行所述从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块的步骤;When the data to be written is random data, the data to be written is cached in the preset cache space, and when the amount of cached data in the cache space is greater than a preset threshold, or the When the cached data in the cache space exceeds the preset time period and no data writing is performed, the data block indicated by the locally recorded block information is executed, and based on the remaining number of erasing and writing of each data block, the data block is selected for writing. Steps for the target block of data;

和/或,and / or,

在所述待写入数据为顺序数据时,直接执行所述从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块的步骤。When the data to be written is sequential data, directly execute the data blocks indicated by the locally recorded block information, and select a target for writing data based on the remaining erasing times of each data block. block steps.

本发明的一个实施例中,所述电子设备包括非易失的存储介质;In an embodiment of the present invention, the electronic device includes a non-volatile storage medium;

所述电子设备,还用于在掉电后,将所述缓存空间中缓存的数据搬移至所述非易失的存储介质,并且在重新上电后,将所述非易失的存储介质中存储的数据恢复至所述缓存空间。The electronic device is further configured to move the data cached in the cache space to the non-volatile storage medium after the power is turned off, and after the power is turned on again, move the data cached in the non-volatile storage medium to the non-volatile storage medium. The stored data is restored to the cache space.

本发明实施例还提供了一种基于固态硬盘的指令响应装置,应用于电子设备,所述电子设备连接有固态硬盘,所述装置包括:An embodiment of the present invention further provides an instruction response device based on a solid-state hard disk, which is applied to an electronic device, where the electronic device is connected with a solid-state hard disk, and the device includes:

指令获得模块,用于获得待响应操作指令;The command obtaining module is used to obtain the operation command to be responded;

目标区块选择模块,用于基于本地记录的区块信息,从所连接的各个固态硬盘包含的与所述待响应操作指令的类型相匹配的所有区块中,选择用于响应所述待响应操作指令的目标区块;The target block selection module is used for, based on the locally recorded block information, from all the blocks contained in the connected solid-state hard disks that match the type of the operation instruction to be responded, and selects a module for responding to the to-be-responded operation instruction. The target block of the operation instruction;

指令响应模块,用于控制所述目标区块所属的固态硬盘在所述目标区块上响应所述待响应操作指令。The instruction response module is configured to control the solid state drive to which the target block belongs to respond to the to-be-responded operation instruction on the target block.

本发明的一个实施例中,所述待响应操作指令为:用于指示对所述固态硬盘中出现的损坏区块进行重映射的指令;In an embodiment of the present invention, the operation instruction to be responded is: an instruction for instructing to remap the damaged block appearing in the solid-state hard disk;

所述目标区块选择模块,具体用于从本地记录的区块信息指示的重映射区块中,选择用于对所述损坏区块进行重映射的目标区块,其中,所述重映射区块包括:所连接的各个固态硬盘中用于对损坏的区块进行映射的所有区块;The target block selection module is specifically configured to select a target block for remapping the damaged block from the remapping block indicated by the locally recorded block information, wherein the remapping area The block includes: all the blocks used to map the damaged block in each connected SSD;

所述指令响应模块,具体用于控制所述目标区块所属的固态硬盘将所述损坏区块重映射至所述目标区块,并对所述区块信息中所述目标区块的信息进行更新。The instruction response module is specifically configured to control the solid-state hard disk to which the target block belongs to remap the damaged block to the target block, and perform an analysis on the information of the target block in the block information. renew.

本发明的一个实施例中,所述重映射区块是所述电子设备根据各个所述固态硬盘所支持业务的信息配置的。In an embodiment of the present invention, the remapping block is configured by the electronic device according to information of services supported by each of the solid-state drives.

本发明的一个实施例中,所述待响应操作指令为:数据写入指令;In an embodiment of the present invention, the operation instruction to be responded is: a data write instruction;

所述目标区块选择模块,具体用于从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块,其中,所述数据区块包括:所连接的各个固态硬盘中用于写入数据的所有区块;The target block selection module is specifically used to select the target block for writing data based on the remaining erasing times of each data block from the data block indicated by the locally recorded block information, wherein, The data blocks include: all blocks used for writing data in each connected solid-state hard disk;

所述指令响应模块,具体用于控制所述目标区块所属的固态硬盘将所述数据写入指令所指示的待写入数据写入至所述目标区块,并对所述区块信息中所述目标区块的信息进行更新。The instruction response module is specifically configured to control the solid-state hard disk to which the target block belongs to write the data to be written indicated by the data write instruction to the target block, and to write the data in the block information to the target block. The information of the target block is updated.

本发明的一个实施例中,所述装置还包括In an embodiment of the present invention, the device further includes

数据缓存模块,用于在所述指令获得模块获得待响应操作指令之后,在所述待写入数据为随机数据时,将所述待写入数据缓存至预设的缓存空间,当所述缓存空间中已缓存数据的数据量大于预设阈值后,或所述缓存空间中缓存数据超过预设时长未进行数据写入时,调用所述目标区块选择模块;A data cache module, configured to cache the to-be-written data to a preset cache space when the to-be-written data is random data after the instruction obtaining module obtains the to-be-responded operation instruction, and when the cache After the data volume of the cached data in the space is greater than a preset threshold, or when the cached data in the cache space exceeds a preset time period without data writing, the target block selection module is called;

和/或,and / or,

在所述待写入数据为顺序数据时,直接调用所述目标区块选择模块。When the data to be written is sequential data, the target block selection module is directly called.

本发明的一个实施例中,所述电子设备包括非易失的存储介质,所述装置还包括:In an embodiment of the present invention, the electronic device includes a non-volatile storage medium, and the apparatus further includes:

数据恢复模块,用于在所述电子设备掉电后,将所述缓存空间中缓存的数据搬移至所述非易失的存储介质,并且在所述电子设备重新上电后,将所述非易失的存储介质中存储的数据恢复至所述缓存空间。The data recovery module is used to move the data cached in the cache space to the non-volatile storage medium after the electronic device is powered off, and after the electronic device is powered on again, restore the non-volatile storage medium to the nonvolatile storage medium. The data stored in the volatile storage medium is restored to the cache space.

本发明实施例还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;An embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

存储器,用于存放计算机程序;memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述任一所述的基于固态硬盘的指令响应方法步骤。The processor is configured to implement any of the above-mentioned steps of the solid-state disk-based instruction response method when executing the program stored in the memory.

本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一所述的基于固态硬盘的指令响应方法步骤。Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned solid-state disk-based instruction responses are implemented method steps.

本发明实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一所述的基于固态硬盘的指令响应方法。Embodiments of the present invention also provide a computer program product containing instructions, which, when running on a computer, enables the computer to execute any of the above-mentioned methods for responding to instructions based on solid-state drives.

本发明实施例有益效果:Beneficial effects of the embodiment of the present invention:

本发明实施例提供的基于固态硬盘的指令响应方法、系统、装置及电子设备,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。In the method, system, device, and electronic device for responding to commands based on solid-state drives provided by the embodiments of the present invention, since the electronic device records the block information of the blocks included in each solid-state drive connected to the electronic device, the electronic device can Block information, select the target block used to respond to the operation command to be responded from the blocks contained in each solid-state drive, and combine each solid-state drive connected to the electronic device as a whole, so as to avoid each solid-state drive responding to the operation command independently, The difference in usage of each solid-state hard disk is reduced, thereby facilitating the use and maintenance of the solid-state hard disk in the storage device.

当然,实施本发明的任一产品或方法并不一定需要同时达到以上所述的所有优点。Of course, it is not necessary for any product or method of the present invention to achieve all of the advantages described above at the same time.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other embodiments can also be obtained according to these drawings without creative efforts.

图1为本发明一个实施例提供的基于固态硬盘的指令响应系统的示意图。FIG. 1 is a schematic diagram of an instruction response system based on a solid-state disk provided by an embodiment of the present invention.

图2为本发明一个实施例提供的基于固态硬盘的指令响应系统中固态硬盘的结构图。FIG. 2 is a structural diagram of a solid-state disk in an instruction-response system based on a solid-state disk provided by an embodiment of the present invention.

图3为本发明一个实施例提供的基于固态硬盘的指令响应方法的流程图。FIG. 3 is a flowchart of a method for responding to an instruction based on a solid-state disk according to an embodiment of the present invention.

图4为本发明另一个实施例提供的基于固态硬盘的指令响应方法的流程图。FIG. 4 is a flowchart of a method for responding to an instruction based on a solid-state disk provided by another embodiment of the present invention.

图5为本发明又一个实施例提供的基于固态硬盘的指令响应方法的流程图。FIG. 5 is a flowchart of a method for responding to an instruction based on a solid state disk according to another embodiment of the present invention.

图6为本发明一个实施例提供的基于固态硬盘的指令响应系统的结构示意图。FIG. 6 is a schematic structural diagram of an instruction response system based on a solid-state disk provided by an embodiment of the present invention.

图7为本发明另一个实施例提供的基于固态硬盘的指令响应系统的结构示意图。FIG. 7 is a schematic structural diagram of an instruction response system based on a solid-state disk provided by another embodiment of the present invention.

图8为本发明又一个实施例提供的基于固态硬盘的指令响应系统的结构示意图。FIG. 8 is a schematic structural diagram of an instruction response system based on a solid-state disk provided by yet another embodiment of the present invention.

图9为本发明一个实施例提供的基于固态硬盘的指令响应装置的结构示意图。FIG. 9 is a schematic structural diagram of an apparatus for responding to commands based on a solid-state disk according to an embodiment of the present invention.

图10为本发明一个实施例提供的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

为了清楚地阐述本发明实施例提供的技术方案,首先站在系统角度从整体上对本发明实施例提供的技术方案进行简单介绍,如图1所示,本发明实施例提供了一种基于固态硬盘的指令响应系统,该系统包含有电子设备和N个与电子设备连接的固态硬盘,分别使用固态硬盘1-固态硬盘N区分。如图2所示,本发明实施例还提供了一种固态硬盘的结构示意图,在每个固态硬盘中,Blk0-Blk1029分别表示该固态硬盘包含的每个区块。In order to clearly describe the technical solutions provided by the embodiments of the present invention, firstly, the technical solutions provided by the embodiments of the present invention are briefly introduced from the perspective of the system as a whole. As shown in FIG. 1 , the embodiments of the present invention provide a solid-state drive based A command response system, the system includes electronic equipment and N solid-state hard disks connected to the electronic equipment, which are respectively distinguished by solid-state disk 1-solid-state disk N. As shown in FIG. 2 , an embodiment of the present invention further provides a schematic structural diagram of a solid-state hard disk. In each solid-state hard disk, Blk0-Blk1029 respectively represent each block included in the solid-state hard disk.

现有技术中,由于每个固态硬盘都是独自对各自所接收的操作指令进行响应,使得每个固态硬盘在响应操作指令时忽视了存储设备中其他固态硬盘的使用情况。又由于仅能独自的响应操作指令,因此,当存储设备中某片固态硬盘所预留的重映射区块全部使用完成后,出于数据安全的考虑,即使该片固态硬盘中还包含其他能够继续使用的用于读写数据的数据区块,该片固态硬盘也不能再继续使用,造成了严重的浪费。同时由于仅能独自的响应操作指令,当需要进行数据写入时,每片固态硬盘只考虑自身所包含的区块的写入情况,进而在自身所包含的区块中进行区块选择,因此,仅可以维护每片固态硬盘内区块之间的磨损平衡,而无法维护存储设备中各个固态硬盘包含的区块间的磨损平衡。In the prior art, since each solid-state disk independently responds to the operation instruction it receives, each solid-state disk ignores the usage of other solid-state disks in the storage device when responding to the operation instruction. In addition, because it can only respond to operation commands independently, when all the remapping blocks reserved for a certain solid-state drive in the storage device are used, for the sake of data security, even if the solid-state drive contains other Continued use of the data blocks for reading and writing data, the solid state drive can no longer be used, resulting in serious waste. At the same time, because it can only respond to operation commands independently, when data writing is required, each solid-state drive only considers the writing situation of the blocks contained in itself, and then selects blocks in the blocks contained in itself. , it can only maintain the wear balance among the blocks in each SSD, but cannot maintain the wear balance among the blocks contained in each SSD in the storage device.

为了解决现有技术所存在的问题,本发明实施例提供的如图1所示的基于固态硬盘的指令响应系统中,电子设备中记录有系统中各个固态硬盘所包含的区块的区块信息。使得电子设备在接收到待响应操作指令后,可以从系统层面选择出最合适的用于响应待响应操作指令的区块。In order to solve the problems existing in the prior art, in the solid-state drive-based command response system as shown in FIG. 1 provided by an embodiment of the present invention, the electronic device records the block information of the blocks included in each solid-state drive in the system . Therefore, after receiving the operation instruction to be responded to, the electronic device can select the most suitable block for responding to the operation instruction to be responded from the system level.

具体的,当电子设备获得待响应操作指令后,电子设备可以根据记录的区块信息,从所连接的各个固态硬盘包含的与待响应操作指令的类型相匹配的所有区块中,选择用于响应待响应操作指令的目标区块,并控制目标区块所属的固态硬盘在目标区块上响应待响应操作指令。示例性的,当电子设备根据记录的区块信息,选择出图2中固态硬盘2包含的Blk2作为目标区块时,则电子设备可以控制固态硬盘2在其Blk2上响应待响应操作指令。Specifically, after the electronic device obtains the operation instruction to be responded to, the electronic device can, according to the recorded block information, select the type of operation instruction to be responded to from all the blocks contained in the connected solid-state drives that match the type of the operation instruction to be responded to. Responding to the target block of the operation command to be responded, and controlling the solid state disk to which the target block belongs to respond to the operation command to be responded on the target block. Exemplarily, when the electronic device selects Blk2 included in the solid-state drive 2 in FIG. 2 as the target block according to the recorded block information, the electronic device can control the solid-state drive 2 to respond to the operation command to be responded on its Blk2.

由于电子设备记录有其所连接的各个固态硬盘包含的区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,可以将与电子设备相连的各个固态硬盘结合为一个整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。Since the electronic device records the block information of the blocks contained in each solid-state drive to which it is connected, the electronic device can, according to the recorded block information, select from the blocks contained in each solid-state drive for responding to the operation to be responded to. The target block of the instruction can combine each solid-state drive connected to the electronic device into a whole, which prevents each solid-state drive from responding to the operation command independently, reduces the difference in the usage of each solid-state drive, and is beneficial to the storage device. Use and maintenance of solid state drives.

同时,当存储设备中某片固态硬盘所预留的重映射区块全部使用完成后,也可以继续使用该片固态硬盘,即使在后续的使用过程中,该片固态硬盘又出现了区块损坏的情况,也可以通过系统中其他固态硬盘预留的重映射区块对该片固态硬盘中出现损坏的区块进行重映射,在确保维持数据安全的同时,也不会浪费固态硬盘中剩余可用的区块。同时,当需要进行数据写入时,可综合考虑系统中各个固态硬盘包含的区块的写入情况,进而在系统中所有的区块中进行区块选择,确保存储设备中各个固态硬盘包含的区块间的磨损平衡。At the same time, when all the remapping blocks reserved by a solid-state drive in the storage device are used, the solid-state drive can continue to be used, even if the solid-state drive is damaged again in the subsequent use process. In this case, the damaged block in the solid-state drive can also be remapped through the remapping block reserved by other solid-state drives in the system. This ensures that data security is maintained, and the remaining available solid-state drives are not wasted. block. At the same time, when data writing needs to be performed, the writing situation of the blocks contained in each solid-state drive in the system can be comprehensively considered, and then block selection is performed in all blocks in the system to ensure that each solid-state drive in the storage device contains Wear leveling between blocks.

下面再分别对本发明实施例公开的基于固态硬盘的指令响应方法、系统、装置、电子设备及可读存储介质进行详细说明。The method, system, device, electronic device, and readable storage medium for responding to an instruction based on a solid-state disk disclosed in the embodiments of the present invention will be described in detail below.

本发明实施例提供一种基于固态硬盘的指令响应方法,应用于电子设备,其中,该电子设备连接有固态硬盘,如图3所示,该方法包括:An embodiment of the present invention provides an instruction response method based on a solid-state hard disk, which is applied to an electronic device, wherein the electronic device is connected with a solid-state hard disk. As shown in FIG. 3 , the method includes:

S301:获得待响应操作指令。S301: Obtain the operation instruction to be responded.

S302:基于本地记录的区块信息,从所连接的各个固态硬盘包含的与待响应操作指令的类型相匹配的所有区块中,选择用于响应待响应操作指令的目标区块。S302: Based on the locally recorded block information, select a target block for responding to the to-be-responded operation instruction from all the blocks included in the connected solid-state drives that match the type of the to-be-responded operation instruction.

S303:控制目标区块所属的固态硬盘在目标区块上响应待响应操作指令。S303: Control the solid state drive to which the target block belongs to respond to the operation command to be responded on the target block.

本发明实施例提供的如图3所示的基于固态硬盘的指令响应方法,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。The solid-state drive-based instruction response method provided in the embodiment of the present invention as shown in FIG. 3 , since the electronic device records the block information of the blocks included in each solid-state drive connected to it, the electronic device can record the block information according to the recorded area. Block information, select the target block used to respond to the operation command to be responded from the blocks contained in each solid-state drive, and combine each solid-state drive connected to the electronic device as a whole, avoiding each solid-state drive responding to the operation command independently, reducing The differences in the usage of each solid-state hard disk are eliminated, thereby facilitating the use and maintenance of the solid-state hard disks in the storage device.

为了清楚地阐述本发明实施例的技术方案,下面分步骤阐述本发明实施例提供的如图3所示的基于固态硬盘的指令响应方法。In order to clearly describe the technical solutions of the embodiments of the present invention, the following steps describe the solid-state disk-based instruction response method provided by the embodiments of the present invention as shown in FIG. 3 .

针对步骤S301,获得的待响应操作指令可以为对与电子设备所连接固态硬盘包含的区块进行操作的指令。可选的,电子设备获得的待响应操作指令可以为接收到的外部指令,如指示数据存储的数据写入指令、读取已存储数据的读写指令等,也可以为在向区块中写入数据的过程中,出现写入错误时,固态硬盘向电子设备反馈的写入错误信息,此时,固态硬盘反馈的写入错误信息可视为对损坏区块进行重映射的重映射指令。For step S301, the obtained operation instruction to be responded may be an instruction for operating a block included in the solid-state hard disk connected to the electronic device. Optionally, the operation command to be responded obtained by the electronic device can be an external command received, such as a data write command indicating data storage, a read and write command to read stored data, etc., or it can be a write command to the block. In the process of data entry, when a write error occurs, the solid-state drive feeds back the write error information to the electronic device. At this time, the write error information fed back by the solid-state drive can be regarded as a remapping command for remapping the damaged block.

针对步骤S302,本地记录的区块信息可以为与电子设备相连的固态硬盘包含的区块的位置信息、类别信息、状态信息、重映射信息、擦写信息等信息中的一种或多种。For step S302, the locally recorded block information may be one or more of the location information, category information, status information, remapping information, erasure information and other information of the blocks contained in the solid-state hard disk connected to the electronic device.

其中,上述区块的位置信息可以为表示区块所属固态硬盘的信息,如固态硬盘的标识等。The location information of the block may be information indicating the solid state drive to which the block belongs, such as an identifier of the solid state drive.

上述区块的类型信息可以为表示区块所属的区块类型,可选的,固态硬盘包含的区块中可以包括属于数据类型的区块和属于重映射类型的区块,其中,属于数据类型的区块即为数据区块,用于读写数据,而属于重映射类型的区块即为重映射区块,用于对已损坏的数据区块进行重映射。The type information of the above-mentioned block can be the block type that represents the block to which the block belongs. Optionally, the block contained in the solid-state hard disk can include a block belonging to a data type and a block belonging to a remapping type, wherein the block belonging to the data type The block that belongs to the remapping type is the data block, which is used for reading and writing data, and the block belonging to the remapping type is the remapping block, which is used for remapping the damaged data block.

上述区块的状态信息则表示区块的各种状态,如可以为full(满)、empty(空)、bad(坏)和wirte_enable(写保护),其中,full和empty用于表征区块中已存储数据的状态,本发明的一个实施例中,还可以包含区块中已存储数据的大小,即当一个区块即不为full,也不为empty时,记录该区块已写入数据的大小或剩余可写入数据量。上述bad用于区分是否已损坏,当区块损坏时,其状态信息中包含bad,当区块未损坏时,其状态信息中不包含bad。The status information of the above block represents various statuses of the block, such as full (full), empty (empty), bad (bad) and wirte_enable (write protection), where full and empty are used to represent the block in the block. The state of the stored data, in one embodiment of the present invention, may also include the size of the stored data in the block, that is, when a block is neither full nor empty, record the data written in the block size or the remaining amount of writable data. The above bad is used to distinguish whether it is damaged. When the block is damaged, its state information contains bad, and when the block is not damaged, its state information does not contain bad.

上述区块的重映射信息用于记录与重映射有关的信息,对于数据区块而言,当其损坏时,其对应的重映射信息中记录对该数据区块进行重映射的重映射区块的相关信息,而对于重映射区块而言,其对应的重映射信息可以包括是否已进行重映射,当已进行重映射,可以包括被重映射的数据区块的相关信息。The remapping information of above-mentioned block is used to record the information relevant to remapping, for data block, when it is damaged, record the remapping block that this data block is remapped in its corresponding remapping information For the remapping block, the corresponding remapping information may include whether the remapping has been performed, and when the remapping has been performed, the relevant information of the remapped data block may be included.

上述区块的擦写信息用于表示区块的剩余可擦写次数,可以包括区块的最大可擦写次数和当前已擦写次数,还可以直接为区块的剩余可擦写次数。The erasure information of the block is used to indicate the remaining erasable times of the block, which may include the maximum erasable times of the block and the current erasable times, or directly the remaining erasable times of the block.

本发明的一个实施例中,待响应操作指令的类型可以分为数据写入类型和重映射类型,其中,在电子设备所连接的各个固态硬盘包含区块中,数据写入类型和重映射类型对应的区块是不同的,其中,与数据写入类型相匹配的区块为所有区块中的数据区块,在本发明的一个实施例中,可以为未处于full状态和bad状态的数据区块,而与重映射类型相匹配的区块为所有区块中的重映射区块,在本发明的一个实施例中,可以为未进行重映射的重映射区块。In an embodiment of the present invention, the types of the operation commands to be responded can be divided into data writing types and remapping types, wherein, in each solid state disk connected to the electronic device, the data writing type and the remapping type include blocks. Corresponding blocks are different, wherein, the block matching the data writing type is the data block in all the blocks, in one embodiment of the present invention, it can be the data not in the full state and the bad state block, and the block matching the remapping type is the remapping block in all the blocks. In one embodiment of the present invention, it may be the remapping block that has not been remapped.

可选的,从电子设备所连接的各个固态硬盘包含的与待响应操作指令的类型相匹配的所有区块中,选择用于响应待响应操作指令的目标区块的方式可以很多,可以结合具体的需求来确定,如可以根据待响应操作指令的类型确定不同的选择方式,当为数据写入类型时,可以等概率的进行选择,而为了维持各区块之间的磨损平衡,也可以根据各个区块的擦写信息选择合适的区块,当为重映射类型时,可以等概率的进行选择,也可以优先选择与已损坏区块同属同一固态硬盘的重映射区块。Optionally, from all the blocks contained in each solid-state drive connected to the electronic device that match the type of the operation instruction to be responded to, there can be many ways to select the target block used to respond to the operation instruction to be responded to, and can be combined with the specific operation instruction. For example, different selection methods can be determined according to the type of the operation command to be responded. When it is a data writing type, the selection can be made with equal probability. In order to maintain the wear balance between the blocks, it can also be selected according to each Select the appropriate block for the erasing and writing information of the block. When it is a remapping type, it can be selected with equal probability, or the remapping block that belongs to the same solid-state drive as the damaged block can be preferentially selected.

针对步骤S303,不同的待响应操作指令所响应的方式也不同,对于数据写入操作指令和数据读取操作指令而言,其响应的方式为控制目标区块所属的固态硬盘先目标区块写入或读取数据,而对于重映射指令而言,其响应方式可以为控制目标区块所属的固态硬盘使用目标区块对已损坏区块进行重映射。For step S303, different operation commands to be responded have different ways of responding. For the data write operation command and the data read operation command, the response method is to control the SSD to which the target block belongs to write to the target block first. For the remapping command, the response mode can be to control the solid state disk to which the target block belongs to use the target block to remap the damaged block.

下面结合具体实施例对本发明技术方案进行阐述:Below in conjunction with specific embodiment, the technical scheme of the present invention is described:

在待响应操作指令为为用于指示对固态硬盘中出现的损坏区块进行重映射的指令的情况下,如图4所示,本发明实施例还提供了一种基于固态硬盘的指令响应方法,应用于电子设备,其中,该电子设备连接有固态硬盘,如图4所示,该方法包括:In the case where the operation instruction to be responded is an instruction for instructing remapping of damaged blocks in the solid-state drive, as shown in FIG. 4 , an embodiment of the present invention further provides a solid-state drive-based command response method , applied to an electronic device, wherein the electronic device is connected with a solid-state hard disk, as shown in FIG. 4 , the method includes:

S401:获得重映射指令。S401: Obtain a remapping instruction.

本步骤中,重映射指令为用于指示对固态硬盘中出现的损坏区块进行重映射的指令。如可以为在向区块中写入数据时,出现写入错误时,固态硬盘向电子设备反馈的写入错误信息,该反馈的写入错误信息即可视为重映射指令。In this step, the remapping instruction is an instruction for instructing to perform remapping on the damaged block in the solid state disk. For example, when writing data into a block, when a writing error occurs, the solid-state drive feeds back the writing error information to the electronic device, and the feedback writing error information can be regarded as a remapping command.

S402:从本地记录的区块信息指示的重映射区块中,选择用于对损坏区块进行重映射的目标区块,其中,重映射区块包括:所连接的各个固态硬盘中用于对损坏的区块进行映射的所有区块。S402: From the remapping block indicated by the locally recorded block information, select a target block for remapping the damaged block, wherein the remapping block includes: each connected solid-state hard disk is used for remapping the damaged block. The corrupted block is mapped to all blocks.

本步骤中,本地记录的区块信息可以记录在FTL(Flash Translation Layer,闪存转换层)的映射表(Mapping Table)中。本地记录的区块信息指示的重映射区块可以为本地记录的区块信息中的类型信息为重映射类型区块。In this step, the locally recorded block information may be recorded in a mapping table (Mapping Table) of an FTL (Flash Translation Layer, flash translation layer). The remapping block indicated by the locally recorded block information may be the type information in the locally recorded block information is a remapping type block.

在一个实施例中,固态硬盘包含的重映射区块可以是电子设备根据各个固态硬盘所支持业务的信息配置的。如在固态硬盘初始化时,可以根据预设的固态硬盘OP(Over-Provisioning,预留空间)的占比,确定出固态硬盘中各个区块的类型,即确定出固态硬盘中,哪些区块为数据区块,哪些区块为重映射区块。In one embodiment, the remapping blocks included in the solid-state drive may be configured by the electronic device according to information of services supported by each solid-state drive. For example, when the solid-state drive is initialized, the type of each block in the solid-state drive can be determined according to the preset proportion of the solid-state drive OP (Over-Provisioning, reserved space), that is, to determine which blocks in the solid-state drive are Data blocks, which blocks are remapping blocks.

示例性的,设置的占比为10%,固态硬盘包含有100个区块,则在初始化固态硬盘时,在包含的100个区块中选择出10个区块作为重映射区块,剩余的90个区块作为数据区块。Exemplarily, the set proportion is 10%, and the solid-state drive contains 100 blocks, then when the solid-state drive is initialized, 10 blocks are selected from the 100 blocks included as the remapping block, and the remaining blocks are 90 blocks as data blocks.

可选的,本地记录的区块信息指示的重映射区块中选择用于对损坏区块进行重映射的目标区块的方式可以为多种,可以结合实际需求确定,如可以为等概率选择,也可以先确定出重映射区块中未对其他已损坏区块进行重映射的重映射区块,进而在所确定的重映射区块中进一步的进行选择,还可以结合已损坏区块的信息进行选择,如优先选择出与已损坏区块属于同一固态硬盘、且未对其他已损坏区块进行重映射的重映射区块。Optionally, in the remapping block indicated by the locally recorded block information, there can be various methods for selecting the target block for remapping the damaged block, which can be determined in combination with actual needs, such as equal probability selection. , it is also possible to first determine the remapping block that is not remapped to other damaged blocks in the remapping block, and then further select in the determined remapping block, and can also combine the damaged block The information is selected, for example, a remapped block that belongs to the same solid state drive as the damaged block and has not been remapped to other damaged blocks is preferentially selected.

示例性的,在本发明实施例提供的如图2所示的固态硬盘的结构示意图中,设每个固态硬盘中Blk0-Blk1021为数据区块,Blk1022-Blk1029为重映射区块,当固态硬盘1中Blk0损坏时,若固态硬盘1任存在未被使用的重映射区块Blk1028和Blk1029,则可以使用Blk1028和Blk1029任意一个区块对Blk0进行重映射,若固态硬盘1不存在未被使用的重映射区块,而固态硬盘2则存在未被使用的重映射区块Blk1027,则可以使用固态硬盘2中的Blk1027对固态硬盘1中的Blk0进行重映射。Exemplarily, in the schematic structural diagram of the solid-state drive shown in FIG. 2 provided by the embodiment of the present invention, it is assumed that Blk0-Blk1021 in each solid-state drive are data blocks, and Blk1022-Blk1029 are remapping blocks. When Blk0 in 1 is damaged, if there are unused remapping blocks Blk1028 and Blk1029 in SSD 1, you can use either block Blk1028 or Blk1029 to remap Blk0. Remap block, and SSD 2 has unused remapping block Blk1027, then use Blk1027 in SSD 2 to remap Blk0 in SSD 1.

S403:控制目标区块所属的固态硬盘将损坏区块重映射至目标区块,并对区块信息中目标区块的信息进行更新。S403: Control the solid state drive to which the target block belongs to remap the damaged block to the target block, and update the information of the target block in the block information.

本步骤中,控制目标区块所属的固态硬盘将损坏区块重映射至目标区块,即将需要写入至损坏区块的数据写入至目标区块,本发明的一个实施例中,在写入数据之前,还可以将损坏区块中已存储的数据搬移至目标区块。In this step, the solid-state drive to which the target block belongs is controlled to remap the damaged block to the target block, that is, the data that needs to be written to the damaged block is written to the target block. Before entering the data, the data stored in the damaged block can also be moved to the target block.

完成重映射之后,可以同步区块信息中目标区块的信息进行更新,如将目标区块的重映射信息中未进行重映射更新为已进行重映射,并添加对应的已损坏区块的标识。本发明的一个实施例中,也可以对区块信息中损坏区块的信息也进行更新。如将损坏区块的状态信息更新为bad,且在其重映射信息中添加目标区块的标识。After the remapping is completed, the information of the target block in the block information can be synchronized to update, for example, the remapping information of the target block is not remapped and the remapping has been updated, and the identifier of the corresponding damaged block is added. . In an embodiment of the present invention, the information of the damaged block in the block information may also be updated. For example, the status information of the damaged block is updated to bad, and the identifier of the target block is added to its remapping information.

本发明实施例提供的如图4所示的基于固态硬盘的指令响应方法,当存储设备中某片固态硬盘所预留的重映射区块全部使用完成后,也可以继续使用该片固态硬盘,即使在后续的使用过程中,该片固态硬盘又出现了区块损坏的情况,也可以通过系统中其他固态硬盘预留的重映射区块对该片固态硬盘中出现损坏的区块进行重映射,在确保维持数据安全的同时,也不会浪费固态硬盘中剩余可用的区块。In the solid-state drive-based command response method as shown in FIG. 4 provided by the embodiment of the present invention, when all the remapping blocks reserved for a solid-state drive in the storage device are used, the solid-state drive can continue to be used. Even if the block of the solid-state drive is damaged during subsequent use, the damaged block in the solid-state drive can be remapped through the remapping blocks reserved by other solid-state drives in the system. , while ensuring data security is maintained, the remaining available blocks in the SSD will not be wasted.

在待响应操作指令为数据写入指令的情况下,如图5所示,本发明实施例还提供了一种基于固态硬盘的指令响应方法,应用于电子设备,其中,该电子设备连接有固态硬盘,如图5所示,该方法包括:In the case where the operation command to be responded is a data writing command, as shown in FIG. 5 , an embodiment of the present invention further provides a command response method based on a solid-state hard disk, which is applied to an electronic device, wherein the electronic device is connected with a solid-state disk. hard disk, as shown in Figure 5, the method includes:

S501:接收数据写入指令。S501: Receive a data write instruction.

本步骤中,当需要存储数据时,电子设备所接收到的指示进行数据存储的数据写入指令。In this step, when data needs to be stored, the electronic device receives a data write instruction that instructs to store the data.

在一个实施例中,为了避免频繁的对区块进行擦写,在待写入数据为随机数据时,可以先将待写入数据缓存至预设的缓存空间,当缓存空间中已缓存数据的数据量大于预设阈值后,或缓存空间中缓存数据超过预设时长未进行数据写入时,执行步骤S502;和/或,在待写入数据为顺序数据时,直接执行S502。In one embodiment, in order to avoid frequent erasing and rewriting of blocks, when the data to be written is random data, the data to be written may be cached in a preset cache space first. After the amount of data is greater than the preset threshold, or when the cached data in the cache space exceeds the preset time period without data writing, step S502 is performed; and/or when the data to be written is sequential data, S502 is directly performed.

其中,上述随机数据即为随机IO(Input Output,输入输出)输入的数据,每次随机IO的数据量较小,若将其直接写入区块中,则可能使写入数据的区块还存在空余存储空间,从而造成了存储空间的浪费,同时,当需要再一次写入数据时,需要先保存该区块中的数据,再擦除该区块中存储的数据,最后将新数据和保存的数据一同写入至该区块,造成了区块的频繁擦写。Among them, the above random data is the data input by random IO (Input Output, input and output). The amount of data in each random IO is small. If it is directly written into the block, the block where the data is written may be lost. There is free storage space, which results in a waste of storage space. At the same time, when data needs to be written again, it is necessary to save the data in the block first, then erase the data stored in the block, and finally transfer the new data to the block. The saved data is written to the block together, resulting in frequent erasing and rewriting of the block.

上述,缓存空间可以为电子设备中包含的DRAM(Dynamic Random Access Memory,动态随机存取存储器)缓存,如内存条等。As mentioned above, the cache space may be a DRAM (Dynamic Random Access Memory, dynamic random access memory) cache included in the electronic device, such as a memory stick.

S502:从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块,其中,数据区块包括:所连接的各个固态硬盘中用于写入数据的所有区块。S502: From the data blocks indicated by the locally recorded block information, based on the remaining erasing times of each data block, select a target block for writing data, wherein the data block includes: each connected All blocks in the SSD used to write data.

本步骤中,本地记录的区块信息可以记录在block(区块)管理链表中,本地记录的区块信息指示的数据区块可以为本地记录的区块信息中的类型信息为数据类型的区块。In this step, the locally recorded block information can be recorded in the block (block) management linked list, and the data block indicated by the locally recorded block information can be the area in which the type information in the locally recorded block information is the data type piece.

可选的,每个数据区块的剩余擦写次数可以通过每个数据区块的最大擦写次数和已擦写次数计算得到的,即剩余擦写次数=最大擦写次数-已擦写次数,每个数据区块写入数据后,其已擦写次数加1,响应的剩余擦写次数减1。Optionally, the remaining erasing times of each data block can be calculated by the maximum erasing times and the erasing times of each data block, that is, the remaining erasing times=maximum erasing times-erasing times. , after writing data in each data block, the number of erasing and writing is increased by 1, and the remaining number of erasing and writing in response is decreased by 1.

其中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块的方式可以包括多种,如可以为优先向剩余擦写次数较多的区块写入数据,可以从各区块中,选择出剩余擦写次数最大的区块作为目标区块,也可以先选择出多个剩余擦写次数靠前的数据区块,再等概率的从选择出的数据区块中选择出目标区块。Among them, based on the remaining number of erasing and writing of each data block, the method of selecting the target block for writing data may include various methods. From each block, the block with the largest number of remaining erasing and writing is selected as the target block, or a plurality of data blocks with the highest remaining number of erasing and writing can be selected first, and then the selected data blocks are selected with equal probability. Select the target block.

S503:控制目标区块所属的固态硬盘将数据写入指令所指示的待写入数据写入至目标区块,并对区块信息中目标区块的信息进行更新。S503: Control the solid-state hard disk to which the target block belongs to write the data to be written indicated by the data writing instruction to the target block, and update the information of the target block in the block information.

本步骤中,控制目标区块所属的固态硬盘将损坏区块重映射至目标区块,即将需要写入至损坏区块的数据写入至目标区块,本发明的一个实施例中,在写入数据之前,还可以将损坏区块中已存储的数据搬移至目标区块。In this step, the solid-state drive to which the target block belongs is controlled to remap the damaged block to the target block, that is, the data that needs to be written to the damaged block is written to the target block. Before entering the data, the data stored in the damaged block can also be moved to the target block.

完成重映射之后,可以同步对区块信息中目标区块的信息进行更新,本发明的一个实施例中,也可以对区块信息中损坏区块的信息也进行更新。如将目标区块的信息更新为已进行重映射,且对于的重映射信息中添加损坏区块的信息。After the remapping is completed, the information of the target block in the block information can be updated synchronously, and in one embodiment of the present invention, the information of the damaged block in the block information can also be updated. For example, the information of the target block is updated to have been remapped, and the information of the damaged block is added to the remapping information.

本发明实施例提供的如图5所示的基于固态硬盘的指令响应方法,将不同型号、不同磨损层度的固态硬盘的剩余擦写次数,当需要进行数据写入时,考虑了与电子设备连接的各个固态硬盘包含的区块的写入情况,进而在系统中所有的区块中进行区块选择,确保存储设备中各个固态硬盘包含的区块间的磨损平衡,本发明的一个实施例中,可以通过先缓存数据后写入数据的方式,可以减缓固态硬盘中区块的磨损程度。As shown in FIG. 5 , the solid-state drive-based command response method provided by the embodiment of the present invention compares the remaining erasing and rewriting times of solid-state drives of different models and wear levels when data writing needs to be performed, taking into account the relationship with electronic equipment. The writing status of the blocks contained in each connected solid-state hard disk, and then block selection is performed in all blocks in the system to ensure the wear balance among the blocks contained in each solid-state hard disk in the storage device, one embodiment of the present invention , the wear degree of the blocks in the SSD can be slowed down by caching the data first and then writing the data.

在发明实施例提供的如图5所示的基于固态硬盘的指令响应方法的基础上,为了防止突然掉电造成的数据丢失,电子设备中还包括非易失的存储介,当电子设备的运行过程中,电子设备掉电后,可以将缓存空间中缓存的数据搬移至非易失的存储介质,直至电子设备重新上电后,将非易失的存储介质中存储的数据恢复至缓存空间。可选的,电子设备还包括用于提供断电后电源的最小系统电池。On the basis of the solid-state disk-based command response method as shown in FIG. 5 provided in the embodiment of the invention, in order to prevent data loss caused by sudden power failure, the electronic device also includes a non-volatile storage medium. When the electronic device is running During the process, after the electronic device is powered off, the data cached in the cache space can be moved to the non-volatile storage medium, and the data stored in the non-volatile storage medium can be restored to the cache space until the electronic device is powered on again. Optionally, the electronic device also includes a minimum system battery for providing power after a power outage.

基于同一发明构思,根据本发明实施例提供的固态硬盘的指令响应方法,如图6所示,本发明实施例还提供了一种固态硬盘的指令响应系统,该系统包括:电子设备601和与电子设备连接的固态硬盘602,其中:Based on the same inventive concept, according to a method for responding to an instruction of a solid-state hard disk provided by an embodiment of the present invention, as shown in FIG. 6 , an embodiment of the present invention also provides a system for responding to an instruction of a solid-state hard disk. The system includes: an electronic device 601 and an An electronic device-connected solid-state drive 602, where:

电子设备601,用于获得待响应操作指令,并且基于本地记录的区块信息,从所连接的各个固态硬盘包含的与待响应操作指令的类型相匹配的所有区块中,选择用于响应待响应操作指令的目标区块,以及向目标区块所属的固态硬盘602发送指示待响应操作指令的控制指令;The electronic device 601 is used to obtain the operation instruction to be responded, and based on the locally recorded block information, from all the blocks contained in the connected solid-state drives that match the type of the operation instruction to be responded to, select the operation instruction to be responded to. Responding to the target block of the operation instruction, and sending a control instruction indicating the operation instruction to be responded to to the solid-state drive 602 to which the target block belongs;

目标区块所属的固态硬盘602,用于在接收到控制指令后,在目标区块上响应待响应操作指令。The solid state disk 602 to which the target block belongs is used for responding to the operation command to be responded on the target block after receiving the control command.

本发明的一个实施例中,待响应操作指令为:用于指示对固态硬盘602中出现的损坏区块进行重映射的指令;In an embodiment of the present invention, the operation instruction to be responded is: an instruction for instructing to remap the damaged block appearing in the solid-state drive 602;

电子设备601,具体用于从本地记录的区块信息指示的重映射区块中,选择用于对损坏区块进行重映射的目标区块,其中,重映射区块包括:所连接的各个固态硬盘中用于对损坏的区块进行映射的所有区块;The electronic device 601 is specifically configured to select a target block for remapping the damaged block from the remapping block indicated by the locally recorded block information, wherein the remapping block includes: All blocks in the hard disk used to map corrupted blocks;

目标区块所属的固态硬盘602,具体用于将损坏区块重映射至目标区块,并向电子设备601发生指示对区块信息中目标区块的信息进行更新的指令。The solid-state drive 602 to which the target block belongs is specifically used to remap the damaged block to the target block, and send an instruction to the electronic device 601 for updating the information of the target block in the block information.

本发明的一个实施例中,重映射区块是电子设备601根据各个固态硬盘602所支持业务的信息配置的。In an embodiment of the present invention, the remapping block is configured by the electronic device 601 according to the information of the services supported by each solid state disk 602 .

本发明的一个实施例中,待响应操作指令为:数据写入指令;In an embodiment of the present invention, the operation instruction to be responded is: a data write instruction;

电子设备601,具体用从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块,其中,数据区块包括:所连接的各个固态硬盘602中用于写入数据的所有区块;The electronic device 601, specifically in the data block indicated from the locally recorded block information, selects the target block for writing data based on the remaining erasing and rewriting times of each data block, wherein the data block includes: All blocks used for writing data in each of the connected solid-state drives 602;

目标区块所属的固态硬盘602,具体用于将数据写入指令所指示的待写入数据写入至目标区块,并向电子设备601发送指示对区块信息中目标区块的信息进行更新的指令。The solid-state drive 602 to which the target block belongs, is specifically used to write the data to be written indicated by the data writing instruction to the target block, and send an instruction to the electronic device 601 to update the information of the target block in the block information instruction.

本发明实施例提供的如图6所示的基于固态硬盘的指令响应系统,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。并且,也可以在确保维持数据安全的同时,也不会浪费固态硬盘中剩余可用的区块,同时确保系统中各个固态硬盘包含的区块间的磨损平衡。In the solid-state drive-based command response system as shown in FIG. 6 provided by the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid-state drive connected to the electronic device, the electronic device can Block information, select the target block used to respond to the operation command to be responded from the blocks contained in each solid-state drive, and combine each solid-state drive connected to the electronic device as a whole, avoiding each solid-state drive responding to the operation command independently, reducing the The differences in the usage of each solid-state hard disk are eliminated, thereby facilitating the use and maintenance of the solid-state hard disks in the storage device. In addition, while ensuring data security, the remaining available blocks in the solid state drive are not wasted, and the wear balance among the blocks included in each solid state drive in the system can be ensured.

在如图6提供的固态硬盘的指令响应系统的基础上,如图7所示,本发明实施例还提供了一种固态硬盘的指令响应系统,该系统包括:电子设备601和与电子设备连接的固态硬盘602,电子设备601,还包括缓存空间701,其中:On the basis of the instruction response system of the solid-state hard disk provided in FIG. 6 , as shown in FIG. 7 , an embodiment of the present invention further provides an instruction response system of the solid-state hard disk. The system includes: an electronic device 601 and a connection with the electronic device. The solid-state disk 602, the electronic device 601, further includes a cache space 701, wherein:

电子设备601,还用于在执行获得待响应操作指令之后,执行以下步骤:The electronic device 601 is further configured to perform the following steps after obtaining the operation instruction to be responded:

在待写入数据为随机数据时,将待写入数据缓存至预设的缓存空间701,当缓存空间701中已缓存数据的数据量大于预设阈值后,或缓存空间701中缓存数据超过预设时长未进行数据写入时,执行从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块的步骤;When the data to be written is random data, the data to be written is cached in the preset cache space 701 , when the amount of cached data in the cache space 701 is greater than the preset threshold, or the cached data in the cache space 701 exceeds the preset threshold When the duration is not written in data, perform the step of selecting the target block for writing data based on the remaining erasing and rewriting times of each data block in the data block indicated by the block information of the local record;

和/或,and / or,

在待写入数据为顺序数据时,直接执行从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块的步骤。When the data to be written is sequential data, directly execute the step of selecting a target block for writing data based on the remaining erasing times of each data block in the data blocks indicated by the locally recorded block information .

本发明实施例提供的如图7所示的基于固态硬盘的指令响应系统,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。并且,也可以在确保维持数据安全的同时,也不会浪费固态硬盘中剩余可用的区块,同时确保系统中各个固态硬盘包含的区块间的磨损平衡。同时也可以避免频繁的对区块进行擦写。In the solid-state drive-based command response system as shown in FIG. 7 provided by the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid-state drive connected to it, the electronic device can record the block information according to the recorded area. Block information, select the target block used to respond to the operation command to be responded from the blocks contained in each solid-state drive, and combine each solid-state drive connected to the electronic device as a whole, avoiding each solid-state drive responding to the operation command independently, reducing the The differences in the usage of each solid-state hard disk are eliminated, thereby facilitating the use and maintenance of the solid-state hard disks in the storage device. In addition, while ensuring data security, the remaining available blocks in the solid state drive are not wasted, and the wear balance among the blocks included in each solid state drive in the system can be ensured. At the same time, frequent erasing and writing of blocks can also be avoided.

在如图7提供的固态硬盘的指令响应系统的基础上,如图8所示,本发明实施例还提供了一种固态硬盘的指令响应系统,该系统包括:电子设备601和与电子设备连接的固态硬盘602,电子设备601,还包括缓存空间701和非易失的存储介质801,其中:On the basis of the instruction response system of the solid-state hard disk provided in FIG. 7 , as shown in FIG. 8 , an embodiment of the present invention further provides an instruction response system of the solid-state hard disk. The system includes: an electronic device 601 and a connection with the electronic device. The solid-state disk 602, the electronic device 601, further includes a cache space 701 and a non-volatile storage medium 801, wherein:

电子设备601,还用于在掉电后,将缓存空间701中缓存的数据搬移至非易失的存储介质801,并且在重新上电后,将非易失的存储介质801中存储的数据恢复至缓存空间701。The electronic device 601 is further configured to move the data cached in the cache space 701 to the non-volatile storage medium 801 after power failure, and restore the data stored in the non-volatile storage medium 801 after the power is turned on again to cache space 701.

本发明实施例提供的如图7所示的基于固态硬盘的指令响应系统,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。并且,也可以在确保维持数据安全的同时,也不会浪费固态硬盘中剩余可用的区块,同时确保系统中各个固态硬盘包含的区块间的磨损平衡。同时也可以防止突然掉电造成的数据丢失。In the solid-state drive-based command response system as shown in FIG. 7 provided by the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid-state drive connected to it, the electronic device can record the block information according to the recorded area. Block information, select the target block used to respond to the operation command to be responded from the blocks contained in each solid-state drive, and combine each solid-state drive connected to the electronic device as a whole, avoiding each solid-state drive responding to the operation command independently, reducing the The differences in the usage of each solid-state hard disk are eliminated, thereby facilitating the use and maintenance of the solid-state hard disks in the storage device. In addition, while ensuring data security, the remaining available blocks in the solid state drive are not wasted, and the wear balance among the blocks included in each solid state drive in the system can be ensured. At the same time, it can also prevent data loss caused by sudden power failure.

基于同一发明构思,根据本发明实施例提供的基于固态硬盘的指令响应方法,如图9所示,本发明实施例还提供了一种基于固态硬盘的指令响应装置,应用于电子设备,电子设备连接有固态硬盘,装置包括:Based on the same inventive concept, according to an instruction response method based on an SSD provided by an embodiment of the present invention, as shown in FIG. 9 , an embodiment of the present invention also provides an instruction response device based on a SSD, which is applied to electronic equipment, electronic equipment With a solid state drive attached, the device includes:

指令获得模块901,用于获得待响应操作指令;The instruction obtaining module 901 is used to obtain the operation instruction to be responded;

目标区块选择模块902,用于基于本地记录的区块信息,从所连接的各个固态硬盘包含的与待响应操作指令的类型相匹配的所有区块中,选择用于响应待响应操作指令的目标区块;The target block selection module 902 is used for, based on the locally recorded block information, from all the blocks contained in the connected solid-state drives that match the type of the operation instruction to be responded, and selects a block for responding to the operation instruction to be responded to. target block;

指令响应模块903,用于控制目标区块所属的固态硬盘在目标区块上响应待响应操作指令。The command response module 903 is configured to control the solid state drive to which the target block belongs to respond to the operation command to be responded on the target block.

本发明的一个实施例中,待响应操作指令为:用于指示对固态硬盘中出现的损坏区块进行重映射的指令;In one embodiment of the present invention, the operation instruction to be responded is: an instruction for instructing to remap damaged blocks that appear in the solid-state hard disk;

目标区块选择模块902,具体用于从本地记录的区块信息指示的重映射区块中,选择用于对损坏区块进行重映射的目标区块,其中,重映射区块包括:所连接的各个固态硬盘中用于对损坏的区块进行映射的所有区块;The target block selection module 902 is specifically configured to select a target block for remapping the damaged block from the remapping block indicated by the locally recorded block information, wherein the remapping block includes: All blocks used to map damaged blocks in each SSD of ;

指令响应模块903,具体用于控制目标区块所属的固态硬盘将损坏区块重映射至目标区块,并对区块信息中目标区块的信息进行更新。The instruction response module 903 is specifically configured to control the solid state disk to which the target block belongs to remap the damaged block to the target block, and update the information of the target block in the block information.

本发明的一个实施例中,重映射区块是电子设备根据各个固态硬盘所支持业务的信息配置的。In an embodiment of the present invention, the remapping block is configured by the electronic device according to the information of the services supported by each solid-state hard disk.

本发明的一个实施例中,待响应操作指令为:数据写入指令;In an embodiment of the present invention, the operation instruction to be responded is: a data write instruction;

目标区块选择模块902,具体用于从本地记录的区块信息指示的数据区块中,基于每个数据区块的剩余擦写次数,选择用于写入数据的目标区块,其中,数据区块包括:所连接的各个固态硬盘中用于写入数据的所有区块;The target block selection module 902 is specifically used to select a target block for writing data based on the remaining erasing times of each data block from the data blocks indicated by the locally recorded block information, wherein the data Blocks include: all blocks used for writing data in each connected solid-state drive;

指令响应模块903,具体用于控制目标区块所属的固态硬盘将数据写入指令所指示的待写入数据写入至目标区块,并对区块信息中目标区块的信息进行更新。The instruction response module 903 is specifically configured to control the solid-state hard disk to which the target block belongs to write the data to be written indicated by the data write instruction to the target block, and update the information of the target block in the block information.

本发明的一个实施例中,装置还包括In an embodiment of the present invention, the device further includes

数据缓存模块,用于在指令获得模块901获得待响应操作指令之后,在待写入数据为随机数据时,将待写入数据缓存至预设的缓存空间,当缓存空间中已缓存数据的数据量大于预设阈值后,或缓存空间中缓存数据超过预设时长未进行数据写入时,调用目标区块选择模块;The data cache module is used to cache the data to be written in the preset cache space when the data to be written is random data after the instruction obtaining module 901 obtains the operation instruction to be responded to, and when the data of the data has been cached in the cache space After the amount is greater than the preset threshold, or when the cached data in the cache space exceeds the preset time and no data is written, the target block selection module is called;

和/或,and / or,

在待写入数据为顺序数据时,直接调用目标区块选择模块。When the data to be written is sequential data, the target block selection module is directly called.

本发明的一个实施例中,电子设备包括非易失的存储介质,装置还包括:In an embodiment of the present invention, the electronic device includes a non-volatile storage medium, and the apparatus further includes:

数据恢复模块,用于在电子设备掉电后,将缓存空间中缓存的数据搬移至非易失的存储介质,并且在电子设备重新上电后,将非易失的存储介质中存储的数据恢复至缓存空间。The data recovery module is used to move the data cached in the cache space to the non-volatile storage medium after the electronic device is powered off, and restore the data stored in the non-volatile storage medium after the electronic device is powered on again to the cache space.

本发明实施例提供的如图9所示的基于固态硬盘的指令响应装置,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。In the solid-state drive-based command response device shown in FIG. 9 provided by the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid-state drive connected to it, the electronic device can record the block information according to the recorded area. Block information, select the target block used to respond to the operation command to be responded from the blocks contained in each solid-state drive, and combine each solid-state drive connected to the electronic device as a whole, avoiding each solid-state drive responding to the operation command independently, reducing the The differences in the usage of each solid-state hard disk are eliminated, thereby facilitating the use and maintenance of the solid-state hard disks in the storage device.

本发明实施例还提供了一种电子设备,如图10所示,包括处理器1001、通信接口1002、存储器1003和通信总线1004,其中,处理器1001,通信接口1002,存储器1003通过通信总线1004完成相互间的通信,An embodiment of the present invention further provides an electronic device, as shown in FIG. 10 , including a processor 1001 , a communication interface 1002 , a memory 1003 and a communication bus 1004 , wherein the processor 1001 , the communication interface 1002 , and the memory 1003 pass through the communication bus 1004 complete communication with each other,

存储器1003,用于存放计算机程序;a memory 1003 for storing computer programs;

处理器1001,用于执行存储器1003上所存放的程序时,实现如下步骤:When the processor 1001 is used to execute the program stored in the memory 1003, the following steps are implemented:

获得待响应操作指令;Obtain the operation command to be responded;

基于本地记录的区块信息,从所连接Based on locally recorded block information, from the connected

的各个固态硬盘包含的与所述待响应操作指令的类型相匹配的所有区块中,选择用于响应所述待响应操作指令的目标区块;Among all the blocks contained in each solid-state drive that match the type of the operation instruction to be responded, select a target block for responding to the operation instruction to be responded;

控制所述目标区块所属的固态硬盘在所述目标区块上响应所述待响应操作指令。The solid state drive to which the target block belongs is controlled to respond to the to-be-responded operation command on the target block.

本发明实施例提供的如图10所示的电子设备,由于电子设备记录有其所连接的各个固态硬盘所包含区块的区块信息,进而电子设备可以根据所记录的区块信息,从各个固态硬盘包含的区块中选择出用于响应待响应操作指令的目标区块,将与电子设备相连的各个固态硬盘结合为整体,避免了各个固态硬盘独自响应操作指令,减少了各个固态硬盘的使用情况的差异性,进而有利于对存储设备中固态硬盘的使用和维护。In the electronic device shown in FIG. 10 provided by the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid-state drive connected to the electronic device, the electronic device can, according to the The target block used to respond to the operation command to be responded is selected from the blocks contained in the solid-state drive, and the solid-state drives connected to the electronic device are combined into a whole, which avoids each solid-state drive responding to the operation command independently, and reduces the number of solid-state drives. The difference in usage conditions is conducive to the use and maintenance of solid-state drives in storage devices.

需要说明的是,上述电子设备实现基于固态硬盘的指令响应的其他实施例,与前述方法实施例部分提及的基于固态硬盘的指令响应方法相同,在此不再赘述。It should be noted that other embodiments in which the electronic device implements the solid-state drive-based command response are the same as the solid-state drive-based command response method mentioned in the foregoing method embodiments, and are not repeated here.

上述电子设备提到的通信总线可以是外设部件互连标准(PeripheralComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above electronic device and other devices.

存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital SignalProcessing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; may also be a digital signal processor (Digital Signal Processing, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一基于固态硬盘的指令响应方法的步骤。In another embodiment provided by the present invention, a computer-readable storage medium is also provided, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned solid-state hard disks is implemented. The steps of the command response method.

在本发明提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一基于固态硬盘的指令响应方法。In another embodiment provided by the present invention, there is also provided a computer program product including instructions, which, when running on a computer, enables the computer to execute any one of the solid-state disk-based instruction response methods in the foregoing embodiments.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘SolidState Disk(SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), among others.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统、装置、电子设备、计算机可读存储介质和计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system, apparatus, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple. Can.

以上所述仅为本发明的较佳实施例,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (15)

1. A command response method based on a solid state disk is applied to electronic equipment, the electronic equipment is connected with the solid state disk, and the method comprises the following steps:
obtaining an operation instruction to be responded;
selecting a target block for responding to the operation instruction to be responded from all blocks contained in each connected solid state disk and matched with the type of the operation instruction to be responded based on the block information recorded locally;
and controlling the solid state disk to which the target block belongs to respond to the operation instruction to be responded on the target block.
2. The method of claim 1,
the operation instruction to be responded comprises: instructions for indicating remapping of a defective block occurring in the solid state disk;
the selecting, based on the locally recorded block information, a target block for responding to the operation instruction to be responded from all blocks contained in the connected solid state disks and matched with the type of the operation instruction to be responded includes:
selecting a target block for remapping the defective block from remapped blocks indicated by locally recorded block information, wherein the remapped blocks include: all blocks used for mapping the damaged blocks in the connected solid state disks;
the controlling the solid state disk to which the target block belongs to respond to the operation instruction to be responded on the target block includes:
and controlling the solid state disk to which the target block belongs to remap the damaged block to the target block, and updating the information of the target block in the block information.
3. The method of claim 2, wherein the remapping blocks are configured by the electronic device according to information about services supported by each of the solid state disks.
4. The method of claim 1,
the operation instruction to be responded comprises: a data write command;
the selecting, based on the locally recorded block information, a target block for responding to the operation instruction to be responded from all blocks contained in the connected solid state disks and matched with the type of the operation instruction to be responded includes:
selecting a target block for writing data based on the remaining number of erasures of each data block from data blocks indicated by the block information of the local recording, wherein the data blocks include: all blocks used for writing data in the connected solid state disks;
the controlling the solid state disk to which the target block belongs to respond to the operation instruction to be responded on the target block includes:
and controlling the solid state disk to which the target block belongs to write the data to be written, indicated by the data writing instruction, into the target block, and updating the information of the target block in the block information.
5. The method of claim 4, after obtaining the operation instruction to be responded to, further comprising:
when the data to be written is random data, caching the data to be written into a preset cache space, and when the data volume of the cached data in the cache space is larger than a preset threshold value or the cached data in the cache space exceeds a preset time and data writing is not carried out, executing a step of selecting a target block for writing the data in the data blocks indicated by the block information recorded from the local area based on the residual erasing times of each data block;
and/or the presence of a gas in the gas,
and when the data to be written is sequential data, directly executing the step of selecting a target block for writing the data based on the residual erasing times of each data block in the data blocks indicated by the block information recorded from the local.
6. The method of claim 5, wherein the electronic device comprises a non-volatile storage medium, the method further comprising:
after the electronic equipment is powered off, transferring the data cached in the cache space to the nonvolatile storage medium;
and after the electronic equipment is powered on again, restoring the data stored in the nonvolatile storage medium to the cache space.
7. An instruction response system based on a solid state disk, the system comprising: electronic equipment and with the solid state hard drives that electronic equipment is connected, wherein:
the electronic equipment is used for obtaining an operation instruction to be responded, selecting a target block for responding to the operation instruction to be responded from all blocks contained in each connected solid state disk and matched with the type of the operation instruction to be responded based on locally recorded block information, and sending a control instruction indicating the operation instruction to be responded to the solid state disk to which the target block belongs;
and the solid state disk to which the target block belongs is used for responding to the operation instruction to be responded on the target block after the control instruction is received.
8. The system of claim 7,
the operation instruction to be responded comprises: instructions for indicating remapping of a defective block occurring in the solid state disk;
the electronic device is specifically configured to select a target block for remapping the damaged block from remapped blocks indicated by locally recorded block information, where the remapped blocks include: all blocks used for mapping the damaged blocks in the connected solid state disks;
the solid state disk to which the target block belongs is specifically configured to remap the damaged block to the target block, and generate an instruction indicating to update information of the target block in the block information to the electronic device.
9. The system of claim 8, wherein the remapping blocks are configured by the electronic device according to information about services supported by each of the solid state disks.
10. The system of claim 7,
the operation instruction to be responded comprises: a data write command;
the electronic device specifically selects a target block for writing data based on the remaining erase count of each data block from among data blocks indicated by locally recorded block information, wherein the data blocks include: all blocks used for writing data in the connected solid state disks;
the solid state disk to which the target block belongs is specifically configured to write the data to be written, which is indicated by the data writing instruction, into the target block, and send an instruction indicating to update information of the target block in the block information to the electronic device.
11. The system of claim 10, wherein the electronic device further comprises a cache space;
the electronic device is further configured to, after executing the operation instruction to obtain a response to be received, execute the following steps:
when the data to be written is random data, caching the data to be written into a preset cache space, and when the data volume of the cached data in the cache space is larger than a preset threshold value or the cached data in the cache space exceeds a preset time and data writing is not performed, executing a step of selecting a target block for writing the data in the data blocks indicated by the block information recorded locally based on the residual erasing times of each data block;
and/or the presence of a gas in the gas,
and when the data to be written is sequential data, directly executing the step of selecting a target block for writing the data based on the residual erasing times of each data block in the data blocks indicated by the block information recorded from the local.
12. The system of claim 11, wherein the electronic device comprises a non-volatile storage medium;
the electronic device is further configured to move the data cached in the cache space to the nonvolatile storage medium after power failure, and restore the data stored in the nonvolatile storage medium to the cache space after power is re-turned on.
13. The utility model provides an instruction response device based on solid state hard drives, its characterized in that is applied to electronic equipment, electronic equipment is connected with solid state hard drives, the device includes:
the instruction obtaining module is used for obtaining an operation instruction to be responded;
the target block selection module is used for selecting a target block for responding to the operation instruction to be responded from all blocks which are contained in the connected solid state disks and are matched with the type of the operation instruction to be responded based on locally recorded block information;
and the instruction response module is used for controlling the solid state disk to which the target block belongs to respond to the operation instruction to be responded on the target block.
14. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
15. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202010663906.7A 2020-07-10 2020-07-10 Solid-state drive-based command response method, system, device and electronic device Pending CN111813340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010663906.7A CN111813340A (en) 2020-07-10 2020-07-10 Solid-state drive-based command response method, system, device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010663906.7A CN111813340A (en) 2020-07-10 2020-07-10 Solid-state drive-based command response method, system, device and electronic device

Publications (1)

Publication Number Publication Date
CN111813340A true CN111813340A (en) 2020-10-23

Family

ID=72843478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010663906.7A Pending CN111813340A (en) 2020-07-10 2020-07-10 Solid-state drive-based command response method, system, device and electronic device

Country Status (1)

Country Link
CN (1) CN111813340A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076066A (en) * 2021-04-14 2021-07-06 湖南兴天电子科技有限公司 High-capacity high-speed storage device and operation method thereof
CN114356223A (en) * 2021-12-16 2022-04-15 深圳云天励飞技术股份有限公司 Memory access method and device, chip and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101646994A (en) * 2006-12-06 2010-02-10 弗森多系统公司(dba弗森-艾奥) Apparatus, system, and method for managing commands of solid-state storage using bank interleave
CN102609360A (en) * 2012-01-12 2012-07-25 华为技术有限公司 Data processing method, data processing device and data processing system
US20140156965A1 (en) * 2012-12-05 2014-06-05 Fusion-Io, Inc. Advanced groomer for storage array
CN105045540A (en) * 2015-08-28 2015-11-11 厦门大学 Data layout method of solid-state disk array
US20160364151A1 (en) * 2015-06-10 2016-12-15 Pure Storage, Inc. Dynamically managing control information in a storage device
US20160378656A1 (en) * 2015-06-24 2016-12-29 Fujitsu Limited Storage device, cache-write control method, and cache-write control program
CN106294202A (en) * 2015-06-12 2017-01-04 联想(北京)有限公司 A kind of date storage method and device
US20170003896A1 (en) * 2015-07-01 2017-01-05 Pure Storage, Inc. Offloading device management responsibilities from a storage device in an array of storage devices
US20190073265A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Incremental raid stripe update parity calculation
US20190073141A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Converting raid data between persistent storage types

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101646994A (en) * 2006-12-06 2010-02-10 弗森多系统公司(dba弗森-艾奥) Apparatus, system, and method for managing commands of solid-state storage using bank interleave
CN102609360A (en) * 2012-01-12 2012-07-25 华为技术有限公司 Data processing method, data processing device and data processing system
US20140156965A1 (en) * 2012-12-05 2014-06-05 Fusion-Io, Inc. Advanced groomer for storage array
US20160364151A1 (en) * 2015-06-10 2016-12-15 Pure Storage, Inc. Dynamically managing control information in a storage device
CN106294202A (en) * 2015-06-12 2017-01-04 联想(北京)有限公司 A kind of date storage method and device
US20160378656A1 (en) * 2015-06-24 2016-12-29 Fujitsu Limited Storage device, cache-write control method, and cache-write control program
US20170003896A1 (en) * 2015-07-01 2017-01-05 Pure Storage, Inc. Offloading device management responsibilities from a storage device in an array of storage devices
CN105045540A (en) * 2015-08-28 2015-11-11 厦门大学 Data layout method of solid-state disk array
US20190073265A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Incremental raid stripe update parity calculation
US20190073141A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Converting raid data between persistent storage types

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076066A (en) * 2021-04-14 2021-07-06 湖南兴天电子科技有限公司 High-capacity high-speed storage device and operation method thereof
CN113076066B (en) * 2021-04-14 2023-12-08 湖南兴天电子科技股份有限公司 High-capacity high-speed storage device and operation method thereof
CN114356223A (en) * 2021-12-16 2022-04-15 深圳云天励飞技术股份有限公司 Memory access method and device, chip and electronic equipment
CN114356223B (en) * 2021-12-16 2024-01-05 深圳云天励飞技术股份有限公司 Memory access method and device, chip and electronic equipment

Similar Documents

Publication Publication Date Title
KR102580577B1 (en) ZNSs in solid state drives
US8521949B2 (en) Data deleting method and apparatus
JP5612514B2 (en) Nonvolatile memory controller and nonvolatile storage device
US8230161B2 (en) Data backup method for a flash memory and controller and storage system using the same
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
US9075733B1 (en) Selective storage of address mapping metadata in a system having multiple memories
TWI569139B (en) Valid data merging method, memory controller and memory storage apparatus
US7649794B2 (en) Wear leveling method and controller using the same
CN108073522B (en) Garbage collection methods available for data storage devices
CN105339910B (en) Virtual NAND capacity extensions in hybrid drive
US11763899B2 (en) Balanced three-level read disturb management in a memory device
WO2014074449A2 (en) Wear leveling in flash memory devices with trim commands
JPWO2009096180A1 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM
CN106469122A (en) Effective data merging method, memory controller and memory storage device
CN102479549A (en) semiconductor storage device
TWI454922B (en) Memory storage device and memory controller and data writing method thereof
CN111813340A (en) Solid-state drive-based command response method, system, device and electronic device
US11455246B2 (en) Garbage collection method for data storage device
CN116400869B (en) Bad block replacement method of flash memory device, flash memory device controller and flash memory device
CN114328297A (en) Mapping table management method, memory control circuit unit and memory storage device
JPWO2007105688A1 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM
US20230168826A1 (en) Full Die Recovery In ZNS SSD
TWI601141B (en) Access method of flash memory and associated memory controller and electronic device
US11249898B1 (en) Data merge method, memory storage device and memory control circuit unit
CN113448771B (en) Memory controller and data processing method

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