[go: up one dir, main page]

CN111124285A - 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
CN111124285A
CN111124285A CN201911208772.3A CN201911208772A CN111124285A CN 111124285 A CN111124285 A CN 111124285A CN 201911208772 A CN201911208772 A CN 201911208772A CN 111124285 A CN111124285 A CN 111124285A
Authority
CN
China
Prior art keywords
time
block
target information
information recording
time difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911208772.3A
Other languages
Chinese (zh)
Other versions
CN111124285B (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 Metabrain 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • G06F3/0649Lifecycle management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种固态硬盘数据保持方法、装置、设备、介质,该方法包括:设置Flash中block的数据保持时间;根据所述block的最近操作类型,确定用于记录block信息的目标信息记录表;根据所述block的最近操作时间与系统启动时间的第一时间差,从所述目标信息记录表中确定出实际用于记录所述block信息的目标信息记录子列表,并将所述block信息记录在所述目标信息记录子列表中;确定当前时间与所述时间标识表示的时间之间的第二时间差;如果所述第二时间差大于或等于所述数据保持时间,则对所述目标信息记录子列表中记录的所述block信息对应的所有所述block进行数据保持处理。这样能够节约系统进程资源,批量对block进行数据保持处理,提高数据保持处理效率,且提高系统性能。

Figure 201911208772

The present application discloses a method, device, equipment and medium for data retention of a solid-state hard disk. The method includes: setting the data retention time of a block in Flash; and determining a target information record for recording block information according to the latest operation type of the block Table; According to the first time difference of the latest operation time of the block and the system startup time, from the target information record table, determine the target information record sublist that is actually used to record the block information, and the block information record in the target information record sub-list; determine a second time difference between the current time and the time indicated by the time stamp; if the second time difference is greater than or equal to the data retention time, the target information Data retention processing is performed on all the blocks corresponding to the block information recorded in the record sublist. In this way, system process resources can be saved, data retention processing can be performed on blocks in batches, the data retention processing efficiency can be improved, and system performance can be improved.

Figure 201911208772

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 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.
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 duration, closing all the 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 used for storing a computer program;
the processor is configured to execute the computer program to implement the solid state disk data holding 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 needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only 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 solid state disk data retention method 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present 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 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 recording sub-list actually used for storing the block information is determined from the target information recording 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 recording sub-list, where the target information recording 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 in a solid state disk, where the method includes:
step S21: 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, 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 in 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 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;
an information recording module 14, configured to record the block information in the target information recording sublist;
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 provided in an embodiment of the present application, 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 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, wherein the computer program, when executed by a processor, implements 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.
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 by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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 is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of 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 an … …" does not exclude the presence of other identical elements 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 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.
4. The method for maintaining data on 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 comprises:
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.
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 true CN111124285A (en) 2020-05-08
CN111124285B 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
CN111124285B (en) 2023-01-10

Similar Documents

Publication Publication Date Title
EP2780820B1 (en) Measuring web page rendering time
JP5211751B2 (en) Calculator, dump program and dump method
CN111324303B (en) SSD garbage recycling method, SSD garbage recycling device, computer equipment and storage medium
CN110008016B (en) Anonymous page management method, device, terminal device and readable storage medium
US20200257628A1 (en) File pre-fetch scheduling for cache memory to reduce latency
CN109669798B (en) Crash analysis method, crash analysis device, electronic equipment and storage medium
CN107590016A (en) Recognition method and device for restart after power failure
CN109558263B (en) A method for processing data read errors of a solid-state hard disk and a related device
CN115407943A (en) Memory dump file generation method, device and equipment and readable storage medium
US20120154158A1 (en) Computing device and alarm method of the computing device
CN105893221B (en) Method and device for alarming terminal running time
CN112506745B (en) Memory temperature reading method and device and computer readable storage medium
CN111061429B (en) Data access method, device, equipment and medium
CN111953569B (en) Method, device, device and medium for reporting status information
CN105304140A (en) Method and apparatus for testing memory performance of electronic equipment
CN113849195B (en) Application loading method, device, storage medium and terminal
CN103455436A (en) RAM (random access memory) detection method and system
CN111124285A (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
CN104503881B (en) The method of handheld device consumption detection, device and handheld device
CN107451037A (en) Remaining operation time prompting method and device for mobile terminal
TW201426544A (en) Electronic system and boot management method
US20240362561A1 (en) System and method for managing data workflows using digital twins
CN117476089A (en) SSD reliability automatic test method and related equipment
CN110780820A (en) Method and device for determining continuous storage space, electronic equipment and storage medium

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China