CN109491606B - Full flash memory space management method, system, equipment and computer medium - Google Patents

Full flash memory space management method, system, equipment and computer medium Download PDF

Info

Publication number
CN109491606B
CN109491606B CN201811297003.0A CN201811297003A CN109491606B CN 109491606 B CN109491606 B CN 109491606B CN 201811297003 A CN201811297003 A CN 201811297003A CN 109491606 B CN109491606 B CN 109491606B
Authority
CN
China
Prior art keywords
flash memory
full
memory block
space
information
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
CN201811297003.0A
Other languages
Chinese (zh)
Other versions
CN109491606A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201811297003.0A priority Critical patent/CN109491606B/en
Publication of CN109491606A publication Critical patent/CN109491606A/en
Application granted granted Critical
Publication of CN109491606B publication Critical patent/CN109491606B/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/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The application discloses a method, a system, equipment and a computer medium for managing a full flash memory space, which are applied to a full flash memory system, and the method comprises the following steps: dividing a full flash memory space into a preset number of full flash memory blocks; counting data use information of each full-flash memory block; for each full-flash memory block, the full-flash memory block is managed based on data usage information of the full-flash memory block. According to the full flash memory space management method, the full flash memory space is divided into the preset number of full flash memory blocks, so that the size of a managed object is reduced when management is performed each time; the data use information of each full-flash memory block is counted, so that the data use information of each full-flash memory block is known and clear, the full-flash memory blocks can be rapidly and accurately managed, and the data management efficiency of the SSD is improved. The full flash memory space management system, the full flash memory space management equipment and the computer readable storage medium solve the corresponding technical problems.

Description

Full flash memory space management method, system, equipment and computer medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a method, a system, a device, and a computer medium for managing a full flash storage space.
Background
A full flash memory storage system is a storage system that uses flash memory, i.e., SSD (Solid State drive) disks.
However, since the SSD disk cannot be overwritten, the inside of the SSD disk must find a location where new data is written, and the location where new data is written is not yet written, so how to implement efficient data management on the SSD disk is a problem to be solved.
In summary, how to improve the data management efficiency of the SSD disk is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a full flash memory space management method which can solve the technical problem of improving the data management efficiency of an SSD to a certain extent. The application also provides a full flash memory space management system, equipment and a computer readable storage medium.
In order to achieve the above purpose, the present application provides the following technical solutions:
a full flash memory space management method is applied to a full flash memory system and comprises the following steps:
dividing the full flash memory space into a preset number of full flash memory blocks;
counting data use information of each full-flash memory block;
for each of the full flash memory blocks, managing the full flash memory block based on data usage information of the full flash memory block.
Preferably, for each of the full-flash memory blocks, managing the full-flash memory block based on the data usage information of the full-flash memory block includes:
for each full-flash memory block, determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block;
and recovering the full-flash memory block corresponding to the space usage with the maximum numerical value.
Preferably, after determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block and before the full-flash memory block corresponding to the space usage with the largest recycle value, the method further includes:
adding the information of the full flash memory storage block corresponding to the space usage with the largest numerical value to a preset queue;
the full flash memory block corresponding to the space usage with the maximum recycle value comprises:
and in the preset queue, recovering the full-flash memory block corresponding to the space usage with the largest numerical value.
Preferably, the adding the information of the full flash memory block corresponding to the space usage with the largest numerical value to a preset queue includes:
judging whether the preset queue is full or not;
if so, judging whether the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue;
and if the maximum value of the space usage is greater than the minimum value of the space usage in the preset queue, replacing the information of the full-flash memory block of the space usage with the information of the full-flash memory block corresponding to the maximum value of the space usage, wherein the median of the preset queue is the minimum.
Preferably, the dividing the full flash memory space into a preset number of full flash memory blocks includes:
dividing the full flash memory space into a preset number of full flash memory blocks, wherein the size of each full flash memory block is the same.
Preferably, the counting data usage information of each full-flash memory block includes:
and counting data use information of each full-flash memory block, wherein the data use information comprises used space information and unused space information.
Preferably, the counting data usage information of each of the all-flash memory blocks, where the data usage information includes used space information and unused space information, includes:
for each full-flash memory block, counting a difference value between the used spatial information and the unused spatial information of the full-flash memory block;
and updating the data use information of the full-flash memory block at the current moment based on the difference and the data use information of the full-flash memory block at the last moment of the current moment.
A full flash memory space management system is applied to a full flash memory system and comprises:
the first dividing module is used for dividing the full flash memory space into a preset number of full flash memory blocks;
the first statistic module is used for counting the data use information of each full-flash memory block;
and the first management module is used for managing the full flash memory blocks based on the data use information of the full flash memory blocks for each full flash memory block.
A full flash storage space management device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the full flash memory space management method as described above when executing the computer program.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the full flash memory space management method according to any one of the preceding claims.
The method for managing the full flash memory space is applied to a full flash memory system, and the full flash memory space is divided into a preset number of full flash memory blocks; counting data use information of each full-flash memory block; for each full-flash memory block, the full-flash memory block is managed based on data usage information of the full-flash memory block. According to the method for managing the full flash memory space, the full flash memory space is divided into the preset number of full flash memory blocks, and the size of a managed object is reduced when management is carried out each time; the data use information of each full-flash memory block is counted, so that the data use information of each full-flash memory block is known and clear, the full-flash memory blocks can be quickly and accurately managed according to the data use information of each full-flash memory block, and the data management efficiency of the SSD is improved. The full flash memory space management system, the full flash memory space management equipment and the computer readable storage medium solve the corresponding technical problems.
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 first flowchart of a full flash memory space management method according to an embodiment of the present disclosure;
fig. 2 is a second flowchart of a full flash memory space management method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a full flash memory space management system according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a full flash memory space management device according to an embodiment of the present disclosure;
fig. 5 is another schematic structural diagram of a full flash memory space management device according to an embodiment of the present disclosure.
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.
A full flash memory storage system is a storage system that uses flash memory, i.e., SSD (Solid State drive) disks. However, since the SSD disk cannot be overwritten, the inside of the SSD disk must find a location where new data is written, and the location where new data is written is not yet written, so how to implement efficient data management on the SSD disk is a problem to be solved. The method for managing the full flash memory space can improve the data management efficiency of the SSD.
Referring to fig. 1, fig. 1 is a first flowchart of a full flash memory space management method according to an embodiment of the present disclosure.
The method for managing the storage space of the full flash memory, provided by the embodiment of the application, is applied to a full flash memory system, and comprises the following steps:
step S101: the full flash memory space is divided into a preset number of full flash memory blocks.
In practical application, the full flash memory space of the full flash memory storage system can be divided into the full flash memory blocks with the preset number, the size of each divided full flash memory block can be uniform, and the step of dividing the full flash memory space into the full flash memory blocks with the preset number can be specifically as follows: dividing a full flash memory space into a preset number of full flash memory blocks, wherein the size of each full flash memory block is the same; or may be different sizes, for example, the size of each full flash memory block may be set to 128MB, etc.; the preset number can be determined according to actual needs. In a specific application scenario, when the size of the full flash memory space is known, the value of the full flash memory space can be divided by a fixed numerical value to obtain a preset number of values, wherein the fixed numerical value is the size value of each full flash memory block; the size value of each full flash memory space can be obtained by dividing the size value of the full flash memory space by a preset number.
Step S102: and counting the data use information of each full-flash memory block.
In practical application, after the full flash memory space is divided into the preset number of full flash memory blocks, the data use information of each full flash memory block can be counted, and the data use information reflects the data use condition of the full flash memory blocks. In a specific application scenario, in order to improve the statistical efficiency, a controller may be allocated to each full-flash memory block, data usage information of the corresponding full-flash memory block is counted by the controller, and then the data usage information counted by each controller is summarized to obtain the data usage information of each full-flash memory block.
In a specific application scenario, in order to intuitively know the data usage information of each full-flash memory block, the step of counting the data usage information of each full-flash memory block may specifically be: and counting data use information of each full-flash memory block, wherein the data use information comprises used space information and unused space information.
Specifically, in order to improve the statistical efficiency of the statistics of the data usage information of each all-flash memory block, the statistical method may be optimized, and then the data usage information of each all-flash memory block is counted, and the step of the data usage information including used spatial information and unused spatial information may specifically be: for each full flash memory block, counting the difference value of the used space information and the unused space information of the full flash memory block; and updating the data use information of the current moment of the full-flash memory block based on the difference and the data use information of the full-flash memory block at the previous moment of the current moment. In this embodiment, only the difference between the used space information and the unused space information of the full flash memory block is counted, so that the data amount reflecting the data use information of the full flash memory block is small, and the counting and the transmission are facilitated. In the above embodiment of allocating the controller to each all-flash memory block, a main controller may be provided, where the main controller stores used space information and unused space information of each all-flash memory block, the controller corresponding to each all-flash memory block counts a difference between the used space information and the unused space information of the all-flash memory block, and the main controller updates the used space information and the unused space information of the all-flash memory block stored by the main controller according to the difference information collected by the controller of each all-flash memory block.
Step S103: for each full-flash memory block, the full-flash memory block is managed based on data usage information of the full-flash memory block.
In practical application, when data is written in the SSD disk subsequently, only the space in which data is not written can be selected to write the data, and in order to determine the space in which data is not written, after the data usage information of each full flash memory block is obtained by statistics, the full flash memory block can be managed based on the data usage information of the full flash memory block.
In a specific application scenario, the larger the space usage of the full-flash memory block is, the lower the possibility of storing data into the full-flash memory block is, so that the management manner of the full-flash memory block can be determined according to the space usage of the full-flash memory block, and for each full-flash memory block, the step of managing the full-flash memory block based on the data usage information of the full-flash memory block may specifically be: for each full-flash memory block, determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block; and recovering the full-flash memory block corresponding to the space usage with the maximum numerical value.
Specifically, when the service pressure of the full flash memory system is low, the full flash memory block may not be managed, and at this time, in order to quickly manage the full flash memory block when the full flash memory block needs to be managed subsequently, after the space usage of the full flash memory block is determined based on the data usage information of the full flash memory block, before the full flash memory block corresponding to the space usage with the largest numerical value is recovered, the information of the full flash memory block corresponding to the space usage with the largest numerical value may be added to a preset queue; correspondingly, the step of recovering the full-flash memory block corresponding to the space usage with the largest numerical value may specifically be: and recovering the full-flash memory block corresponding to the space usage with the largest numerical value in the preset queue. The information of the full flash memory block may be a logical address of the full flash memory block, a location number in the full flash memory system, and the like.
Specifically, length at predetermineeing the queue is limited, when adding the information of the total flash memory block that the space usage that the numerical value is the biggest to predetermineeing the queue in, can adopt more reasonable mode to optimize the addition process, then the step of adding the information of the total flash memory block that the space usage that the numerical value is the biggest to predetermineeing the queue can specifically be: judging whether a preset queue is full; if so, judging whether the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue; and if the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue, replacing the information of the full-flash memory block with the minimum value in the preset queue with the information of the full-flash memory block corresponding to the maximum value of the space usage. If the preset queue is not full, the information of the full flash memory block corresponding to the space usage with the maximum numerical value can be directly added into the preset queue.
In a specific application scenario, in order to release the full flash memory block with a large space usage amount and not lose the data stored in the full flash memory block, for each full flash memory block, the step of managing the full flash memory block based on the data usage information of the full flash memory block may specifically be: for each full-flash memory block, determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block; and carrying out relocation on the data in the full flash memory block corresponding to the space usage with the maximum numerical value.
The method for managing the full flash memory space is applied to a full flash memory system, and the full flash memory space is divided into a preset number of full flash memory blocks; counting data use information of each full-flash memory block; for each full-flash memory block, the full-flash memory block is managed based on data usage information of the full-flash memory block. According to the method for managing the full flash memory space, the full flash memory space is divided into the preset number of full flash memory blocks, and the size of a managed object is reduced when management is carried out each time; the data use information of each full-flash memory block is counted, so that the data use information of each full-flash memory block is known and clear, the full-flash memory blocks can be quickly and accurately managed according to the data use information of each full-flash memory block, and the data management efficiency of the SSD is improved.
Referring to fig. 2, fig. 2 is a second flowchart of a method for managing a full flash memory space according to an embodiment of the present application.
The method for managing the storage space of the full flash memory provided by the embodiment of the application can comprise the following steps:
step S201: dividing the full flash memory space into a preset number of full flash memory blocks, wherein the size of each full flash memory block is the same.
Step S202: and for each full flash memory block, counting the difference value of the used space information and the unused space information of the full flash memory block.
Step S203: and updating the data use information of the full-flash memory block at the current moment based on the difference and the data use information of the full-flash memory block at the previous moment of the current moment, wherein the data use information comprises used space information and unused space information.
Step S204: and for each full-flash memory block, determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block.
Step S205: it is determined whether the predetermined queue is full, and if yes, step S206 is executed.
Step S206: judging whether the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue or not; if yes, go to step S207.
Step S207: and replacing the information of the full-flash memory block with the minimum space usage in the preset queue by the information of the full-flash memory block corresponding to the maximum space usage.
Step S208: and recovering the full-flash memory block corresponding to the space usage with the largest numerical value in the preset queue.
The application also provides a full flash memory space management system, which has the corresponding effect of the full flash memory space management method provided by the embodiment of the application. Referring to fig. 3, fig. 3 is a schematic structural diagram of a full flash memory space management system according to an embodiment of the present disclosure.
The embodiment of the application provides a full flash memory space management system, which is applied to a full flash memory system, and can include:
a first dividing module 101, configured to divide a full flash memory space into a preset number of full flash memory blocks;
the first statistic module 102 is configured to count data usage information of each full flash memory block;
the first management module 103 is configured to, for each full-flash memory block, manage the full-flash memory block based on the data usage information of the full-flash memory block.
The embodiment of the application provides a full flash memory space management system, which is applied to a full flash memory system, and the first management module may include:
the device comprises a first determining unit, a second determining unit and a control unit, wherein the first determining unit is used for determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block for each full-flash memory block;
and the first recovery unit is used for recovering the full-flash memory block corresponding to the space usage with the maximum numerical value.
The system for managing the full flash memory space provided by the embodiment of the application is applied to the full flash memory system, and can further include:
the first adding unit is used for adding the information of the full-flash memory block corresponding to the space usage amount with the maximum numerical value into a preset queue before the first recovery unit recovers the full-flash memory block corresponding to the space usage amount with the maximum numerical value after the first determining unit determines the space usage amount of the full-flash memory block based on the data usage information of the full-flash memory block;
the first recovery unit may include:
and the first recovery subunit is used for recovering the full-flash memory block corresponding to the space usage with the largest numerical value in the preset queue.
The embodiment of the application provides a full flash memory space management system, which is applied to a full flash memory system, and the first adding unit may include:
the first judgment subunit is used for judging whether the preset queue is full;
the second judgment subunit is used for judging whether the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue or not when the first judgment subunit judges that the preset queue is full;
and the first execution subunit is used for replacing the information of the all-flash memory block with the minimum space usage in the preset queue by the information of the all-flash memory block corresponding to the maximum space usage when the maximum space usage is larger than the minimum space usage in the preset queue.
The embodiment of the application provides a full flash memory space management system, which is applied to a full flash memory system, and the first partitioning module may include:
the first dividing unit is used for dividing the full flash memory space into a preset number of full flash memory blocks, and the size of each full flash memory block is the same.
The embodiment of the application provides a full flash memory space management system, which is applied to a full flash memory system, and the first statistic module may include:
the first statistic unit is used for counting data use information of each full flash memory block, and the data use information comprises used space information and unused space information.
The embodiment of the application provides a full flash memory space management system, which is applied to a full flash memory system, and the first statistic unit may include:
the first counting subunit is used for counting the difference value of the used space information and the unused space information of each full flash memory block;
and the first updating subunit is used for updating the data use information of the full-flash memory block at the current moment based on the difference value and the data use information of the full-flash memory block at the previous moment of the current moment.
The application also provides a full flash memory space management device and a computer readable storage medium, which both have the corresponding effects of the full flash memory space management device provided by the embodiment of the application. Referring to fig. 4, fig. 4 is a schematic structural diagram of a full flash memory space management device according to an embodiment of the present disclosure.
The full flash memory space management device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer program is stored in the memory 201, and the processor 202 implements the following steps when executing the computer program stored in the memory 201:
dividing a full flash memory space into a preset number of full flash memory blocks;
counting data use information of each full-flash memory block;
for each full-flash memory block, the full-flash memory block is managed based on data usage information of the full-flash memory block.
The full flash memory space management device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer subprogram is stored in the memory 201, and the following steps are specifically realized when the processor 202 executes the computer subprogram stored in the memory 201: for each full-flash memory block, determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block; and recovering the full-flash memory block corresponding to the space usage with the maximum numerical value.
The full flash memory space management device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer subprogram is stored in the memory 201, and the following steps are specifically realized when the processor 202 executes the computer subprogram stored in the memory 201: after the space usage of the full-flash memory block is determined based on the data usage information of the full-flash memory block, before the full-flash memory block corresponding to the space usage with the largest numerical value is recycled, adding the information of the full-flash memory block corresponding to the space usage with the largest numerical value to a preset queue; correspondingly, in the preset queue, the full-flash memory block corresponding to the space usage with the largest numerical value is recycled.
The full flash memory space management device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer subprogram is stored in the memory 201, and the following steps are specifically realized when the processor 202 executes the computer subprogram stored in the memory 201: judging whether a preset queue is full; if so, judging whether the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue; and if the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue, replacing the information of the full-flash memory block with the minimum value in the preset queue with the information of the full-flash memory block corresponding to the maximum value of the space usage.
The full flash memory space management device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer subprogram is stored in the memory 201, and the following steps are specifically realized when the processor 202 executes the computer subprogram stored in the memory 201: dividing the full flash memory space into a preset number of full flash memory blocks, wherein the size of each full flash memory block is the same.
The full flash memory space management device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer subprogram is stored in the memory 201, and the following steps are specifically realized when the processor 202 executes the computer subprogram stored in the memory 201: and counting data use information of each full-flash memory block, wherein the data use information comprises used space information and unused space information.
The full flash memory space management device provided by the embodiment of the application comprises a memory 201 and a processor 202, wherein a computer subprogram is stored in the memory 201, and the following steps are specifically realized when the processor 202 executes the computer subprogram stored in the memory 201: for each full flash memory block, counting the difference value of the used space information and the unused space information of the full flash memory block; and updating the data use information of the current moment of the full-flash memory block based on the difference and the data use information of the full-flash memory block at the previous moment of the current moment.
Referring to fig. 5, another full flash memory space management device provided in the embodiment of the present application may further include: an input port 203 connected to the processor 202, for transmitting externally input commands to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing result of the processor 202 to the outside; and the communication module 205 is connected with the processor 202 and is used for realizing the communication between the full flash memory space management device and the outside. The display unit 204 may be a display panel, a laser scanning display, or the like; the communication method adopted by the communication module 205 includes, but is not limited to, mobile high definition link technology (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), and wireless connection: wireless fidelity technology (WiFi), bluetooth communication technology, bluetooth low energy communication technology, ieee802.11s based communication technology.
A computer-readable storage medium is provided in an embodiment of the present application, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the following steps:
dividing a full flash memory space into a preset number of full flash memory blocks;
counting data use information of each full-flash memory block;
for each full-flash memory block, the full-flash memory block is managed based on data usage information of the full-flash memory block.
An embodiment of the present application provides a computer-readable storage medium, in which a computer subprogram is stored, where the computer subprogram, when executed by a processor, specifically implements the following steps: for each full-flash memory block, determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block; and recovering the full-flash memory block corresponding to the space usage with the maximum numerical value.
An embodiment of the present application provides a computer-readable storage medium, in which a computer subprogram is stored, where the computer subprogram, when executed by a processor, specifically implements the following steps: after the space usage of the full-flash memory block is determined based on the data usage information of the full-flash memory block, before the full-flash memory block corresponding to the space usage with the largest numerical value is recycled, adding the information of the full-flash memory block corresponding to the space usage with the largest numerical value to a preset queue; correspondingly, in the preset queue, the full-flash memory block corresponding to the space usage with the largest numerical value is recycled.
An embodiment of the present application provides a computer-readable storage medium, in which a computer subprogram is stored, where the computer subprogram, when executed by a processor, specifically implements the following steps: judging whether a preset queue is full; if so, judging whether the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue; and if the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue, replacing the information of the full-flash memory block with the minimum value in the preset queue with the information of the full-flash memory block corresponding to the maximum value of the space usage.
An embodiment of the present application provides a computer-readable storage medium, in which a computer subprogram is stored, where the computer subprogram, when executed by a processor, specifically implements the following steps: dividing the full flash memory space into a preset number of full flash memory blocks, wherein the size of each full flash memory block is the same.
An embodiment of the present application provides a computer-readable storage medium, in which a computer subprogram is stored, where the computer subprogram, when executed by a processor, specifically implements the following steps: and counting data use information of each full-flash memory block, wherein the data use information comprises used space information and unused space information.
An embodiment of the present application provides a computer-readable storage medium, in which a computer subprogram is stored, where the computer subprogram, when executed by a processor, specifically implements the following steps: for each full flash memory block, counting the difference value of the used space information and the unused space information of the full flash memory block; and updating the data use information of the current moment of the full-flash memory block based on the difference and the data use information of the full-flash memory block at the previous moment of the current moment.
The computer-readable storage media to which this application relates include 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 media known in the art.
For a description of relevant parts in the system, the device and the computer-readable storage medium for managing the full flash storage space provided in the embodiments of the present application, reference is made to the detailed description of corresponding parts in the method for managing the full flash storage space provided in the embodiments of the present application, and details are not repeated herein. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
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 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 previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A full flash memory space management method is applied to a full flash memory system and comprises the following steps:
dividing the full flash memory space into a preset number of full flash memory blocks;
counting data use information of each full-flash memory block;
for each of the full flash memory blocks, managing the full flash memory block based on data usage information of the full flash memory block;
wherein, for each of the full flash memory blocks, managing the full flash memory block based on the data usage information of the full flash memory block comprises:
for each full-flash memory block, determining the space usage of the full-flash memory block based on the data usage information of the full-flash memory block;
recovering the full-flash memory block corresponding to the space usage with the maximum numerical value;
after determining the space usage of the full flash memory block based on the data usage information of the full flash memory block and before the full flash memory block corresponding to the space usage with the largest recycle value, the method further includes:
adding the information of the full flash memory storage block corresponding to the space usage with the largest numerical value to a preset queue;
the full flash memory block corresponding to the space usage with the maximum recycle value comprises:
in the preset queue, recovering the full flash memory block corresponding to the space usage with the largest numerical value;
wherein, the adding the information of the full flash memory block corresponding to the space usage with the largest numerical value to a preset queue includes:
judging whether the preset queue is full or not;
if so, judging whether the maximum value of the space usage is larger than the minimum value of the space usage in the preset queue;
and if the maximum value of the space usage is greater than the minimum value of the space usage in the preset queue, replacing the information of the full-flash memory block of the space usage with the information of the full-flash memory block corresponding to the maximum value of the space usage, wherein the median of the preset queue is the minimum.
2. The method of claim 1, wherein the dividing the full flash memory space into a preset number of full flash memory blocks comprises:
dividing the full flash memory space into a preset number of full flash memory blocks, wherein the size of each full flash memory block is the same.
3. The method of claim 2, wherein the counting data usage information of each of the all-flash memory blocks comprises:
and counting data use information of each full-flash memory block, wherein the data use information comprises used space information and unused space information.
4. The method of claim 3, wherein the counting data usage information of each of the all-flash memory blocks, the data usage information including used space information and unused space information, comprises:
for each full-flash memory block, counting a difference value between the used spatial information and the unused spatial information of the full-flash memory block;
and updating the data use information of the full-flash memory block at the current moment based on the difference and the data use information of the full-flash memory block at the last moment of the current moment.
5. A full flash memory space management system is applied to a full flash memory system and comprises the following components:
the first dividing module is used for dividing the full flash memory space into a preset number of full flash memory blocks;
the first statistic module is used for counting the data use information of each full-flash memory block;
the first management module is used for managing the full flash memory blocks based on the data use information of the full flash memory blocks for each full flash memory block;
wherein the first management module comprises:
a first determining unit, configured to determine, for each of the full-flash memory blocks, a space usage amount of the full-flash memory block based on data usage information of the full-flash memory block;
the first recovery unit is used for recovering the full-flash memory block corresponding to the space usage with the largest numerical value;
wherein, still include:
a first adding unit, configured to add, after the first determining unit determines the space usage of the full-flash memory block based on the data usage information of the full-flash memory block, information of the full-flash memory block corresponding to the space usage with the largest numerical value to a preset queue before the first recovery unit recovers the full-flash memory block corresponding to the space usage with the largest numerical value;
the first recovery unit includes:
the first recovery subunit is configured to recover, in the preset queue, the full-flash memory block corresponding to the space usage with the largest numerical value;
wherein the first adding unit includes:
the first judgment subunit is used for judging whether the preset queue is full;
a second determining subunit, configured to determine, when the first determining subunit determines that the preset queue is full, whether a maximum value of the space usage is greater than a minimum value of the space usage in the preset queue;
and the first execution subunit is used for replacing the information of the full-flash memory block of the space usage with the minimum value in the preset queue by the information of the full-flash memory block corresponding to the maximum value of the space usage when the maximum value of the space usage is greater than the minimum value of the space usage in the preset queue.
6. A full flash storage space management device, comprising:
a memory for storing a computer program;
processor for implementing the steps of the full flash memory space management method according to any of claims 1 to 4 when executing said computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the full flash memory space management method according to any one of claims 1 to 4.
CN201811297003.0A 2018-11-01 2018-11-01 Full flash memory space management method, system, equipment and computer medium Active CN109491606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811297003.0A CN109491606B (en) 2018-11-01 2018-11-01 Full flash memory space management method, system, equipment and computer medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811297003.0A CN109491606B (en) 2018-11-01 2018-11-01 Full flash memory space management method, system, equipment and computer medium

Publications (2)

Publication Number Publication Date
CN109491606A CN109491606A (en) 2019-03-19
CN109491606B true CN109491606B (en) 2021-10-15

Family

ID=65692202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811297003.0A Active CN109491606B (en) 2018-11-01 2018-11-01 Full flash memory space management method, system, equipment and computer medium

Country Status (1)

Country Link
CN (1) CN109491606B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377529A (en) * 2019-06-27 2019-10-25 苏州浪潮智能科技有限公司 A kind of method, apparatus and equipment of full flash memory storage system data management
CN111078133B (en) * 2019-10-18 2022-08-09 苏州浪潮智能科技有限公司 Method, device and medium for managing space of full flash memory array
CN111880733B (en) * 2020-07-24 2022-03-29 长江存储科技有限责任公司 Three-dimensional memory device, three-dimensional memory, operating method thereof and three-dimensional memory system
CN113741809B (en) * 2021-07-30 2023-08-04 苏州浪潮智能科技有限公司 Processing method, device and equipment for storage block state information in full flash storage
CN115686379B (en) * 2022-12-14 2024-02-20 江苏华存电子科技有限公司 Method and system for optimizing management of hollow white data area in flash memory

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169760A (en) * 2006-10-26 2008-04-30 北京华旗资讯数码科技有限公司 Electronic hard disk storage room management method
CN103365788A (en) * 2013-08-06 2013-10-23 山东大学 Self-adaption local garbage collecting method used for real-time flash memory conversion layer
CN105760113A (en) * 2016-02-04 2016-07-13 西安科技大学 High-speed storage equipment based on NAND flash memory and file management method
KR101755730B1 (en) * 2011-07-22 2017-07-07 샌디스크 테크놀로지스 엘엘씨 Apparatus, system, and method for determining a configuration parameter for solid-state storage media
CN107817947A (en) * 2016-09-14 2018-03-20 北京金山云网络技术有限公司 A kind of date storage method, apparatus and system
CN108153481A (en) * 2016-12-05 2018-06-12 北京京存技术有限公司 The storage block recovery method and device of a kind of NAND

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169760A (en) * 2006-10-26 2008-04-30 北京华旗资讯数码科技有限公司 Electronic hard disk storage room management method
KR101755730B1 (en) * 2011-07-22 2017-07-07 샌디스크 테크놀로지스 엘엘씨 Apparatus, system, and method for determining a configuration parameter for solid-state storage media
CN103365788A (en) * 2013-08-06 2013-10-23 山东大学 Self-adaption local garbage collecting method used for real-time flash memory conversion layer
CN105760113A (en) * 2016-02-04 2016-07-13 西安科技大学 High-speed storage equipment based on NAND flash memory and file management method
CN107817947A (en) * 2016-09-14 2018-03-20 北京金山云网络技术有限公司 A kind of date storage method, apparatus and system
CN108153481A (en) * 2016-12-05 2018-06-12 北京京存技术有限公司 The storage block recovery method and device of a kind of NAND

Also Published As

Publication number Publication date
CN109491606A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109491606B (en) Full flash memory space management method, system, equipment and computer medium
US10331584B2 (en) Internal system namespace exposed through use of two local processors and controller memory buffer with two reserved areas
CN109783017B (en) Storage device bad block processing method and device and storage device
CN106775496B (en) Stored data processing method and device
US8572309B2 (en) Apparatus and method to protect metadata against unexpected power down
CA2978927C (en) Data check method and storage system
CN110069219B (en) Data storage method and system, electronic equipment and storage medium
CN103995855A (en) Method and device for storing data
CN103678144A (en) Data storage device and flash memory control method
CN105373487B (en) The scrap cleaning method and system of a kind of storage program area
US20120096213A1 (en) Cache memory device, cache memory control method, program and integrated circuit
CN111930301A (en) Garbage recycling optimization method and device, storage medium and electronic equipment
CN109558333B (en) Solid state storage device namespaces with variable additional storage space
CN108874324A (en) A kind of access request processing method, device, equipment and readable storage medium storing program for executing
CN114996173A (en) Method and device for managing write operation of storage equipment
CN103677893B (en) Method for reducing size of image file of starting up and arithmetic device
CN104408126B (en) A kind of persistence wiring method of database, device and system
CN110032340A (en) A kind of data in magnetic disk management method and relevant apparatus
CN110941436A (en) Data storage method and device of application program, storage medium and terminal equipment
CN115934579A (en) Solid state disk garbage recycling method, accelerating device, equipment and computer medium
CN109710187A (en) Read command accelerated method, device, computer equipment and the storage medium of NVMe SSD main control chip
CN115543859A (en) Wear leveling optimization method, device, equipment and medium for multi-partition SSD
CN110658999B (en) Information updating method, device, equipment and computer readable storage medium
CN113867624A (en) Data writing method and device, readable storage medium and electronic equipment
CN109840217B (en) Cache resource allocation and device

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