CN111813340A - Instruction response method, system and device based on solid state disk and electronic equipment - Google Patents

Instruction response method, system and device based on solid state disk and electronic equipment 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
solid state
block
target block
state disk
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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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; CALCULATING OR 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]

Abstract

The embodiment of the invention provides an instruction response method, an instruction response system, an instruction response device and electronic equipment based on solid state disks.

Description

Instruction response method, system and device based on solid state disk and electronic equipment
Technical Field
The invention relates to the technical field of data storage, in particular to a method, a system and a device for responding to an instruction based on a solid state disk and electronic equipment.
Background
Solid State Disks (SSD) are hard disks made of Solid State electronic memory chip arrays, and have the advantages of high speed, high environmental adaptability, and low noise.
Due to the particularity of the solid state disks, each solid state disk comprises a control unit, and each solid state disk responds to various operation instructions through the control unit contained in the solid state disk.
Because the capacity of a single solid state disk is limited, a plurality of solid state disks are often integrated into one storage device for use in the actual use process, and each solid state disk independently responds to the received operation instruction, so that the use condition of the solid state disk contained in one storage device often has great difference, and the use and maintenance of the solid state disk in the storage device are not facilitated.
Disclosure of Invention
The embodiment of the invention aims to provide a solid state disk-based instruction response method, a solid state disk-based instruction response system, a solid state disk-based instruction response device and electronic equipment, so as to be beneficial to use and maintenance of a solid state disk in storage equipment. The specific technical scheme is as follows:
the embodiment of the invention provides an instruction response method based on a solid state disk, which is applied to electronic equipment, wherein 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.
In an embodiment of the present invention, the operation instruction to be responded includes: 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.
In an embodiment of the present invention, the remapping blocks are configured by the electronic device according to information of services supported by the solid state disks.
In an embodiment of the present invention, the operation instruction to be responded includes: 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.
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, 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.
In one embodiment of the invention, the electronic device includes a non-volatile storage medium, and the method further includes:
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.
The embodiment of the invention also provides an instruction response system based on the solid state disk, which comprises: 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.
In an embodiment of the present invention, the operation instruction to be responded includes: 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.
In an embodiment of the present invention, the remapping blocks are configured by the electronic device according to information of services supported by the solid state disks.
In an embodiment of the present invention, the operation instruction to be responded includes: 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.
In an embodiment of the present invention, the electronic device further includes 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.
In one embodiment of the 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 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.
The embodiment of the invention also provides an instruction response device based on the solid state disk, which is applied to electronic equipment, wherein the electronic equipment is connected with the solid state disk, and the device comprises:
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.
In an embodiment of the present invention, the operation instruction to be responded includes: instructions for indicating remapping of a defective block occurring in the solid state disk;
the target block selection module 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 instruction response module 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 information of the target block in the block information.
In an embodiment of the present invention, the remapping blocks are configured by the electronic device according to information of services supported by the solid state disks.
In an embodiment of the present invention, the operation instruction to be responded includes: a data write command;
the target block selection module is specifically configured to select a target block for writing data based on the remaining number of times of erasing each data block from data blocks indicated by locally recorded block information, where the data blocks include: all blocks used for writing data in the connected solid state disks;
the instruction response module is specifically configured to control the solid state disk to which the target block belongs to write the data to be written, which is indicated by the data write instruction, into the target block, and update information of the target block in the block information.
In one embodiment of the invention, the apparatus further comprises
The data caching module is used for caching the data to be written into a preset caching space when the data to be written into is random data after the instruction obtaining module obtains the operation instruction to be responded, and calling the target block selecting module when the data amount of the cached data in the caching space is larger than a preset threshold value or the cached data in the caching space exceeds a preset time length and data writing is not carried out;
and/or the presence of a gas in the gas,
and when the data to be written is sequential data, directly calling the target block selection module.
In one embodiment of the invention, the electronic device includes a non-volatile storage medium, and the apparatus further includes:
and the data recovery module is used for moving the data cached in the cache space to the nonvolatile storage medium after the power failure of the electronic equipment, and recovering the data stored in the nonvolatile storage medium to the cache space after the power of the electronic equipment is restarted.
The embodiment of the invention also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the steps of the instruction response method based on the solid state disk when executing the program stored in the memory.
The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the instruction response method based on the solid state disk described above are implemented.
The embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above instruction response methods based on a solid state disk.
The embodiment of the invention has the following beneficial effects:
according to the instruction response method, the instruction response system, the instruction response device and the electronic equipment based on the solid state disk, the electronic equipment records the block information of the blocks contained in each solid state disk connected with the electronic equipment, and then the electronic equipment can select the target block for responding to the operation instruction to be responded from the blocks contained in each solid state disk according to the recorded block information, and the solid state disks connected with the electronic equipment are combined into a whole, so that the solid state disks do not independently respond to the operation instruction, the difference of the use conditions of the solid state disks is reduced, and the use and maintenance of the solid state disks in the storage equipment are facilitated.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic diagram of a solid state disk-based command response system according to an embodiment of the present invention.
Fig. 2 is a structural diagram of a solid state disk in a command response system based on a solid state disk according to an embodiment of the present invention.
Fig. 3 is a flowchart of a method for responding to a command based on a solid state disk according to an embodiment of the present invention.
Fig. 4 is a flowchart of a method for responding to a command based on a solid state disk according to another embodiment of the present invention.
Fig. 5 is a flowchart of a method for responding to a command based on a solid state disk according to another embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a solid-state disk-based instruction response system according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a solid-state disk-based command response system according to another embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a solid-state disk-based command response system according to yet another embodiment of the present invention.
Fig. 9 is a schematic structural diagram of a solid-state disk-based instruction response apparatus according to an embodiment of the present invention.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
To clearly illustrate the technical solutions provided by the embodiments of the present invention, first, a brief introduction is made to the technical solutions provided by the embodiments of the present invention from a system perspective, and as shown in fig. 1, the embodiments of the present invention provide a command response system based on a solid state disk, where the system includes an electronic device and N solid state disks connected to the electronic device, and the solid state disks are distinguished by using a solid state disk 1 and a solid state disk N, respectively. As shown in fig. 2, an embodiment of the present invention further provides a schematic structural diagram of a solid state disk, where Blk0-Blk1029 respectively indicate each block included in the solid state disk.
In the prior art, each solid state disk independently responds to the received operation instruction, so that each solid state disk ignores the use condition of other solid state disks in the storage device when responding to the operation instruction. Since the operation command can only be responded to by itself, when all the remap blocks reserved in a certain solid state disk in the storage device are used, the solid state disk cannot be used any more even if the solid state disk also contains other data blocks which can be used continuously for reading and writing data due to the consideration of data security, and serious waste is caused. Meanwhile, because the operation instruction can only be responded independently, when data writing is needed, each solid state disk only considers the writing condition of the block contained in the solid state disk, and then block selection is carried out in the block contained in the solid state disk, so that only the wear balance among the blocks in each solid state disk can be maintained, and the wear balance among the blocks contained in each solid state disk in the storage device cannot be maintained.
In order to solve the problems in the prior art, in the solid state disk-based instruction response system shown in fig. 1, block information of blocks included in each solid state disk in the system is recorded in an electronic device. After receiving the operation instruction to be responded, the electronic device can select the most appropriate block for responding to the operation instruction to be responded from the system level.
Specifically, after the electronic device obtains the operation instruction to be responded, the electronic device may select a target block for responding to the operation instruction to be responded from all blocks, which are included in each connected solid state disk and are matched with the type of the operation instruction to be responded, according to the recorded block information, and control the solid state disk to which the target block belongs to respond to the operation instruction to be responded on the target block. Illustratively, when the electronic device selects Blk2 contained in the solid state disk 2 in fig. 2 as the target block according to the recorded block information, the electronic device may control the solid state disk 2 to respond to the operation instruction to be responded on its Blk 2.
The electronic equipment records the block information of the blocks contained in the solid state disks connected with the electronic equipment, and then the electronic equipment can select the target block used for responding to the operation instruction to be responded from the blocks contained in the solid state disks according to the recorded block information, so that the solid state disks connected with the electronic equipment can be combined into a whole, the solid state disks are prevented from responding to the operation instruction independently, the difference of the use conditions of the solid state disks is reduced, and the use and maintenance of the solid state disks in the storage equipment are facilitated.
Meanwhile, after the remap blocks reserved in a certain solid state disk in the storage device are completely used, the solid state disk can be continuously used, even if the blocks of the solid state disk are damaged in the subsequent use process, the damaged blocks of the solid state disk can be remapped through the remap blocks reserved in other solid state disks in the system, and the remaining usable blocks in the solid state disk cannot be wasted while data security is ensured. Meanwhile, when data writing is needed, the writing condition of the blocks contained in each solid state disk in the system can be comprehensively considered, and then block selection is carried out in all the blocks in the system, so that the abrasion balance among the blocks contained in each solid state disk in the storage device is ensured.
The following respectively describes the instruction response method, system, apparatus, electronic device and readable storage medium based on the solid state disk disclosed in the embodiments of the present invention.
The embodiment of the invention provides an instruction response method based on a solid state disk, which is applied to electronic equipment, wherein the electronic equipment is connected with the solid state disk, and as shown in figure 3, the method comprises the following steps:
s301: and obtaining an operation instruction to be responded.
S302: and selecting 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 based on the locally recorded block information.
S303: 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.
In the instruction response method based on the solid state disk shown in fig. 3 provided in the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid state disk connected to the electronic device, and then the electronic device can select the target block for responding to the operation instruction to be responded from the blocks included in each solid state disk according to the recorded block information, and integrate each solid state disk connected to the electronic device, it is avoided that each solid state disk responds to the operation instruction independently, the difference of the use condition of each solid state disk is reduced, and thus, the use and maintenance of the solid state disk in the storage device are facilitated.
In order to clearly illustrate the technical solution of the embodiment of the present invention, the following steps illustrate the instruction response method based on the solid state disk as shown in fig. 3 provided in the embodiment of the present invention.
With respect to step S301, the obtained operation instruction to be responded may be an instruction for operating a block included in a solid state disk connected to the electronic device. Optionally, the to-be-responded operation instruction obtained by the electronic device may be a received external instruction, such as a data writing instruction for instructing data storage, a read-write instruction for reading stored data, and the like, or may be write error information fed back to the electronic device by the solid state disk when a write error occurs in the process of writing data into the block, where the write error information fed back by the solid state disk may be regarded as a remapping instruction for remapping the damaged block.
For step S302, the block information recorded locally may be one or more of location information, category information, status information, remapping information, erasing information, and the like of the block included in the solid state disk connected to the electronic device.
The location information of the block may be information indicating the solid state disk to which the block belongs, such as an identifier of the solid state disk.
The type information of the block may represent a block type to which the block belongs, and optionally, the blocks included in the solid state disk may include a block belonging to a data type and a block belonging to a remapping type, where the block belonging to the data type is a data block for reading and writing data, and the block belonging to the remapping type is a remapping block for remapping a damaged data block.
The status information of the block indicates various statuses of the block, such as full, empty, bad, and wirte _ enable, where full and empty are used to characterize the status of the stored data in the block. The bad is used to distinguish whether the block is damaged, when the block is damaged, the status information includes bad, and when the block is not damaged, the status information does not include bad.
The remapping information of the above-mentioned block is used to record the information related to remapping, for a data block, when it is damaged, the corresponding remapping information records the related information of the remapping block that remaps the data block, for a remapping block, the corresponding remapping information may include whether remapping has been performed, and when remapping has been performed, the related information of the remapped data block may be included.
The erasure information of the block is used to indicate the remaining number of times of erasure of the block, and may include the maximum number of times of erasure of the block and the current number of times of erasure, or may be directly the remaining number of times of erasure of the block.
In an embodiment of the present invention, the types of the operation instructions to be responded to may be classified into a data writing type and a remapping type, where, in each block included in the solid state disk connected to the electronic device, the blocks corresponding to the data writing type and the remapping type are different, where the block matching the data writing type is a data block in all the blocks, in an embodiment of the present invention, the block may be a data block that is not in a full state and a bad state, and the block matching the remapping type is a remapping block in all the blocks, and in an embodiment of the present invention, the block may be a remapping block that is not remapped.
Optionally, the manner of selecting the target block for responding to the operation instruction to be responded from all the blocks, which are included in each solid state disk connected to the electronic device and are matched with the type of the operation instruction to be responded, may be many, and may be determined by combining specific requirements, for example, different selection manners may be determined according to the type of the operation instruction to be responded, when the type is a data write type, an equal probability may be performed for selection, and in order to maintain wear balance between the blocks, an appropriate block may also be selected according to erasure information of each block, when the type is a remapping type, an equal probability may be performed for selection, and a remapping block that is the same as a damaged block and belongs to the same solid state disk may also be preferentially selected.
For step S303, the response modes of the different operation instructions to be responded are also different, for the data write operation instruction and the data read operation instruction, the response mode is to write or read data into or from the solid state disk to which the control target block belongs, and for the remap instruction, the response mode is to remap the damaged block by using the target block by the solid state disk to which the control target block belongs.
The technical scheme of the invention is explained by combining the specific embodiments as follows:
in a case that the operation instruction to be responded is an instruction for instructing remapping of a damaged block appearing in the solid state disk, as shown in fig. 4, an embodiment of the present invention further provides an instruction response method based on the solid state disk, which is applied to an electronic device, where the electronic device is connected with the solid state disk, and as shown in fig. 4, the method includes:
s401: a remapped instruction is obtained.
In this step, the remapping instruction is an instruction for indicating remapping of a damaged block occurring in the solid state disk. For example, when a write error occurs during writing data into the block, the solid state disk feeds back write error information to the electronic device, and the fed back write error information can be regarded as a remapping instruction.
S402: selecting a target block for remapping a damaged block from remapped blocks indicated by locally recorded block information, wherein the remapped blocks include: and all blocks in the connected solid state disks for mapping the damaged blocks.
In this step, the block information recorded locally may be recorded in a Mapping Table (Mapping Table) of the FTL (Flash Translation Layer). The remapped chunk indicated by the locally recorded chunk information may be a remapped type chunk of the type information in the locally recorded chunk information.
In one embodiment, the solid state disk includes remap blocks configured by the electronic device according to information of services supported by the solid state disks. For example, when the solid state disk is initialized, the type of each block in the solid state disk may be determined according to a preset Over-Provisioning (OP) ratio of the solid state disk, that is, which blocks are data blocks and which blocks are remapping blocks in the solid state disk are determined.
For example, the set duty ratio is 10%, the solid state disk includes 100 blocks, when the solid state disk is initialized, 10 blocks are selected from the 100 blocks as remapping blocks, and the remaining 90 blocks are used as data blocks.
Optionally, the manner of selecting the target block for remapping the damaged block from the remapped blocks indicated by the locally recorded block information may be multiple, and the determination may be performed in combination with actual requirements, for example, the selection may be equal probability selection, or a remapped block that does not remap other damaged blocks in the remapped blocks may be determined first, and further selected from the determined remapped blocks, and the selection may also be performed in combination with the information of the damaged block, for example, a remapped block that belongs to the same solid state disk as the damaged block and does not remap other damaged blocks is preferentially selected.
For example, in the structural schematic diagram of the solid state disk shown in fig. 2 provided in the embodiment of the present invention, Blk0-Blk1021 in each solid state disk is assumed to be a data block, Blk1022-Blk1029 is a remapping block, when Blk0 in the solid state disk 1 is damaged, if there are any unused remapping blocks Blk1028 and Blk1029 in the solid state disk 1, then any one of the Blk1028 and Blk1029 blocks may be used to remap Blk0, and if there is no unused remapping block in the solid state disk 1 and there is an unused remapping block Blk1027 in the solid state disk 2, then Blk0 in the solid state disk 1 may be remapped using Blk1027 in the solid state disk 2.
S403: 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.
In this step, the solid state disk to which the target block belongs is controlled to remap the damaged block to the target block, that is, data to be written into the damaged block is written into the target block.
After the remapping is completed, the information of the target block in the synchronization block information may be updated, for example, the remapping information of the target block is updated to be remapped, and the corresponding identifier of the damaged block is added. In an embodiment of the present invention, information of a damaged block in the block information may also be updated. Such as updating the state information of the damaged block to bad and adding the identification of the target block in its remapping information.
In the instruction response method based on the solid state disk as shown in fig. 4 provided in the embodiment of the present invention, when all the remap blocks reserved in a certain solid state disk in the storage device are used, the solid state disk can be continuously used, and even if the block of the certain solid state disk is damaged in the subsequent use process, the damaged block of the certain solid state disk can be remapped through the remap blocks reserved in other solid state disks in the system, so that the remaining usable blocks in the solid state disk are not wasted while data security is ensured.
In a case that the operation instruction to be responded is a data write instruction, as shown in fig. 5, an embodiment of the present invention further provides an instruction response method based on a solid state disk, which is applied to an electronic device, where the electronic device is connected to the solid state disk, and as shown in fig. 5, the method includes:
s501: a data write command is received.
In this step, when data needs to be stored, the electronic device receives a data write command instructing to store the data.
In one embodiment, to avoid frequent erasing and writing of the block, when the data to be written is random data, the data to be written may be cached in a preset cache space, and when the data amount of the cached data in the cache space is greater than a preset threshold, or the cached data in the cache space exceeds a preset duration and no data is written, step S502 is executed; and/or, when the data to be written is sequential data, directly executing S502.
The random data is data Input by a random IO (Input Output), the data amount of each random IO is small, if the random IO is directly written into a block, a spare storage space may exist in the block in which the data is written, thereby causing waste of the storage space, and meanwhile, when the data needs to be written again, the data in the block needs to be stored first, then the data stored in the block needs to be erased, and finally the new data and the stored data are written into the block together, thereby causing frequent erasing and writing of the block.
As described above, the cache space may be a Dynamic Random Access Memory (DRAM) cache, such as a Memory bank, included in the electronic device.
S502: selecting a target block for writing data based on the remaining number of erasures of each data block from among data blocks indicated by the block information recorded locally, wherein the data blocks include: and all blocks used for writing data in the connected solid state disks.
In this step, the locally recorded block information may be recorded in a block management linked list, and the data block indicated by the locally recorded block information may be a block whose type information in the locally recorded block information is a data type.
Optionally, the remaining number of times of erasing and writing of each data block may be calculated by the maximum number of times of erasing and writing of each data block, that is, the remaining number of times of erasing and writing is the maximum number of times of erasing and writing-the number of times of erasing and writing, after data is written in each data block, the number of times of erasing and writing is increased by 1, and the remaining number of times of erasing and writing in response is decreased by 1.
The method for selecting the target block for writing data based on the remaining erase times of each data block may include multiple methods, for example, data may be preferentially written to a block with a large number of remaining erase times, a block with the largest number of remaining erase times may be selected as the target block from each block, a plurality of data blocks with a previous number of remaining erase times may be selected first, and then the target block may be selected from the selected data blocks with an equal probability.
S503: and controlling the solid state disk to which the target block belongs to write the data to be written, which is indicated by the data writing instruction, into the target block, and updating the information of the target block in the block information.
In this step, the solid state disk to which the target block belongs is controlled to remap the damaged block to the target block, that is, data to be written into the damaged block is written into the target block.
After the remapping is completed, the information of the target block in the block information may be updated synchronously, or in an embodiment of the present invention, the information of a damaged block in the block information may also be updated. If the information of the target block is updated to be remapped, and the information of the damaged block is added to the remapped information.
In the instruction response method based on the solid state disk as shown in fig. 5, when data is required to be written, the write-in condition of the blocks included in each solid state disk connected to the electronic device is considered, and then block selection is performed in all the blocks in the system, so that the wear balance among the blocks included in each solid state disk in the storage device is ensured.
On the basis of the instruction response method based on the solid state disk as shown in fig. 5 provided in the embodiment of the present invention, in order to prevent data loss caused by sudden power failure, the electronic device further includes a nonvolatile storage medium, and in the operation process of the electronic device, after the power failure of the electronic device, the data cached in the cache space may be moved to the nonvolatile storage medium until the electronic device is powered on again, and the data stored in the nonvolatile storage medium is restored to the cache space. Optionally, the electronic device further comprises a minimum system battery for providing power after a power outage.
Based on the same inventive concept, according to the instruction response method of the solid state disk provided in the embodiment of the present invention, as shown in fig. 6, an embodiment of the present invention further provides an instruction response system of the solid state disk, where the system includes: electronic equipment 601 and solid state drive 602 connected with electronic equipment, wherein:
the electronic device 601 is configured to obtain an operation instruction to be responded, select a target block for responding to the operation instruction to be responded from all blocks, which are included in each connected solid state disk and match with the type of the operation instruction to be responded, based on locally recorded block information, and send a control instruction indicating the operation instruction to be responded to the solid state disk 602 to which the target block belongs;
the solid state disk 602 to which the target block belongs is configured to respond to the operation instruction to be responded on the target block after receiving the control instruction.
In an embodiment of the present invention, the operation instruction to be responded includes: instructions for indicating remapping of a corrupted block present in solid state disk 602;
the electronic device 601 is specifically configured to select a target block for remapping a 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 602 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 601.
In an embodiment of the present invention, the remapping blocks are configured by the electronic device 601 according to information of services supported by each solid state disk 602.
In an embodiment of the present invention, the operation instruction to be responded includes: a data write command;
the electronic device 601 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 in each connected solid state disk 602 for writing data;
the solid state disk 602 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 601.
In the instruction response system based on the solid state disk shown in fig. 6 provided in the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid state disk connected to the electronic device, and then the electronic device can select the target block for responding to the operation instruction to be responded from the blocks included in each solid state disk according to the recorded block information, and integrate each solid state disk connected to the electronic device, it is avoided that each solid state disk responds to the operation instruction independently, the difference in the use condition of each solid state disk is reduced, and thus, the use and maintenance of the solid state disks in the storage device are facilitated. In addition, the data security can be maintained, the remaining usable blocks in the solid state disk cannot be wasted, and the wear balance among the blocks contained in each solid state disk in the system can be ensured.
On the basis of the instruction response system of the solid state disk provided in fig. 6, as shown in fig. 7, an embodiment of the present invention further provides an instruction response system of a solid state disk, where the system includes: electronic device 601 and solid state drive 602 connected with electronic device, electronic device 601 further includes a cache space 701, wherein:
the electronic device 601 is further configured to, after the obtaining of the operation instruction to be responded is executed, execute the following steps:
caching the data to be written into a preset cache space 701 when the data to be written is random data, and executing a step of selecting a target block for writing the data from data blocks indicated by block information recorded locally based on the remaining erasing times of each data block when the data amount of the cached data in the cache space 701 is larger than a preset threshold value or the cached data in the cache space 701 exceeds a preset time length and the data is not written;
and/or the presence of a gas in the gas,
and when the data to be written is sequential data, directly executing a step of selecting a target block for writing the data based on the residual erasing times of each data block from the data blocks indicated by the block information recorded locally.
In the instruction response system based on the solid state disk shown in fig. 7 provided in the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid state disk connected to the electronic device, and then the electronic device can select the target block for responding to the operation instruction to be responded from the blocks included in each solid state disk according to the recorded block information, and integrate each solid state disk connected to the electronic device, it is avoided that each solid state disk responds to the operation instruction independently, the difference in the use condition of each solid state disk is reduced, and thus, the use and maintenance of the solid state disks in the storage device are facilitated. In addition, the data security can be maintained, the remaining usable blocks in the solid state disk cannot be wasted, and the wear balance among the blocks contained in each solid state disk in the system can be ensured. And at the same time, frequent erasing and writing of the block can be avoided.
On the basis of the instruction response system of the solid state disk provided in fig. 7, as shown in fig. 8, an embodiment of the present invention further provides an instruction response system of a solid state disk, where the system includes: electronic device 601 and solid state disk 602 connected with the electronic device, electronic device 601 further includes a buffer space 701 and a nonvolatile storage medium 801, where:
the electronic device 601 is further configured to move the data cached in the cache space 701 to the nonvolatile storage medium 801 after power failure, and restore the data stored in the nonvolatile storage medium 801 to the cache space 701 after power is turned on again.
In the instruction response system based on the solid state disk shown in fig. 7 provided in the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid state disk connected to the electronic device, and then the electronic device can select the target block for responding to the operation instruction to be responded from the blocks included in each solid state disk according to the recorded block information, and integrate each solid state disk connected to the electronic device, it is avoided that each solid state disk responds to the operation instruction independently, the difference in the use condition of each solid state disk is reduced, and thus, the use and maintenance of the solid state disks in the storage device are facilitated. In addition, the data security can be maintained, the remaining usable blocks in the solid state disk cannot be wasted, and the wear balance among the blocks contained in each solid state disk in the system can be ensured. And meanwhile, data loss caused by sudden power failure can be prevented.
Based on the same inventive concept, according to the instruction response method based on the solid state disk provided in the embodiment of the present invention, as shown in fig. 9, an embodiment of the present invention further provides an instruction response apparatus based on the solid state disk, which is applied to an electronic device, the electronic device is connected with the solid state disk, and the apparatus includes:
an instruction obtaining module 901, configured to obtain an operation instruction to be responded;
a target block selection module 902, configured to select a target block for responding to the operation instruction to be responded from all blocks, which are included in each connected solid state disk and match with the type of the operation instruction to be responded, based on locally recorded block information;
and the instruction response module 903 is configured to control the solid state disk to which the target block belongs to respond to the operation instruction to be responded on the target block.
In an embodiment of the present invention, the operation instruction to be responded includes: instructions for indicating remapping of a corrupted block present in a solid state disk;
the target block selecting module 902 is specifically configured to select a target block for remapping a 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 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 information of the target block in the block information.
In an embodiment of the present invention, the remapping blocks are configured by the electronic device according to information of services supported by the solid state disks.
In an embodiment of the present invention, the operation instruction to be responded includes: a data write command;
the target block selecting module 902 is specifically configured to select a target block for writing data based on the remaining erase times of each data block from the data blocks indicated by the locally recorded block information, where the data blocks include: all blocks used for writing data in the connected solid state disks;
the instruction response module 903 is specifically configured to control the solid state disk to which the target block belongs to write the data to be written, which is indicated by the data write instruction, into the target block, and update information of the target block in the block information.
In one embodiment of the invention, the apparatus further comprises
A data caching module, configured to cache the data to be written to a preset caching space when the data to be written is random data after the instruction obtaining module 901 obtains the operation instruction to be responded, and call the target block selecting module when the data amount of the cached data in the caching space is greater than a preset threshold or the cached data in the caching space exceeds a preset time and data writing is not performed;
and/or the presence of a gas in the gas,
and when the data to be written is sequential data, directly calling the target block selection module.
In one embodiment of the invention, the electronic device comprises a non-volatile storage medium, and the apparatus further comprises:
and the data recovery module is used for moving the data cached in the cache space to the nonvolatile storage medium after the power failure of the electronic equipment, and recovering the data stored in the nonvolatile storage medium to the cache space after the power of the electronic equipment is restarted.
In the instruction response device based on the solid state disk shown in fig. 9 provided in the embodiment of the present invention, since the electronic device records the block information of the blocks included in each solid state disk connected to the electronic device, and then the electronic device can select the target block for responding to the operation instruction to be responded from the blocks included in each solid state disk according to the recorded block information, and integrate each solid state disk connected to the electronic device, it is avoided that each solid state disk responds to the operation instruction independently, the difference in the use condition of each solid state disk is reduced, and thus, the use and maintenance of the solid state disks in the storage device are facilitated.
The embodiment of the present invention further provides an electronic device, as shown in fig. 10, which includes 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 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the following steps when executing the program stored in the memory 1003:
obtaining an operation instruction to be responded;
based on locally recorded block information, from the connected
Selecting a target block for responding to the operation instruction to be responded from all blocks contained in each solid state disk and matched with the type of the operation instruction to be responded;
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.
In the electronic device shown in fig. 10 provided in the embodiment of the present invention, since the block information of the blocks included in each solid state disk connected to the electronic device is recorded in the electronic device, and the electronic device can select the target block for responding to the operation instruction to be responded from the blocks included in each solid state disk according to the recorded block information, and integrate each solid state disk connected to the electronic device, each solid state disk is prevented from responding to the operation instruction independently, the difference in the use condition of each solid state disk is reduced, and thus, the use and maintenance of the solid state disks in the storage device are facilitated.
It should be noted that other embodiments of the electronic device for implementing the instruction response based on the solid state disk are the same as the instruction response method based on the solid state disk mentioned in the foregoing method embodiment, and are not described herein again.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the solid state disk-based instruction response methods described above.
In another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned solid state disk-based instruction response methods.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system, apparatus, electronic device, computer-readable storage medium, and computer program product embodiments are described with relative simplicity as they are substantially similar to the method embodiments, and reference may be made to some of the descriptions of the method embodiments for their related aspects.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within 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 Instruction response method, system and device based on solid state disk and electronic equipment Pending CN111813340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010663906.7A CN111813340A (en) 2020-07-10 2020-07-10 Instruction response method, system and device based on solid state disk and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010663906.7A CN111813340A (en) 2020-07-10 2020-07-10 Instruction response method, system and device based on solid state disk and electronic equipment

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 Instruction response method, system and device based on solid state disk and electronic equipment

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
US20190073141A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Converting raid data between persistent storage types
US20190073265A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Incremental raid stripe update parity calculation

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
US20190073141A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Converting raid data between persistent storage types
US20190073265A1 (en) * 2017-09-07 2019-03-07 Pure Storage, Inc. Incremental raid stripe update parity calculation

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
JP5612514B2 (en) Nonvolatile memory controller and nonvolatile storage device
US7613871B2 (en) Storage system using a flash memory partitioned with write-once and rewritable blocks
US9280460B2 (en) Data writing method, memory control circuit unit and memory storage apparatus
US7649794B2 (en) Wear leveling method and controller using the same
US20070214309A1 (en) Nonvolatile storage device and data writing method thereof
US20100161885A1 (en) Semiconductor storage device and storage controlling method
US8902671B2 (en) Memory storage device, memory controller thereof, and method for programming data thereof
US9213629B2 (en) Block management method, memory controller and memory stoarge apparatus
US20090198875A1 (en) Data writing method for flash memory, and controller and system using the same
US8516184B2 (en) Data updating using mark count threshold in non-volatile memory
WO2014074449A2 (en) Wear leveling in flash memory devices with trim commands
CN101963891A (en) Method and device for data storage and processing, solid-state drive system and data processing system
CN110674056B (en) Garbage recovery method and device
US20090259796A1 (en) Data writing method for non-volatile memory and storage system and controller using the same
CN111813340A (en) Instruction response method, system and device based on solid state disk and electronic equipment
US20090210612A1 (en) Memory controller, nonvolatile memory device, and nonvolatile memory system
US9778862B2 (en) Data storing method for preventing data losing during flush operation, memory control circuit unit and memory storage apparatus
KR101070511B1 (en) Solid state drive controller and method for operating of the solid state drive controller
US8103819B2 (en) Information storage device and stored data processing method
US11687263B2 (en) Full die recovery in ZNS SSD
CN113138720B (en) Data storage method, memory control circuit unit and memory storage device
CN103389943A (en) Control device, storage device, and storage control method
CN111324287A (en) Memory device
US11409472B1 (en) Trim command processing method, memory control circuit unit and memory storage apparatus

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