CN116312702B - Solid state disk erasing control method and device, electronic equipment and storage medium - Google Patents

Solid state disk erasing control method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116312702B
CN116312702B CN202310583822.6A CN202310583822A CN116312702B CN 116312702 B CN116312702 B CN 116312702B CN 202310583822 A CN202310583822 A CN 202310583822A CN 116312702 B CN116312702 B CN 116312702B
Authority
CN
China
Prior art keywords
erasing
solid state
state disk
suspension
flash memory
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.)
Active
Application number
CN202310583822.6A
Other languages
Chinese (zh)
Other versions
CN116312702A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310583822.6A priority Critical patent/CN116312702B/en
Publication of CN116312702A publication Critical patent/CN116312702A/en
Application granted granted Critical
Publication of CN116312702B publication Critical patent/CN116312702B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/14Circuits for erasing electrically, e.g. erase voltage switching circuits
    • G11C16/16Circuits for erasing electrically, e.g. erase voltage switching circuits for erasing blocks, e.g. arrays, words, groups
    • 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/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • 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]
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/26Sensing or reading circuits; Data output circuits
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/34Determination of programming status, e.g. threshold voltage, overprogramming or underprogramming, retention
    • G11C16/349Arrangements for evaluating degradation, retention or wearout, e.g. by counting erase cycles
    • G11C16/3495Circuits or methods to detect or delay wearout of nonvolatile EPROM or EEPROM memory devices, e.g. by counting numbers of erase or reprogram cycles, by using multiple memory areas serially or cyclically
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Read Only Memory (AREA)

Abstract

The embodiment of the invention provides a solid state disk erasing control method, a solid state disk erasing control device, electronic equipment and a storage medium, and relates to the technical field of computer systems and storage; when detecting that a suspension mechanism is triggered by control operation of an open flash memory block in a solid state disk, acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block; determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block; and setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism. The embodiment of the invention can improve the reliability of the open flash memory block which is not fully written at one time under high abrasion, reduce the new rate of bad data blocks and prolong the service life of the solid state disk.

Description

Solid state disk erasing control method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer systems and storage technologies, and in particular, to a solid state disk erasing control method, a solid state disk erasing control device, an electronic device, and a storage medium.
Background
With the rapid development of cloud computing, big data and other technologies, massive data are generated at any moment in a business system and need to be processed and stored, namely a large number of data assets circulate at a high speed in the business system. The high-speed development of information technology places higher demands on the performance of storage systems. Compared with the traditional magnetic disk, the solid state memory (SSD) is widely adopted due to the fast reading and writing speed and low energy consumption. However, compared with the traditional magnetic disk, the solid state disk has higher cost, so that the capacity of the product is limited, and the service life of the solid state disk is short.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention are provided to provide a solid state disk erasing control method, a solid state disk erasing control device, an electronic device, and a storage medium that overcome or at least partially solve the foregoing problems.
In a first aspect of the present invention, an embodiment of the present invention discloses a method for controlling erasing and writing of a solid state disk, including:
when detecting that a suspension mechanism is triggered by control operation of an open flash memory block in a solid state disk, acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block;
Determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
and setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism.
Optionally, the step of determining the control parameter of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block includes:
when the erasing times of the solid state disk are in a first erasing interval, determining an execution mode of the suspension mechanism as a first mode;
when the erasing times of the solid state disk are in a second erasing interval and the suspension times of the open flash memory block are not more than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a second mode;
when the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are larger than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a third mode;
wherein the maximum value of the first erasing section, the maximum value of the second erasing section and the maximum value of the third erasing section are increased.
Optionally, when the number of times of erasing of the solid state disk is in the first erasing interval, the step of determining that the execution mode of the suspension mechanism is the first mode includes:
when the erasing times of the solid state disk are in the first erasing interval, acquiring the current control parameters of the suspension mechanism;
the current control parameter is configured to the first mode.
Optionally, when the number of times of erasing the solid state hard disk is in the second erasing interval and the number of times of suspending the open flash memory block is not greater than a preset trigger threshold, the step of determining that the execution mode of the suspending mechanism is the second mode includes:
when the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold, acquiring the current control parameters and control coefficients of the suspension mechanism;
determining configuration control parameters according to the current control parameters and the control coefficients;
and configuring the configuration control parameters into the second mode.
Optionally, the current control parameter includes a current read-write proportional threshold value; the control coefficient includes a threshold parameter, and the step of determining the configuration control parameter according to the current control parameter and the control coefficient includes:
Generating an updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter;
determining the updated read-write proportional threshold value as the configuration control parameter;
wherein the threshold parameter is greater than zero and less than one.
Optionally, the step of generating the updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter includes:
and determining the product of the read-write proportional threshold value and the threshold parameter as the updated read-write proportional threshold value.
Optionally, the current control parameter includes a first duration, where the first duration is an interval duration from start of erasing to first suspension; the control coefficient includes a first time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
generating updated first duration according to the first duration and the first time parameter;
determining the updated first duration as the configuration control parameter;
wherein the first time parameter is greater than one.
Optionally, the step of generating the updated first duration according to the first duration and the first time parameter includes:
And determining the updated first duration by multiplying the first duration by the first time parameter.
Optionally, the current control parameter includes a second duration, where the second duration is an interval duration from when the recording is completed to when the recording is suspended; the control coefficient comprises a second time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
generating updated second duration according to the second duration and the second time parameter;
determining the updated second duration as the configuration control parameter;
wherein the second time parameter is greater than one.
Optionally, the step of generating the updated second duration according to the second duration and the second time parameter includes:
and determining the updated second duration by multiplying the second duration by the second time parameter.
Optionally, when the erasing times of the solid state hard disk are in the second erasing interval and the suspension times of the open flash memory block are not greater than a preset trigger threshold, the method further includes:
and recording the trigger times of the suspension mechanism of the open flash memory block.
Optionally, when the number of times of erasing the solid state hard disk is in a third erasing interval or the number of times of suspending the open flash memory block is greater than a preset trigger threshold, the step of determining that the execution mode of the suspension mechanism is a third mode includes:
And when the erasing times of the solid state disk are in the third erasing interval or the suspension times of the open flash memory block are larger than the preset trigger threshold, configuring a preset forbidden parameter into the third mode.
Optionally, when the erasing times of the solid state hard disk are in a third erasing interval or the suspension times of the open flash memory block are greater than a preset trigger threshold, the method further includes:
and marking the open flash memory block.
Optionally, a register is provided in the solid state disk, and the register is used for recording the erasing times of the solid state disk and the suspension times of the open flash memory block; the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block comprises the following steps:
and reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the register.
Optionally, the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block includes:
and reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the operation stack of the solid state disk.
Optionally, the control operation is a read operation.
Optionally, the method further comprises:
judging whether the read operation triggers the suspension mechanism or not in the process of executing erasing;
when the read operation triggers the suspension mechanism, executing the step of acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block when the suspension mechanism is triggered by the detection of the control operation of the open flash memory block in the solid state disk;
and when the read operation does not trigger the suspension mechanism, continuing to execute the erasing process.
In a second aspect of the embodiment of the present invention, the embodiment of the present invention discloses a solid state disk erasing control device, including:
the device comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring the erasing times of the solid-state disk and the suspension times of the open flash memory block when detecting that the suspension mechanism is triggered by the control operation of the open flash memory block in the solid-state disk;
the execution mode determining module is used for determining the execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
the setting module is used for setting the suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism.
In a third aspect of the present invention, an embodiment of the present invention discloses an electronic device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor, where the computer program when executed by the processor implements the steps of the solid state disk erasing control method as described above.
In a fourth aspect of the present invention, embodiments of the present invention disclose a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the solid state disk erasure control method as described above.
The embodiment of the invention has the following advantages:
according to the embodiment of the invention, when a suspension mechanism is triggered by detecting the control operation of the open flash memory block in the solid state disk, the erasing times of the solid state disk and the suspension times of the open flash memory block are obtained; determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block; and setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism. The execution mode of the suspension mechanism is dynamically adjusted according to the erasing times of the solid-state disk and the suspension times of the open flash memory blocks, so that the open flash memory blocks in different wear states perform different operations, the bad block rate of the data blocks is reduced, and the service life of the solid-state disk is prolonged.
Drawings
FIG. 1 is a flowchart illustrating steps of an embodiment of a method for controlling erasing and writing of a solid state disk according to the present invention;
FIG. 2 is a diagram showing an exemplary structure of a double-layer floating gate MOS transistor according to the present invention;
FIG. 3 is a schematic diagram of a write operation;
FIG. 4 is a schematic diagram of an erase operation;
FIG. 5 is a flowchart illustrating steps of another embodiment of a method for controlling erasing and writing of a solid state disk according to the present invention;
FIG. 6 is a flowchart illustrating exemplary steps of a method for controlling erasing and writing of a solid state disk according to the present invention;
FIG. 7 is a block diagram illustrating an embodiment of a solid state drive erasure control apparatus according to the present invention;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present invention;
fig. 9 is a block diagram of a storage medium according to an embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a step flow chart of an embodiment of a solid state disk erasing control method of the present invention is shown, where the solid state disk erasing control method specifically includes the following steps:
step 101, when detecting that a suspension mechanism is triggered by a control operation for an open flash memory block in a solid state disk, acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block;
In the embodiment of the invention, three types of control operations are performed on the solid state disk, namely, read (program) erase (erase). The object of read is a page, the object of program is a word line (word line), and the object of erase is a block of data (block), one block is composed of a plurality of word lines, and one word line is composed of a plurality of pages (TLC NAND is 3). The NAND types commonly used in the market at present are floating gate type (FG) NAND and charge trap type (CT) NAND, and for example, the FG type NAND is taken as an example, the NAND basic memory cell (cell) is a double-layer floating gate MOS transistor of NMOS (N-type metal-oxide-semiconductor) type, and the illustration of the double-layer floating gate MOS transistor can be referred to fig. 2. The 1 cell is a source electrode, a drain electrode and a control gate electrode on a substrate, and an oxide layer, a floating gate layer and a tunnel oxide layer are sequentially arranged between the control gate electrode and the source electrode and between the control gate electrode and the drain electrode. Referring to fig. 3, for 1 cell, a positive voltage is applied to the control electrode to cause electrons to enter the floating gate through the insulating layer. Referring to fig. 4, the erase operation is reversed by applying a positive voltage to the substrate to pull electrons out of the floating gate. A certain number of cells are arranged in series and parallel to form an operation flash memory block (block), and read, write and erase processing can be performed on the cells in batches through different circuit operations. NAND implements read-write erase by varying the voltages at the gate, source, and drain of the cell semiconductor structure to varying degrees to affect how much charge is stored in the floating gate or CT insulator.
When detecting that the control operation for the open flash memory block in the solid state disk triggers a suspension mechanism, acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block. The erasing times of the solid state disk can be P/E times of the solid state disk, and the solid state disk is completely erased once, namely 1P/E.
The Open flash Block refers to a Block which is not fully written to the last WL after being erased, and is called an Open Block, i.e. an Open flash Block. The characteristics of the open flash memory block are that the last written WL (injected charge) generates an electric field due to the WL (not injected charge) adjacent to the next, so that the actual threshold voltage is not identical to the threshold voltage used in the read operation, and the read data is in error.
The number of times of suspension of the open flash block, i.e., the number of times the current control operation of the open flash block is suspended under the suspension mechanism. The suspension mechanism is a suspend mechanism; the handling of the suspension mechanism is as follows:
the read object is a page, the program object is a word line, the erase object is a block, the block is composed of a plurality of word lines, and the word line is composed of a plurality of pages. The time spent by the read, write and erase commands is therefore incremental and differs significantly (TLC read about 60us, write about 2ms, erase 10 ms). The same flash memory block is read, written and erased, the number of NAND processing read, write and erase commands is also reduced, and PE operation is far less than read operation. In NDND, three basic operation requests HOST read, write, and erase of the SSD are prioritized, with HOST read being prioritized over write and erase. If a HOST read request is received during PE, the normal execution of the operation is suspended (suspend), and the read request message is processed preferentially, and when the read operation is completed, the suspended operation is resumed. When the PE operates resume, the suspend mechanism can be triggered again until the HOST read request is not received or the read-write proportion threshold is reached before the PE operation is completed, the firmware can limit the time interval from the PE starting time to the first suspend, the time interval from resume to the next suspend, and the time when the program finishes entering the suspend state, so that the normal reception of some control instructions by the suspend operation according to the time sequence provided by the NAND manufacturer is ensured.
Step 102, determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
after the erasing times of the solid-state hard disk and the suspension times of the open flash memory blocks are obtained, the abrasion degree of the open flash memory blocks can be determined based on the erasing times of the solid-state hard disk and/or the suspension times of the open flash memory blocks, and different execution modes aiming at suspension mechanisms are determined based on the abrasion degree, so that the execution of the suspension mechanism can be matched with the abrasion degree of the open flash memory blocks.
And 103, setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism.
And setting a suspension mechanism of the solid state disk according to the determined execution mode, modifying the suspension mechanism to form control processes of different suspension mechanisms, and performing erasure control through the suspension mechanism so as to reduce the wear speed of the open flash memory block.
According to the embodiment of the invention, when a suspension mechanism is triggered by detecting the control operation of the open flash memory block in the solid state disk, the erasing times of the solid state disk and the suspension times of the open flash memory block are obtained; determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block; and setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism. The execution mode of the suspension mechanism is dynamically adjusted according to the erasing times of the solid-state disk and the suspension times of the open flash memory blocks, so that the open flash memory blocks in different wear states perform different operations, the bad block rate of the data blocks is reduced, and the service life of the solid-state disk is prolonged.
Referring to fig. 5, a step flowchart of another embodiment of a solid state disk erasing control method according to the present invention is shown, where in the solid state disk erasing control method, a control operation for an open flash memory block in a solid state disk is a read operation, and the solid state disk erasing control method specifically may include the following steps:
step 501, in the process of executing erasing, judging whether the read operation triggers the suspension mechanism;
in the process of executing erasing and writing on the solid state disk, when a read operation is executed and a suspension mechanism check point is reached, judging whether the read operation triggers the suspension mechanism or not.
Step 502, when the read operation triggers the suspension mechanism, executing a step of acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block when detecting that the control operation for the open flash memory block in the solid state disk triggers the suspension mechanism;
and when the suspension mechanism is triggered by the open flash memory block in the solid state disk, the erasing times and the suspension times of the open flash memory block of the solid state disk are obtained.
Specifically, there are various ways to obtain the erasing times of the solid state disk and the suspension times of the open flash memory block, which are not particularly limited in the present invention.
In an optional example of the present invention, a register is provided in the solid state disk, where the register is used to record the erasing times of the solid state disk and the suspension times of the open flash memory block; the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block comprises the following steps:
and step S5021, reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the register.
In the embodiment of the invention, the idle registers which are not configured for use exist in the solid state disk, and the erasing times of the solid state disk and the suspension times of the open flash memory block can be recorded and stored by utilizing the idle registers.
When the erasing times of the solid state disk and the suspension times of the open flash memory block need to be obtained, the erasing times of the solid state disk and the suspension times of the open flash memory block stored in the register can be read.
In an optional example of the present invention, the step of obtaining the erasing times of the solid state hard disk and the suspension times of the open flash memory block includes:
and step S5022, reading the erasing times of the solid state disk and the suspension times of the open flash memory block from an operation stack of the solid state disk.
In the embodiment of the invention, the operation stack of the solid state disk is stored for the operation of the solid state disk, and when the erasing times of the solid state disk and the suspension times of the open flash memory block are required to be obtained, the erasing times of the solid state disk and the suspension times of the open flash memory block can be read from the operation stack of the solid state disk.
Step 503, determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
and determining the wear state of the open flash memory block according to at least one of the erasing times of the solid state disk and the suspension times of the open flash memory block after obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block, thereby determining the execution mode aiming at the suspension mechanism.
In an optional embodiment of the present invention, the step of determining the control parameter of the suspension mechanism according to the number of times of erasing the solid state hard disk and/or the number of times of suspension of the open flash memory block includes:
sub-step S5031, when the number of erasing times of the solid state disk is in the first erasing interval, determining that the execution mode of the suspension mechanism is the first mode;
Step S5032, when the erasing times of the solid state disk are in a second erasing interval and the suspension times of the open flash memory block are not more than a preset trigger threshold, determining that the execution mode of the suspension mechanism is a second mode;
in sub-step S5033, when the number of erasing times of the solid state disk is in a third erasing interval or the number of suspension times of the open flash memory block is greater than a preset trigger threshold, determining that the execution mode of the suspension mechanism is a third mode;
wherein the maximum value of the first erasing section, the maximum value of the second erasing section and the maximum value of the third erasing section are increased.
In the embodiment of the invention, the erasing times of the solid state disk can be divided into three corresponding non-passing erasing intervals: the first erasing zone, the second erasing zone and the third erasing zone. The maximum value of the first erasing zone, the maximum value of the second erasing zone and the maximum value of the third erasing zone are increased, namely the larger the corresponding numerical ranges of the first erasing zone, the second erasing zone and the third erasing zone are, the more the erasing times are, and the higher the abrasion degree of the corresponding solid state disk is. The number of times of suspending the open flash memory block can be preset to trigger a threshold value to divide the abrasion degree.
When the erasing times of the solid state disk are in the first erasing interval, the abrasion degree of the solid state disk is lower, and the execution mode of the suspension mechanism is determined to be a first mode
When the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory blocks are not more than a preset trigger threshold value, the abrasion degree of the solid state disk is higher, and the open flash memory blocks of the solid state disk are required to be protected to a certain extent; determining that the execution mode of the suspension mechanism is a second mode;
when the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are larger than a preset trigger threshold, the abrasion degree of the solid state disk is very high, the open flash memory block of the solid state disk is required to be highly protected, and the execution mode of the suspension mechanism is determined to be a third mode.
Further, when the number of times of erasing of the solid state disk is in the first erasing interval, the step of determining that the execution mode of the suspension mechanism is the first mode includes:
step S50311, when the erasing times of the solid state disk is in the first erasing interval, acquiring the current control parameter of the suspension mechanism;
Substep S50312, configuring the current control parameter to the first mode.
When the erasing times of the solid state disk are in the first erasing interval, the current control parameters of the suspension mechanism can be obtained, the current control parameters are configured into a first mode, the suspension mechanism is kept unchanged, and service data are processed with good performance.
Further, when the number of times of erasing the solid state disk is in the second erasing interval and the number of times of suspending the open flash memory block is not greater than a preset trigger threshold, the step of determining that the execution mode of the suspending mechanism is the second mode includes:
step S50321, when the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold, acquiring the current control parameters and control coefficients of the suspension mechanism;
in the embodiment of the invention, when the erasing times of the solid state disk is in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold, the current control parameters of the suspension mechanism and the control coefficients of the suspension mechanism in the high abrasion state are obtained. The control coefficient can be set according to the type of the solid state disk, manufacturer and other information, and the specific numerical value is not limited.
A substep S50322, determining a configuration control parameter according to the current control parameter and the control coefficient;
and determining configuration control parameters according to the current control parameters and the control coefficients so as to adjust the suspension mechanism in a state of high abrasion of the open flash memory block.
In an optional embodiment of the present invention, the current control parameter includes a current read-write ratio threshold value; the control coefficient includes a threshold parameter, and the step of determining the configuration control parameter according to the current control parameter and the control coefficient includes: generating an updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter; determining the updated read-write proportional threshold value as the configuration control parameter; wherein the threshold parameter is greater than zero and less than one.
In the embodiment of the invention, the current control parameter comprises a current read-write proportional threshold value; the control coefficient includes a threshold parameter, the threshold parameter being greater than zero and less than one. And calculating an updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter, wherein the updated read-write proportional threshold value is used for updating the current read-write proportional threshold value of the suspension mechanism. And determining the updating read-write proportional threshold value as a configuration control parameter so as to update the suspension mechanism.
Further, for generating the updated read-write proportional threshold value, the product of the read-write proportional threshold value and the threshold parameter may be determined as the updated read-write proportional threshold value. Since the threshold parameter is greater than zero and less than one, when the updated read-write proportional threshold value is not a non-zero positive integer, the updated read-write proportional threshold value may be modified to a non-zero positive integer by rounding up, rounding down, or rounding down.
In an optional embodiment of the present invention, the current control parameter includes a first duration, where the first duration is an interval duration from start of erasing to first suspension; the control coefficient includes a first time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps: generating updated first duration according to the first duration and the first time parameter; determining the updated first duration as the configuration control parameter; wherein the first time parameter is greater than one.
In the embodiment of the present invention, the current control parameter includes an interval duration from the start of erasing to the first suspension, i.e., a first duration, and the control coefficient includes a first time parameter, where the first time parameter is greater than one. Generating updated first duration according to the first duration and the first time parameter; the updated first time period is used to update the first time period of the suspension mechanism. And determining the updated first time length as a configuration control parameter, and updating the suspension mechanism.
Further, for generation of the updated first time period, a product of the first time period and the first time parameter may be determined.
In an optional embodiment of the present invention, the current control parameter includes a second duration, where the second duration is an interval duration from when the recording is completed to when the recording is suspended; the control coefficient comprises a second time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps: generating updated second duration according to the second duration and the second time parameter; determining the updated second duration as the configuration control parameter; wherein the second time parameter is greater than one.
In the embodiment of the present invention, the current control parameter includes an interval duration from completion of recording to entering suspension, i.e., a second duration, and the control coefficient includes a second time parameter, where the second time parameter is greater than one. Generating updated second duration according to the second duration and the second time parameter; the updated second time period is used to update the second time period of the suspension mechanism. And determining the updated second duration as a configuration control parameter, and updating the suspension mechanism.
Further, for the generation of the updated second time period, the product of the second time period and the second time parameter may be determined.
In addition, when the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not greater than a preset trigger threshold, the method further includes:
step S1, recording the trigger times of the suspension mechanism of the open flash memory block.
When the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold, the suspension mechanism trigger times of the open flash memory block are recorded, and finer monitoring and detection are carried out on the open flash memory block.
Substep S50323, configuring the configuration control parameter to the second mode.
And then the configuration control parameters are configured into the suspending mechanism, and the suspending mechanism is updated to be configured into a second mode.
Further, when the number of times of erasing the solid state disk is in a third erasing interval or the number of times of suspending the open flash memory block is greater than a preset trigger threshold, the step of determining that the execution mode of the suspending mechanism is a third mode includes:
In sub-step S50331, when the number of erasing times of the solid state disk is in the third erasing interval or the number of suspension times of the open flash block is greater than the preset trigger threshold, a preset disabling parameter is configured to be in the third mode.
When the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are larger than a preset trigger threshold, the open flash memory block is indicated to reach a very high abrasion state, and at the moment, a preset disabling parameter is configured into a third mode so as to disable the suspension mechanism.
In addition, when the erasing times of the solid state disk is in a third erasing interval or the suspension times of the open flash memory block are greater than a preset trigger threshold, the method further includes:
and S2, marking the open flash memory block.
When the suspension mechanism of the open flash block needs to be disabled, the open flash block may be marked, so that the suspension mechanism is directly disabled when the open flash block performs the erasing process next time through the mark.
And step 504, setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism.
After the execution mode is obtained, the suspension mechanism of the solid state disk is set by adopting the execution mode, the suspension mechanism is updated, and the current erasing and writing process is controlled by adopting the set suspension mechanism.
And 505, continuing to execute the erasing process when the read operation does not trigger the suspension mechanism.
And when the read operation does not trigger the suspension mechanism, continuing to execute the erasing and writing process, and operating the solid state disk.
In the embodiment of the invention, whether the read operation triggers the suspension mechanism is judged in the process of executing the erasing and writing, and when the read operation triggers the suspension mechanism and the control operation for the open flash memory block in the solid state disk triggers the suspension mechanism, the erasing and writing times of the solid state disk and the suspension times of the open flash memory block are obtained; determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block; setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism; and when the read operation does not trigger the suspension mechanism, continuing to execute the erasing process. The execution mode of the suspension mechanism is dynamically adjusted through the erasing times of the solid-state disk and the suspension times of the open flash memory blocks, so that the open flash memory blocks in different wear states perform different operations, the bad block rate of the data blocks is reduced, and the service life of the solid-state disk is prolonged.
In order to enable those skilled in the art to better understand the embodiments of the present invention, referring to fig. 6, the following describes the embodiments of the present invention by way of an example:
when erasing is executed, P/E value and suspend times of the open flash memory block are compared and judged before suspend stage is entered, and different suspend flows are used according to the judging result. Specifically:
if P/E.ltoreq.N adopts the suspend type A (first mode)
The suspend type A is the original firmware suspend flow, the threshold valueTime parameter->(first time length),(second duration) remains unchanged.
If N < P/E.ltoreq.M and if suspend cnt.ltoreq.P adopts suspend type B (second mode), and record the number of times the Block triggers suspend.
The suspend type B is a threshold valueReduced, time parameter->、/>And (3) increasing.
The parameters are corresponding control parameters, which are set according to different types and manufacturers using NAND, and are set in (N, M]According to the actual test structure, subdividing cells to use different +.>Parameters. Time parameter->、/>The increase is to stabilize the inter-cell electric field by prolonging the voltage adjustment time
If P/E > M or suspend cnt > P, the block is marked so that it cannot trigger the suspend mechanism (third mode).
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 7, a block diagram of an embodiment of a solid state disk erasing control device according to the present invention is shown, which may specifically include the following modules:
the obtaining module 701 is configured to obtain the erasing times of the solid-state hard disk and the suspension times of the open flash memory block when detecting that a suspension mechanism is triggered by a control operation for the open flash memory block in the solid-state hard disk;
the execution mode determining module 702 is configured to determine an execution mode of the suspension mechanism according to the number of times of erasing the solid state disk and/or the number of times of suspension of the open flash memory block;
the setting module 703 is configured to set a suspension mechanism of the solid state disk according to the execution mode, and perform erasure control through the set suspension mechanism.
In an alternative embodiment of the present invention, the execution mode determining module 702 includes:
the first mode submodule is used for determining that the execution mode of the suspension mechanism is a first mode when the erasing times of the solid state disk are in a first erasing interval;
the second mode submodule is used for determining that the execution mode of the suspension mechanism is a second mode when the erasing times of the solid-state hard disk are in a second erasing interval and the suspension times of the open flash memory block are not more than a preset trigger threshold;
the third mode sub-module is configured to determine that an execution mode of the suspension mechanism is a third mode when the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are greater than a preset trigger threshold;
wherein the maximum value of the first erasing section, the maximum value of the second erasing section and the maximum value of the third erasing section are increased.
In an alternative embodiment of the present invention, the first mode submodule includes:
the first acquisition unit is used for acquiring the current control parameters of the suspension mechanism when the erasing times of the solid state disk are in the first erasing interval;
And the first configuration unit is used for configuring the current control parameter into the first mode.
In an alternative embodiment of the present invention, the second mode submodule includes:
the second obtaining unit is used for obtaining the current control parameters and control coefficients of the suspension mechanism when the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold;
the parameter determining unit is used for determining configuration control parameters according to the current control parameters and the control coefficients;
and the second configuration unit is used for configuring the configuration control parameters into the second mode.
In an optional embodiment of the present invention, the current control parameter includes a current read-write ratio threshold value; the control coefficient includes a threshold parameter, and the parameter determination unit includes:
a threshold determining subunit, configured to generate an updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter;
the threshold updating subunit determines the updating read-write proportional threshold value as the configuration control parameter;
wherein the threshold parameter is greater than zero and less than one.
In an alternative embodiment of the invention, the threshold determining subunit comprises:
And the first product subunit is used for determining the product of the read-write proportional threshold value and the threshold parameter as the updated read-write proportional threshold value.
In an optional embodiment of the present invention, the current control parameter includes a first duration, where the first duration is an interval duration from start of erasing to first suspension; the parameter determination unit includes:
a first time length determining subunit, configured to generate an updated first time length according to the first time length and the first time parameter;
a first time length updating subunit, configured to determine the updated first time length as the configuration control parameter;
wherein the first time parameter is greater than one.
In an alternative embodiment of the present invention, the first time length determination subunit includes:
and a second product subunit, configured to determine the updated first duration by multiplying the first duration by the first time parameter.
In an optional embodiment of the present invention, the current control parameter includes a second duration, where the second duration is an interval duration from when the recording is completed to when the recording is suspended; the parameter determination unit includes:
a second duration determining subunit, configured to generate an updated second duration according to the second duration and the second time parameter;
A second duration updating subunit, configured to determine the updated second duration as the configuration control parameter;
wherein the second time parameter is greater than one.
In an alternative embodiment of the present invention, the second duration determination subunit includes:
a third product subunit, configured to determine the updated second duration by multiplying the second duration by the second time parameter.
In an alternative embodiment of the invention, the apparatus further comprises:
and the recording module is used for recording the trigger times of the suspension mechanism of the open flash memory block.
In an alternative embodiment of the present invention, the third mode submodule includes:
and the third configuration unit is used for configuring a preset forbidden parameter into the third mode when the erasing times of the solid state disk are in the third erasing interval or the suspension times of the open flash memory block are larger than the preset trigger threshold.
In an alternative embodiment of the invention, the apparatus further comprises:
and the marking module is used for marking the open flash memory block.
In an optional embodiment of the present invention, a register is provided in the solid state disk, where the register is configured to record the erasing times of the solid state disk and the suspension times of the open flash memory block; the acquisition module 701 includes:
And the first reading submodule is used for reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the register.
In an alternative embodiment of the present invention, the obtaining module 701 includes:
and the second reading submodule is used for reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the operation stack of the solid state disk.
In an alternative embodiment of the invention, the control operation is a read operation.
In an alternative embodiment of the invention, the apparatus further comprises:
the judging module is used for judging whether the read operation triggers the suspension mechanism or not in the process of executing erasing;
the first execution module is used for executing the step of acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block when the suspension mechanism is triggered by the read operation and the control operation of the open flash memory block in the solid state disk is detected;
and the second execution module is used for continuing to execute the erasing process when the read operation does not trigger the suspension mechanism.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Referring to fig. 8, an embodiment of the present invention further provides an electronic device, including:
a processor 801 and a storage medium 802, wherein the storage medium 802 stores a computer program executable by the processor 801, and when the electronic device is running, the processor 801 executes the computer program to execute the solid state disk erasing control method according to any one of the embodiments of the present invention. The solid state disk erasing control method comprises the following steps:
when detecting that a suspension mechanism is triggered by control operation of an open flash memory block in a solid state disk, acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block;
determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
and setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism.
Optionally, the step of determining the control parameter of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block includes:
when the erasing times of the solid state disk are in a first erasing interval, determining an execution mode of the suspension mechanism as a first mode;
When the erasing times of the solid state disk are in a second erasing interval and the suspension times of the open flash memory block are not more than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a second mode;
when the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are larger than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a third mode;
wherein the maximum value of the first erasing section, the maximum value of the second erasing section and the maximum value of the third erasing section are increased.
Optionally, when the number of times of erasing of the solid state disk is in the first erasing interval, the step of determining that the execution mode of the suspension mechanism is the first mode includes:
when the erasing times of the solid state disk are in the first erasing interval, acquiring the current control parameters of the suspension mechanism;
the current control parameter is configured to the first mode.
Optionally, when the number of times of erasing the solid state hard disk is in the second erasing interval and the number of times of suspending the open flash memory block is not greater than a preset trigger threshold, the step of determining that the execution mode of the suspending mechanism is the second mode includes:
When the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold, acquiring the current control parameters and control coefficients of the suspension mechanism;
determining configuration control parameters according to the current control parameters and the control coefficients;
and configuring the configuration control parameters into the second mode.
Optionally, the current control parameter includes a current read-write proportional threshold value; the control coefficient includes a threshold parameter, and the step of determining the configuration control parameter according to the current control parameter and the control coefficient includes:
generating an updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter;
determining the updated read-write proportional threshold value as the configuration control parameter;
wherein the threshold parameter is greater than zero and less than one.
Optionally, the step of generating the updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter includes:
and determining the product of the read-write proportional threshold value and the threshold parameter as the updated read-write proportional threshold value.
Optionally, the current control parameter includes a first duration, where the first duration is an interval duration from start of erasing to first suspension; the control coefficient includes a first time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
Generating updated first duration according to the first duration and the first time parameter;
determining the updated first duration as the configuration control parameter;
wherein the first time parameter is greater than one.
Optionally, the step of generating the updated first duration according to the first duration and the first time parameter includes:
and determining the updated first duration by multiplying the first duration by the first time parameter.
Optionally, the current control parameter includes a second duration, where the second duration is an interval duration from when the recording is completed to when the recording is suspended; the control coefficient comprises a second time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
generating updated second duration according to the second duration and the second time parameter;
determining the updated second duration as the configuration control parameter;
wherein the second time parameter is greater than one.
Optionally, the step of generating the updated second duration according to the second duration and the second time parameter includes:
and determining the updated second duration by multiplying the second duration by the second time parameter.
Optionally, when the erasing times of the solid state hard disk are in the second erasing interval and the suspension times of the open flash memory block are not greater than a preset trigger threshold, the method further includes:
and recording the trigger times of the suspension mechanism of the open flash memory block.
Optionally, when the number of times of erasing the solid state hard disk is in a third erasing interval or the number of times of suspending the open flash memory block is greater than a preset trigger threshold, the step of determining that the execution mode of the suspension mechanism is a third mode includes:
and when the erasing times of the solid state disk are in the third erasing interval or the suspension times of the open flash memory block are larger than the preset trigger threshold, configuring a preset forbidden parameter into the third mode.
Optionally, when the erasing times of the solid state hard disk are in a third erasing interval or the suspension times of the open flash memory block are greater than a preset trigger threshold, the method further includes:
and marking the open flash memory block.
Optionally, a register is provided in the solid state disk, and the register is used for recording the erasing times of the solid state disk and the suspension times of the open flash memory block; the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block comprises the following steps:
And reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the register.
Optionally, the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block includes:
and reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the operation stack of the solid state disk.
Optionally, the control operation is a read operation.
Optionally, the method further comprises:
judging whether the read operation triggers the suspension mechanism or not in the process of executing erasing;
when the read operation triggers the suspension mechanism, executing the step of acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block when the suspension mechanism is triggered by the detection of the control operation of the open flash memory block in the solid state disk;
and when the read operation does not trigger the suspension mechanism, continuing to execute the erasing process.
The memory may include a random access memory (Random Access Memory, abbreviated as RAM) or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
Referring to fig. 9, an embodiment of the present invention further provides a computer readable storage medium 901, where the storage medium 901 stores a computer program, and when the computer program is executed by a processor, the method for controlling erasing and writing of a solid state disk according to any one of the embodiments of the present invention is executed. The solid state disk erasing control method comprises the following steps:
when detecting that a suspension mechanism is triggered by control operation of an open flash memory block in a solid state disk, acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block;
determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
And setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism.
Optionally, the step of determining the control parameter of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block includes:
when the erasing times of the solid state disk are in a first erasing interval, determining an execution mode of the suspension mechanism as a first mode;
when the erasing times of the solid state disk are in a second erasing interval and the suspension times of the open flash memory block are not more than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a second mode;
when the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are larger than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a third mode;
wherein the maximum value of the first erasing section, the maximum value of the second erasing section and the maximum value of the third erasing section are increased.
Optionally, when the number of times of erasing of the solid state disk is in the first erasing interval, the step of determining that the execution mode of the suspension mechanism is the first mode includes:
When the erasing times of the solid state disk are in the first erasing interval, acquiring the current control parameters of the suspension mechanism;
the current control parameter is configured to the first mode.
Optionally, when the number of times of erasing the solid state hard disk is in the second erasing interval and the number of times of suspending the open flash memory block is not greater than a preset trigger threshold, the step of determining that the execution mode of the suspending mechanism is the second mode includes:
when the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold, acquiring the current control parameters and control coefficients of the suspension mechanism;
determining configuration control parameters according to the current control parameters and the control coefficients;
and configuring the configuration control parameters into the second mode.
Optionally, the current control parameter includes a current read-write proportional threshold value; the control coefficient includes a threshold parameter, and the step of determining the configuration control parameter according to the current control parameter and the control coefficient includes:
generating an updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter;
Determining the updated read-write proportional threshold value as the configuration control parameter;
wherein the threshold parameter is greater than zero and less than one.
Optionally, the step of generating the updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter includes:
and determining the product of the read-write proportional threshold value and the threshold parameter as the updated read-write proportional threshold value.
Optionally, the current control parameter includes a first duration, where the first duration is an interval duration from start of erasing to first suspension; the control coefficient includes a first time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
generating updated first duration according to the first duration and the first time parameter;
determining the updated first duration as the configuration control parameter;
wherein the first time parameter is greater than one.
Optionally, the step of generating the updated first duration according to the first duration and the first time parameter includes:
and determining the updated first duration by multiplying the first duration by the first time parameter.
Optionally, the current control parameter includes a second duration, where the second duration is an interval duration from when the recording is completed to when the recording is suspended; the control coefficient comprises a second time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
generating updated second duration according to the second duration and the second time parameter;
determining the updated second duration as the configuration control parameter;
wherein the second time parameter is greater than one.
Optionally, the step of generating the updated second duration according to the second duration and the second time parameter includes:
and determining the updated second duration by multiplying the second duration by the second time parameter.
Optionally, when the erasing times of the solid state hard disk are in the second erasing interval and the suspension times of the open flash memory block are not greater than a preset trigger threshold, the method further includes:
and recording the trigger times of the suspension mechanism of the open flash memory block.
Optionally, when the number of times of erasing the solid state hard disk is in a third erasing interval or the number of times of suspending the open flash memory block is greater than a preset trigger threshold, the step of determining that the execution mode of the suspension mechanism is a third mode includes:
And when the erasing times of the solid state disk are in the third erasing interval or the suspension times of the open flash memory block are larger than the preset trigger threshold, configuring a preset forbidden parameter into the third mode.
Optionally, when the erasing times of the solid state hard disk are in a third erasing interval or the suspension times of the open flash memory block are greater than a preset trigger threshold, the method further includes:
and marking the open flash memory block.
Optionally, a register is provided in the solid state disk, and the register is used for recording the erasing times of the solid state disk and the suspension times of the open flash memory block; the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block comprises the following steps:
and reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the register.
Optionally, the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block includes:
and reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the operation stack of the solid state disk.
Optionally, the control operation is a read operation.
Optionally, the method further comprises:
judging whether the read operation triggers the suspension mechanism or not in the process of executing erasing;
when the read operation triggers the suspension mechanism, executing the step of acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block when the suspension mechanism is triggered by the detection of the control operation of the open flash memory block in the solid state disk;
and when the read operation does not trigger the suspension mechanism, continuing to execute the erasing process.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The method, the device, the electronic equipment and the storage medium for controlling the erasing of the solid state disk provided by the invention are described in detail, and specific examples are applied to the description of the principle and the implementation mode of the invention, and the description of the above examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (19)

1. The solid state disk erasing control method is characterized by comprising the following steps:
when detecting that a suspension mechanism is triggered by control operation of an open flash memory block in a solid state disk, acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block;
determining an execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism;
wherein, the step of determining the control parameter of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block includes: when the erasing times of the solid state disk are in a first erasing interval, determining an execution mode of the suspension mechanism as a first mode; when the erasing times of the solid state disk are in a second erasing interval and the suspension times of the open flash memory block are not more than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a second mode; when the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are larger than a preset trigger threshold, determining that an execution mode of the suspension mechanism is a third mode; the maximum value of the first erasing interval, the maximum value of the second erasing interval and the maximum value of the third erasing interval are increased; the first mode is determined by the current control parameters of the suspension mechanism; the second mode is determined by the current control parameters and control coefficients of the suspension mechanism; the third mode is determined by preset disabling parameters.
2. The method of claim 1, wherein when the number of erasures of the solid state disk is within a first erasing interval, determining that the execution mode of the suspension mechanism is a first mode comprises:
when the erasing times of the solid state disk are in the first erasing interval, acquiring the current control parameters of the suspension mechanism;
the current control parameter is configured to the first mode.
3. The method of claim 1, wherein when the number of times of erasing the solid state disk is in a second erasing interval and the number of times of suspending the open flash block is not greater than a preset trigger threshold, determining that the execution mode of the suspension mechanism is a second mode comprises:
when the erasing times of the solid state disk are in the second erasing interval and the suspension times of the open flash memory block are not more than the preset trigger threshold, acquiring the current control parameters and control coefficients of the suspension mechanism;
determining configuration control parameters according to the current control parameters and the control coefficients;
and configuring the configuration control parameters into the second mode.
4. A method according to claim 3, wherein the current control parameter comprises a current read-write proportional threshold value; the control coefficient includes a threshold parameter, and the step of determining the configuration control parameter according to the current control parameter and the control coefficient includes:
Generating an updated read-write proportional threshold value according to the read-write proportional threshold value and the threshold parameter;
determining the updated read-write proportional threshold value as the configuration control parameter;
wherein the threshold parameter is greater than zero and less than one.
5. The method of claim 4, wherein the step of generating an updated read-write proportional threshold value based on the read-write proportional threshold value and the threshold parameter comprises:
and determining the product of the read-write proportional threshold value and the threshold parameter as the updated read-write proportional threshold value.
6. A method according to claim 3, wherein the current control parameter comprises a first duration, the first duration being an interval duration from a start of erasure to a first suspension; the control coefficient includes a first time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
generating updated first duration according to the first duration and the first time parameter;
determining the updated first duration as the configuration control parameter;
wherein the first time parameter is greater than one.
7. The method of claim 6, wherein the step of generating the updated first time period in accordance with the first time period and the first time parameter comprises:
And determining the updated first duration by multiplying the first duration by the first time parameter.
8. A method according to claim 3, wherein the current control parameter comprises a second duration, the second duration being an interval duration from completion of the recording to entry into suspension; the control coefficient comprises a second time parameter; the step of determining the configuration control parameter according to the current control parameter and the control coefficient comprises the following steps:
generating updated second duration according to the second duration and the second time parameter;
determining the updated second duration as the configuration control parameter;
wherein the second time parameter is greater than one.
9. The method of claim 8, wherein the step of generating an updated second time period in accordance with the second time period and the second time parameter comprises:
and determining the updated second duration by multiplying the second duration by the second time parameter.
10. The method of claim 1, wherein when the number of erasures of the solid state disk is in a second erasure interval and the number of suspension of the open flash block is not greater than a preset trigger threshold, the method further comprises:
And recording the trigger times of the suspension mechanism of the open flash memory block.
11. The method of claim 1, wherein when the number of times of erasing the solid state disk is in a third erasing interval or the number of times of suspension of the open flash block is greater than a preset trigger threshold, determining that the execution mode of the suspension mechanism is a third mode comprises:
and when the erasing times of the solid state disk are in the third erasing interval or the suspension times of the open flash memory block are larger than the preset trigger threshold, configuring a preset forbidden parameter into the third mode.
12. The method of claim 11, wherein when the number of times the solid state disk is erased is in a third erase-write interval or the number of times the open flash block is suspended is greater than a preset trigger threshold, the method further comprises:
and marking the open flash memory block.
13. The method of claim 1, wherein a register is provided in the solid state disk, the register being configured to record a number of times the solid state disk is erased and a number of times the open flash block is suspended; the step of obtaining the erasing times of the solid state disk and the suspension times of the open flash memory block comprises the following steps:
And reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the register.
14. The method of claim 1, wherein the step of obtaining the number of erasures of the solid state disk and the number of suspension of the open flash block comprises:
and reading the erasing times of the solid state disk and the suspension times of the open flash memory block from the operation stack of the solid state disk.
15. The method of claim 1, wherein the control operation is a read operation.
16. The method according to claim 1, wherein the method further comprises:
judging whether the read operation triggers the suspension mechanism or not in the process of executing the erasing and writing;
when the read operation triggers the suspension mechanism, executing the step of acquiring the erasing times of the solid state disk and the suspension times of the open flash memory block when the suspension mechanism is triggered by the detection of the control operation of the open flash memory block in the solid state disk;
and when the read operation does not trigger the suspension mechanism, continuing to execute the erasing process.
17. The solid state disk erasing control device is characterized by comprising:
The device comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring the erasing times of the solid-state disk and the suspension times of the open flash memory block when detecting that the suspension mechanism is triggered by the control operation of the open flash memory block in the solid-state disk;
the execution mode determining module is used for determining the execution mode of the suspension mechanism according to the erasing times of the solid state disk and/or the suspension times of the open flash memory block;
the setting module is used for setting a suspension mechanism of the solid state disk according to the execution mode, and performing erasure control through the set suspension mechanism;
the execution mode determination module includes:
the first mode submodule is used for determining that the execution mode of the suspension mechanism is a first mode when the erasing times of the solid state disk are in a first erasing interval;
the second mode submodule is used for determining that the execution mode of the suspension mechanism is a second mode when the erasing times of the solid-state hard disk are in a second erasing interval and the suspension times of the open flash memory block are not more than a preset trigger threshold;
the third mode sub-module is configured to determine that an execution mode of the suspension mechanism is a third mode when the erasing times of the solid state disk are in a third erasing interval or the suspension times of the open flash memory block are greater than a preset trigger threshold;
The maximum value of the first erasing interval, the maximum value of the second erasing interval and the maximum value of the third erasing interval are increased; the first mode is determined by the current control parameters of the suspension mechanism; the second mode is determined by the current control parameters and control coefficients of the suspension mechanism; the third mode is determined by preset disabling parameters.
18. An electronic device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor, implements the steps of the solid state disk erasure control method according to any of claims 1 to 16.
19. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, which when executed by a processor, implements the steps of the solid state disk erasure control method according to any of claims 1 to 16.
CN202310583822.6A 2023-05-23 2023-05-23 Solid state disk erasing control method and device, electronic equipment and storage medium Active CN116312702B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310583822.6A CN116312702B (en) 2023-05-23 2023-05-23 Solid state disk erasing control method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310583822.6A CN116312702B (en) 2023-05-23 2023-05-23 Solid state disk erasing control method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116312702A CN116312702A (en) 2023-06-23
CN116312702B true CN116312702B (en) 2023-08-15

Family

ID=86815347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310583822.6A Active CN116312702B (en) 2023-05-23 2023-05-23 Solid state disk erasing control method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116312702B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958655A (en) * 2018-06-26 2018-12-07 郑州云海信息技术有限公司 A kind of data erasing-writing method, device, equipment and the storage medium of solid state hard disk
CN109240615A (en) * 2018-08-30 2019-01-18 浪潮电子信息产业股份有限公司 Data reading method, device and equipment of solid state disk
CN109857612A (en) * 2017-11-30 2019-06-07 Tcl集团股份有限公司 A kind of monitoring method and its terminal of data write operation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857612A (en) * 2017-11-30 2019-06-07 Tcl集团股份有限公司 A kind of monitoring method and its terminal of data write operation
CN108958655A (en) * 2018-06-26 2018-12-07 郑州云海信息技术有限公司 A kind of data erasing-writing method, device, equipment and the storage medium of solid state hard disk
CN109240615A (en) * 2018-08-30 2019-01-18 浪潮电子信息产业股份有限公司 Data reading method, device and equipment of solid state disk

Also Published As

Publication number Publication date
CN116312702A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
KR101516577B1 (en) Nonvolatile semi-conductor memory device and method for calculating read voltage non-volatile semiconductor memory device
US10360987B2 (en) Managing refresh for flash memory
JP5901771B2 (en) Memory refresh method and apparatus
KR101654030B1 (en) Dynamic window to improve nand memory endurance
US9043517B1 (en) Multipass programming in buffers implemented in non-volatile data storage systems
US9437310B2 (en) Method of operating a memory system having an erase control unit
US8441861B2 (en) Self-check calibration of program or erase and verify process using memory cell distribution
US9384126B1 (en) Methods and systems to avoid false negative results in bloom filters implemented in non-volatile data storage systems
US10241678B2 (en) Data storage device and data writing method capable of avoiding repeated write operation of a TLC block when interrupted
JP2010040165A (en) Memory
KR20120030281A (en) Flash memory device and program verification method thereof
JP2009037619A (en) Memory system and reading method thereof
US9799401B2 (en) Incremental step pulse programming
US20140297924A1 (en) Nonvolatile memory erasure techniques
CN111813339B (en) Data writing method and device for Nand Flash of Flash memory, electronic equipment and storage medium
CN116312702B (en) Solid state disk erasing control method and device, electronic equipment and storage medium
CN115620760B (en) Searching method, terminal and storage medium for optimal readout threshold voltage
US11862259B2 (en) Electronic device, over-erase detection and elimination methods for memory cells
CN109243516A (en) A kind of method for deleting, device and computer readable storage medium
US11941271B2 (en) Storage devices performing secure erase and operating methods thereof
KR102496386B1 (en) Error characterization method of nand flash memory, error estimation method and storage device control method using the same
US20220084606A1 (en) Flash memory having improved performance as a consequence of program direction along a flash storage cell column
US20240201903A1 (en) Semiconductor integrated circuit, semiconductor storage device, and memory system
KR20160051331A (en) Data recovery method and nonvolatile memory system using the same
KR101611019B1 (en) Method and apparatus for controlling non-volatile memoery to prevent read error

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
GR01 Patent grant
GR01 Patent grant