CN111124285B - Solid state disk data holding method, device, equipment and medium - Google Patents

Solid state disk data holding method, device, equipment and medium Download PDF

Info

Publication number
CN111124285B
CN111124285B CN201911208772.3A CN201911208772A CN111124285B CN 111124285 B CN111124285 B CN 111124285B CN 201911208772 A CN201911208772 A CN 201911208772A CN 111124285 B CN111124285 B CN 111124285B
Authority
CN
China
Prior art keywords
time
block
information recording
target information
list
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
CN201911208772.3A
Other languages
Chinese (zh)
Other versions
CN111124285A (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 CN201911208772.3A priority Critical patent/CN111124285B/en
Publication of CN111124285A publication Critical patent/CN111124285A/en
Application granted granted Critical
Publication of CN111124285B publication Critical patent/CN111124285B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • G06F3/0649Lifecycle management
    • 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

Abstract

The application discloses a method, a device, equipment and a medium for maintaining data of a solid state disk, wherein the method comprises the following steps: setting data retention time of block in Flash; determining a target information recording table for recording block information according to the latest operation type of the block; determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list; determining a second time difference between the current time and the time represented by the time stamp; and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list. Therefore, system process resources can be saved, data holding processing is carried out on the blocks in batches, data holding processing efficiency is improved, and system performance is improved.

Description

Solid state disk data holding method, device, equipment and medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a method, an apparatus, a device, and a medium for maintaining data in a solid state disk.
Background
A storage unit of a Solid State Disk (SSD) is Flash, and a block on one Flash is likely to cause data errors during reading or writing after being opened for a period of time or closed for a long time, so generally, a solid state disk using Flash as a storage medium needs to perform certain data retention processing.
The existing data holding processing method is mainly characterized in that the continuous opening or continuous closing time length of each block is simply monitored, whether the continuous opening or continuous closing time length of each block reaches the data holding time is judged, and the block reaching the data holding time is subjected to data holding processing.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device, and a medium for holding data of a solid state disk, which can save system process resources, perform data holding processing on a block in batch, improve data holding processing efficiency, and improve system performance. The specific scheme is as follows:
in a first aspect, the present application discloses a method for holding data in a solid state disk, including:
setting data retention time of block in Flash;
determining a target information recording table for recording the block information of the block according to the latest operation type of the block;
determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier;
determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the data holding time;
and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list.
Optionally, the setting of the data retention time of the block in Flash includes:
setting the maximum opening time and the maximum closing time of the block in Flash to set the data holding time of the block.
Optionally, the determining, according to the latest operation type of the block, a target information recording table for recording block information of the block includes:
if the latest operation type is opening operation, determining an information recording table corresponding to the opening operation as a target information recording table for recording the block information of the block;
and if the latest operation type is closing operation, determining an information recording table corresponding to the closing operation as a target information recording table for recording the block information of the block.
Optionally, the determining whether the second time difference is greater than or equal to the data retention time includes:
and if the latest operation is the opening operation, judging whether the second time difference is greater than or equal to the maximum opening duration so as to judge whether the second time difference is greater than or equal to the data holding time.
Optionally, the determining whether the second time difference is greater than or equal to the data retention time includes:
and if the latest operation is the closing operation, judging whether the second time difference is greater than or equal to the maximum closing time length so as to judge whether the second time difference is greater than or equal to the data holding time.
Optionally, the performing data retention processing on all blocks corresponding to the block information recorded in the target information recording sub-list includes:
and if the second time difference is greater than or equal to the maximum opening time length, closing all blocks corresponding to the block information recorded in the target information recording sub-list.
Optionally, the performing data retention processing on all blocks corresponding to the block information recorded in the target information recording sub-list includes:
and if the second time difference is greater than or equal to the longest closing time, moving all the blocks corresponding to the block information recorded in the target information recording sub-list.
In a second aspect, the present application discloses a solid state disk data holding apparatus, including:
the time setting module is used for setting the data holding time of the block in the Flash;
the first list determining module is used for determining a target information recording list for recording the block information of the block according to the latest operation type of the block;
a second list determining module, configured to determine, according to a first time difference between a latest operation time of the block and a system start time, a target information recording sub-list actually used for recording the block information from the target information recording table, where the target information recording sub-list has a corresponding time identifier, and the first time difference is matched with the time identifier;
the information recording module is used for recording the block information in the target information recording sublist;
a time difference determining module for determining a second time difference between the current time and the time represented by the time identifier;
the judging module is used for judging whether the second time difference is larger than or equal to the data holding time or not;
and the data holding processing module is used for carrying out data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list when the second time difference is greater than or equal to the data holding time.
In a third aspect, the present application discloses a solid state disk data holding device, including:
a memory and a processor;
wherein the memory is to store a computer program;
the processor is configured to execute the computer program to implement the solid state disk data retention method disclosed above.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the solid state disk data retention method disclosed in the foregoing.
Therefore, the data retention time of the block in the Flash needs to be set firstly; determining a target information recording table for recording the block information of the block according to the latest operation type of the block; determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier; then determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the data holding time; and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list. When the second time difference is greater than or equal to the data holding time, it can be determined that all the blocks corresponding to the block information in the target information recording sub-list are subjected to data holding processing, so that system process resources are saved, data holding processing is performed on the blocks in batches, data holding processing efficiency is improved, and system performance is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only the embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a data retention method for a solid state disk disclosed in the present application;
fig. 2 is a flowchart of a specific method for holding data in a solid state disk disclosed in the present application;
FIG. 3 is a flowchart illustrating a specific method for holding data in a solid state drive according to the present disclosure;
FIG. 4 is a schematic structural diagram of a solid state disk data holding apparatus disclosed in the present application;
fig. 5 is a structural diagram of a solid state disk data holding device disclosed in the present application;
fig. 6 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
At present, a data holding processing method is mainly used for monitoring the continuous opening or continuous closing time of each block, then judging whether the continuous opening or continuous closing time of each block reaches the data holding time, and carrying out data holding processing on the blocks reaching the data holding time, so that a large number of processes are occupied in the system operation process to monitor the continuous opening or continuous closing time of each block, system process resources are caused, frequent data holding processing is caused during operation, and system performance is reduced. In view of this, the present application provides a solid state disk data processing method, which can save system process resources, perform data retention processing on blocks in batches, improve data retention processing efficiency, and improve system performance.
Referring to fig. 1, an embodiment of the present application discloses a method for holding data in a solid state disk, where the method includes:
step S11: and setting the data holding time of the block in the Flash.
In a specific real-time process, the data retention time of the block in Flash needs to be set first. Specifically, data holding time of the block needs to be set according to the actual performance of the Flash and the like so as to judge whether corresponding data holding processing needs to be performed on the block, wherein the data holding time includes a maximum opening time and a maximum closing time, the maximum opening time is the maximum time for continuously opening the block, and the maximum closing time is the maximum time for continuously closing the block.
Step S12: and determining a target information recording table for recording the block information of the block according to the latest operation type of the block.
In a specific implementation process, after the data holding time of the block in the Flash is set, a target information recording table for recording the block information of the block is determined according to the latest operation type of the block. Wherein the recent operation types include two types of on operation and off operation.
Step S13: and according to a first time difference between the latest operation time of the block and the system starting time, determining a target information recording sub-list actually used for recording the block information from the target information recording table, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier.
In this embodiment, a target information record sub-list actually used for storing the block information needs to be determined from the target information record table according to a first time difference between the latest operation time of the block and a system start time, and the block information is recorded in the target information record sub-list, where the target information record sub-list has a corresponding time identifier, and the first time difference needs to be matched with the time identifier.
In a specific implementation process, the time indicator may be a period of time interval, and the time indicated by the time indicator may be a maximum value of the time interval or an average value of the time interval. When the time indication may be a time interval, the first time difference should belong to the time interval. For example, if the time stamp corresponding to the target information sub-list is 1 to 5 seconds after the system is started, the time represented by the time stamp may be set to be the 5 th second after the system is started, and the block information with the first time difference smaller than or equal to 5 seconds is stored in the target information sub-list, that is, the block information corresponding to the block which is opened and closed within 1 to 5 seconds after the system is started is recorded in the target information sub-list.
Step S14: and determining a second time difference between the current time and the time represented by the time mark, and judging whether the second time difference is larger than or equal to the data holding time.
It will be appreciated that after recording the block information into the target information recording sub-list, a second time difference between the current time and the time represented by the time stamp needs to be determined. And when the time mark is a period of time interval and the time represented by the time mark is the maximum value of the time interval, determining the difference value between the current time and the maximum value to obtain the second time difference. For example, the current time is the 7 th second after the system is started, the time identifier corresponding to the target information recording sub-list is 1-5 seconds after the system is started, the time represented by the time identifier is the 5 th second after the system is started, and then the second time difference between the current time and the time represented by the time identifier is 2 seconds. After the second time difference is determined, it is further required to determine whether the second time difference is greater than or equal to the data retention time.
Step S15: and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list.
In a specific implementation process, if the second time difference is greater than or equal to the data holding time, performing data holding operation on all blocks corresponding to the block information in the target information recording sub-list.
Therefore, the data retention time of the block in the Flash needs to be set firstly; determining a target information recording table for recording the block information of the block according to the latest operation type of the block; determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier; then determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the data holding time; and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list. When the second time difference is greater than or equal to the data holding time, it can be determined that all the blocks corresponding to the block information in the target information recording sub-list are subjected to data holding processing, so that system process resources are saved, data holding processing is performed on the blocks in batches, data holding processing efficiency is improved, and system performance is improved.
Referring to fig. 2, an embodiment of the present application discloses a specific method for holding data of a solid state disk, where the method includes:
step S21: and setting the maximum opening time and the maximum closing time of the block in the Flash so as to set the data holding time of the block.
In this embodiment, the maximum opening time and the maximum closing time of a block in Flash need to be set to set the data holding time of the block, and the maximum opening time and the maximum closing time may be different according to an actual situation.
Step S22: and if the latest operation type of the block is opening operation, determining an information recording table corresponding to the opening operation as a target information recording table for recording the block information of the block.
In a specific implementation process, the latest operation type of the block comprises an opening operation and a closing operation, and if the latest operation of the block is the opening operation, an information recording table corresponding to the opening operation is determined as a target information recording table for recording block information of the block.
Step S23: and according to a first time difference between the latest operation time of the block and the system starting time, determining a target information recording sub-list actually used for recording the block information from the target information recording table, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier.
Step S24: and determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the maximum opening time length so as to judge whether the second time difference is greater than or equal to the data holding time.
It is understood that, when the latest operation of the block is an opening operation, after the second time difference is determined, it is required to determine whether the second time difference is greater than or equal to the maximum opening duration, so as to determine whether the second time difference is greater than or equal to the data holding time.
Step S25: and if the second time difference is greater than or equal to the maximum opening duration, closing all the blocks corresponding to the block information recorded in the target information recording sub-list.
In a specific implementation process, if the second time difference is greater than or equal to the maximum opening duration, closing all blocks corresponding to the block information recorded in the target information recording sub-list.
For example, if the maximum starting duration is 10 minutes, the time identifier corresponding to the target information recording sub-list is 1-5 minutes after the system is started, the time represented by the time identifier is 5 minutes after the system is started, and the current time is 15 minutes after the system is started, the second time difference is 10 minutes, and the second time difference is equal to the maximum starting duration, and it is necessary to close all the blocks corresponding to the block information in the target information recording sub-list.
Referring to fig. 3, an embodiment of the present application discloses a specific method for holding data of a solid state disk, where the method includes:
step S31: setting the maximum opening time and the maximum closing time of the block in Flash to set the data holding time of the block.
Step S32: and if the latest operation type is closing operation, determining an information recording table corresponding to the closing operation as a target information recording table for recording the block information of the block.
In a specific implementation process, the latest operation type of the block comprises an opening operation and a closing operation, and if the latest operation type is the closing operation, an information recording table corresponding to the closing operation is determined as a target information recording table for recording block information of the block.
Step S33: and according to a first time difference between the latest operation time of the block and the system starting time, determining a target information recording sub-list actually used for recording the block information from the target information recording table, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier.
Step S34: and determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the maximum closing time length so as to judge whether the second time difference is greater than or equal to the data holding time.
It is understood that when the latest operation of the block is a closing operation, after the second time difference is determined, it is required to determine whether the second time difference is greater than or equal to the maximum closing time length, so as to determine whether the second time difference is greater than or equal to the data holding time.
Step S35: and if the second time difference is greater than or equal to the longest closing time, moving all the blocks corresponding to the block information recorded in the target information recording sub-list.
In a specific implementation process, if the second time difference is greater than or equal to the longest closing time, moving all the blocks corresponding to the block information recorded in the target information recording sub-list. Specifically, if the second time difference is greater than or equal to the maximum closing time length, moving the data in the block corresponding to the block information in the target information recording sub-list to other blocks to avoid data loss.
Referring to fig. 4, an embodiment of the present application discloses a solid state disk data holding apparatus, including:
the time setting module 11 is used for setting the data holding time of the block in the Flash;
a first list determining module 12, configured to determine, according to the latest operation type of the block, a target information recording list used for recording block information of the block;
a second list determining module 13, configured to determine, according to a first time difference between the latest operation time of the block and a system start time, a target information record sub-list actually used for recording the block information from the target information record table, where the target information record sub-list has a corresponding time identifier, and the first time difference is matched with the time identifier;
an information recording module 14, configured to record the block information in the target information recording sub-list;
a time difference determining module 15, configured to determine a second time difference between the current time and the time represented by the time identifier;
a judging module 16, configured to judge whether the second time difference is greater than or equal to the data retention time;
and a data holding processing module 17, configured to perform data holding processing on all blocks corresponding to the block information recorded in the target information recording sub-list when the second time difference is greater than or equal to the data holding time.
Therefore, the data retention time of the block in the Flash needs to be set firstly; determining a target information recording table for recording the block information of the block according to the latest operation type of the block; determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier; then determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the data holding time; and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list. When the second time difference is greater than or equal to the data holding time, it can be determined that all the blocks corresponding to the block information in the target information recording sub-list are subjected to data holding processing, so that system process resources are saved, data holding processing is performed on the blocks in batches, data holding processing efficiency is improved, and system performance is improved.
Further, referring to fig. 5, an embodiment of the present application further discloses a solid state disk data holding device, including: a processor 21 and a memory 22.
Wherein the memory 22 is used for storing a computer program; the processor 21 is configured to execute the computer program to implement the solid state disk data holding method disclosed in the foregoing embodiment.
For a specific process of the above method for maintaining data in a solid state disk, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure, where the electronic device may specifically include, but is not limited to, various computers and the like.
In general, the electronic device 20 in the present embodiment includes: a processor 21 and a memory 22.
The processor 21 may include one or more processing cores, such as a four-core processor, an eight-core processor, and so on. The processor 21 may be implemented by at least one hardware of a DSP (digital signal processing), an FPGA (field-programmable gate array), and a PLA (programmable logic array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (graphics processing unit) which is responsible for rendering and drawing images that need to be displayed on the display screen. In some embodiments, the processor 21 may include an AI (artificial intelligence) processor for processing a calculation operation related to machine learning.
Memory 22 may include one or more computer-readable storage media, which may be non-transitory. Memory 22 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used for storing the following computer program 221, wherein after the computer program is loaded and executed by the processor 21, the steps of the data holding method of the solid state disk disclosed in the foregoing embodiments can be implemented. In addition, the resources stored in the memory 22 may also include an operating system 222, data 223, and the like, and the storage manner may be a transient storage or a permanent storage. The operating system 222 may be Windows, unix, linux, or the like. Data 223 may include a wide variety of data.
In some embodiments, the electronic device 20 may further include a display 23, an input/output interface 24, a communication interface 25, a sensor 26, a power supply 27, and a communication bus 28.
Those skilled in the art will appreciate that the configuration shown in FIG. 6 is not limiting of electronic device 20 and may include more or fewer components than those shown.
Further, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, where the computer program implements the following steps when executed by a processor:
setting data holding time of block in Flash; determining a target information recording table for recording the block information of the block according to the latest operation type of the block; determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier; determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the data holding time; and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list.
Therefore, the data retention time of the block in the Flash needs to be set firstly; determining a target information recording table for recording the block information of the block according to the latest operation type of the block; determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier; then determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the data holding time; and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list. When the second time difference is greater than or equal to the data holding time, it can be determined that all the blocks corresponding to the block information in the target information recording sub-list are subjected to data holding processing, so that system process resources are saved, data holding processing is performed on the blocks in batches, data holding processing efficiency is improved, and system performance is improved.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: setting the maximum opening time and the maximum closing time of the block in Flash to set the data holding time of the block.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: if the latest operation type is opening operation, determining an information recording table corresponding to the opening operation as a target information recording table for recording the block information of the block; and if the latest operation type is closing operation, determining an information recording table corresponding to the closing operation as a target information recording table for recording the block information of the block.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and if the latest operation is the opening operation, judging whether the second time difference is greater than or equal to the maximum opening duration so as to judge whether the second time difference is greater than or equal to the data holding time.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and if the latest operation is the closing operation, judging whether the second time difference is greater than or equal to the maximum closing time length so as to judge whether the second time difference is greater than or equal to the data holding time.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and if the second time difference is greater than or equal to the maximum opening duration, closing all the blocks corresponding to the block information recorded in the target information recording sub-list.
In this embodiment, when the computer subprogram stored in the computer-readable storage medium is executed by the processor, the following steps may be specifically implemented: and if the second time difference is greater than or equal to the longest closing time, moving all the blocks corresponding to the block information recorded in the target information recording sub-list.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, in this document, relational terms such as first and second 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of other elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device, and the medium for holding data of a solid state disk provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for holding data of a solid state disk is characterized by comprising the following steps:
setting data holding time of block in Flash;
determining a target information recording table for recording the block information of the block according to the latest operation type of the block;
determining a target information recording sub-list actually used for recording the block information from the target information recording table according to a first time difference between the latest operation time of the block and the system starting time, and recording the block information in the target information recording sub-list, wherein the target information recording sub-list is provided with a corresponding time identifier, and the first time difference is matched with the time identifier;
determining a second time difference between the current time and the time represented by the time identifier, and judging whether the second time difference is greater than or equal to the data holding time;
and if the second time difference is greater than or equal to the data holding time, performing data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list.
2. The method for maintaining the data of the solid state disk according to claim 1, wherein the setting of the data maintaining time of the block in Flash comprises:
setting the maximum opening time and the maximum closing time of the block in Flash to set the data holding time of the block.
3. The method for maintaining data in a solid state disk according to claim 2, wherein the determining a target information recording table for recording block information of the block according to the latest operation type of the block comprises:
if the latest operation type is opening operation, determining an information recording table corresponding to the opening operation as a target information recording table for recording block information of the block;
and if the latest operation type is closing operation, determining an information recording table corresponding to the closing operation as a target information recording table for recording the block information of the block.
4. The method for maintaining data in a solid state disk according to claim 3, wherein the determining whether the second time difference is greater than or equal to the data maintaining time includes:
and if the latest operation is the opening operation, judging whether the second time difference is greater than or equal to the maximum opening duration or not so as to judge whether the second time difference is greater than or equal to the data holding time or not.
5. The method for maintaining data on a solid state disk according to claim 4, wherein the determining whether the second time difference is greater than or equal to the data maintaining time comprises:
and if the latest operation is the closing operation, judging whether the second time difference is greater than or equal to the maximum closing time length so as to judge whether the second time difference is greater than or equal to the data holding time.
6. The method for maintaining data in a solid state disk according to claim 5, wherein the performing data maintenance processing on all blocks corresponding to the block information recorded in the target information recording sub-list includes:
and if the second time difference is greater than or equal to the maximum opening duration, closing all the blocks corresponding to the block information recorded in the target information recording sub-list.
7. The method for holding data in a solid state disk according to any one of claims 2 to 6, wherein the performing data holding processing on all blocks corresponding to the block information recorded in the target information recording sub-list includes:
and if the second time difference is greater than or equal to the longest closing time, moving all the blocks corresponding to the block information recorded in the target information recording sub-list.
8. A solid state disk data retention apparatus, comprising:
the time setting module is used for setting the data holding time of the block in the Flash;
the first list determining module is used for determining a target information recording list for recording the block information of the block according to the latest operation type of the block;
a second list determining module, configured to determine, according to a first time difference between a latest operation time of the block and a system start time, a target information recording sub-list actually used for recording the block information from the target information recording table, where the target information recording sub-list has a corresponding time identifier, and the first time difference is matched with the time identifier;
the information recording module is used for recording the block information in the target information recording sublist;
a time difference determining module for determining a second time difference between the current time and the time represented by the time identifier;
the judging module is used for judging whether the second time difference is larger than or equal to the data holding time or not;
and the data holding processing module is used for carrying out data holding processing on all the blocks corresponding to the block information recorded in the target information recording sub-list when the second time difference is greater than or equal to the data holding time.
9. A solid state disk data retention device, comprising:
a memory and a processor;
wherein the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the solid state disk data retention method according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the solid state disk data retention method according to any one of claims 1 to 7.
CN201911208772.3A 2019-11-30 2019-11-30 Solid state disk data holding method, device, equipment and medium Active CN111124285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911208772.3A CN111124285B (en) 2019-11-30 2019-11-30 Solid state disk data holding method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911208772.3A CN111124285B (en) 2019-11-30 2019-11-30 Solid state disk data holding method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111124285A CN111124285A (en) 2020-05-08
CN111124285B true CN111124285B (en) 2023-01-10

Family

ID=70496474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911208772.3A Active CN111124285B (en) 2019-11-30 2019-11-30 Solid state disk data holding method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111124285B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874574A (en) * 2018-05-31 2018-11-23 郑州云海信息技术有限公司 A kind of garbage reclamation processing method and relevant apparatus
CN110007873A (en) * 2019-04-12 2019-07-12 苏州浪潮智能科技有限公司 A kind of NAND data hold time method for inspecting, device and equipment
CN110007871A (en) * 2019-04-12 2019-07-12 苏州浪潮智能科技有限公司 A kind of solid state hard disk data hold time method for inspecting, device and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874574A (en) * 2018-05-31 2018-11-23 郑州云海信息技术有限公司 A kind of garbage reclamation processing method and relevant apparatus
CN110007873A (en) * 2019-04-12 2019-07-12 苏州浪潮智能科技有限公司 A kind of NAND data hold time method for inspecting, device and equipment
CN110007871A (en) * 2019-04-12 2019-07-12 苏州浪潮智能科技有限公司 A kind of solid state hard disk data hold time method for inspecting, device and equipment

Also Published As

Publication number Publication date
CN111124285A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
JP5211751B2 (en) Calculator, dump program and dump method
CN111324303B (en) SSD garbage recycling method, SSD garbage recycling device, computer equipment and storage medium
EP3958120A1 (en) Method and device for anonymous page management, terminal device, and readable storage medium
US11366757B2 (en) File pre-fetch scheduling for cache memory to reduce latency
CN109669798B (en) Crash analysis method, crash analysis device, electronic equipment and storage medium
CN109558263B (en) Method and related device for processing data reading errors of solid state disk
CN110795400B (en) File management method, device, equipment and medium
CN107402870B (en) Method and device for processing log segment in metadata server
CN103473343A (en) File management method, device and terminal
CN112506745B (en) Memory temperature reading method and device and computer readable storage medium
CN113835643B (en) Data storage method and device, electronic equipment and readable storage medium
CN107608737B (en) Animation playing method and device
CN104216802A (en) Memory database recovery method and device
CN115686961A (en) Processor testing method and device and electronic equipment
CN111061429B (en) Data access method, device, equipment and medium
CN105304140A (en) Method and apparatus for testing memory performance of electronic equipment
CN103455436A (en) RAM (random access memory) detection method and system
CN111124285B (en) Solid state disk data holding method, device, equipment and medium
CN112667442A (en) Control method, device and equipment based on nonvolatile memory device starting system
CN111953569A (en) State information reporting method, device, equipment and medium
CN107391440B (en) Processing device and method for output data of fast Fourier transform algorithm
CN110399143A (en) Brush machine method, apparatus, computer storage medium and the system of terminal device
CN106708605B (en) Method and device for detecting resource leakage
CN108038035A (en) A kind of detection method and relevant apparatus of flash reading and writing state
CN114861003A (en) Object enumeration method, device and medium under specified directory

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