CN115756341B - Garbage recycling method and device for solid state disk, electronic equipment and storage medium - Google Patents

Garbage recycling method and device for solid state disk, electronic equipment and storage medium Download PDF

Info

Publication number
CN115756341B
CN115756341B CN202310028731.6A CN202310028731A CN115756341B CN 115756341 B CN115756341 B CN 115756341B CN 202310028731 A CN202310028731 A CN 202310028731A CN 115756341 B CN115756341 B CN 115756341B
Authority
CN
China
Prior art keywords
node
data block
dirty data
small root
heap
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
CN202310028731.6A
Other languages
Chinese (zh)
Other versions
CN115756341A (en
Inventor
杨盼
王鑫
李子锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310028731.6A priority Critical patent/CN115756341B/en
Publication of CN115756341A publication Critical patent/CN115756341A/en
Application granted granted Critical
Publication of CN115756341B publication Critical patent/CN115756341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a garbage recovery method, a garbage recovery device, electronic equipment and a storage medium of a solid state disk, and relates to the technical field of information processing.

Description

Garbage recycling method and device for solid state disk, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a garbage collection method for a solid state disk, a garbage collection apparatus for a solid state disk, an electronic device, and a computer-readable storage medium.
Background
With the continuous development of computer technology and the explosive growth of various types of information, a hard Disk capable of storing a large amount of data gradually becomes an essential part in the life of people, wherein a Solid State Disk (SSD) is a mainstream hard Disk at present, and compared with a conventional hard Disk, because a flash memory is adopted as a storage medium, the read/write speed is faster, and no mechanical component is present inside the SSD, the shock-proof and anti-falling performance is better, and meanwhile, the hard Disk has the advantages of lower power consumption, smaller noise, lighter weight and the like, and is popular.
However, for the SSD, because the SSD uses the flash memory as the storage medium, on one hand, the number of times of erasing and writing of the SSD is limited, and on the other hand, when data is written into the SSD, due to the characteristics of the SSD itself, overwriting cannot be performed, and an erase-before-write method must be used, so that each time data is modified, one side is rewritten at a new position, and the data at the original position becomes invalid data, i.e. garbage data, so that as time goes on, the unused storage space in the SSD becomes less and less, which leads to a significant performance degradation. In the garbage recycling process of the SSD, the recycling efficiency (the spatial recycling rate) is considered, the solid state disk is ensured to be capable of rapidly and continuously providing idle blocks, and meanwhile, the wear times (the wear balance of the whole disk and the wear times of a single Block) are also considered so as to ensure the service life of the solid state disk, so that the selection of the Block plays a vital role in the performance and the service life of the solid state disk.
At present, there may be multiple luns (logical units) in an SSD, each Lun may store an array of a priority chain table, and may record a minimum priority value in each Lun in an RBM (Reclaim Block Manager), and when a Block is full, calculate a priority of the Block and insert the Block into a priority chain table corresponding to the Lun, and when the Block number of a Lun in the SSD reaches a threshold, garbage reclamation may be triggered.
Disclosure of Invention
The embodiment of the invention provides a garbage collection method and device of a solid state disk, electronic equipment and a computer readable storage medium, and aims to solve or partially solve the problems of large occupied space and low collection efficiency of an array linked list in the garbage collection of the existing solid state disk.
The embodiment of the invention discloses a garbage recycling method for a solid state disk, which comprises the following steps:
acquiring a first small root heap and a second small root heap corresponding to a logic unit in a solid state disk, wherein the first small root heap corresponds to at least one first dirty data block with an effective data proportion smaller than a preset effective data proportion in the logic unit, and the second small root heap corresponds to at least one second dirty data block with an effective data proportion larger than or equal to the preset effective data proportion in the logic unit;
if the first small root heap is empty, selecting a target dirty data block from at least one second dirty data block according to the second small root heap;
if the first small root heap is not empty, selecting a target dirty data block from at least one first dirty data block according to the first small root heap;
and performing garbage collection on the target dirty data block.
Optionally, the second small root heap at least includes a first root node, where the first root node corresponds to a second dirty data block with a smallest recycling priority value in the second small root heap, and if the first small root heap is empty, selecting a target dirty data block from at least one of the second dirty data blocks according to the second small root heap, including:
and if the first small root heap is empty, determining a second dirty data block corresponding to the first root node as a target dirty data block.
Optionally, the second small root heap includes at least a first parent node, and after the determining a second dirty data block corresponding to the first root node as a target dirty data block, the method further includes:
if the first father node has a corresponding first left child node and the first father node has a corresponding first right child node, comparing values corresponding to the first father node, the first left child node and the first right child node;
when the numerical value corresponding to the first left child node is minimum, exchanging the numerical values of the first father node and the first left child node;
when the numerical value corresponding to the first right child node is minimum, exchanging the numerical values of the first father node and the first right child node;
and when the value corresponding to the first parent node is minimum, ending the value exchange operation.
Optionally, the method further comprises:
if the first father node has a corresponding first left child node and the first father node does not have a corresponding first right child node, comparing the values of the first father node and the first left child node;
when the value corresponding to the first left child node is smaller than the value corresponding to the first parent node, exchanging the values of the first parent node and the first left child node;
and when the numerical value corresponding to the first parent node is smaller than the numerical value corresponding to the first left child node, ending the numerical value exchange operation.
Optionally, the method further comprises:
and if the first father node does not have the corresponding first left child node, taking the first father node as a new root node.
Optionally, after the determining the second dirty data block corresponding to the first root node as the target dirty data block, the method further includes:
and if the second small root heap does not have a tail node after the second dirty data block corresponding to the first root node is selected as the target dirty data block, determining that the second small root heap is empty.
Optionally, the first small root heap at least includes a second root node, where the second root node corresponds to a first dirty data block with a smallest reclamation priority value in the first small root heap, and if the first small root heap is not empty, selecting a target dirty data block from at least one first dirty data block according to the first small root heap, including:
and if the first small root heap is not empty, determining a first dirty data block corresponding to the second root node as a target dirty data block.
Optionally, the first stub includes at least a second parent node, and after the determining the first dirty data block corresponding to the second root node as the target dirty data block, the method further includes:
if the second father node has a corresponding second left child node and the second father node has a corresponding second right child node, comparing values corresponding to the second father node, the second left child node and the second right child node;
when the value corresponding to the second left child node is minimum, exchanging the values of the second father node and the second left child node;
when the value corresponding to the second right child node is minimum, exchanging the values of the second father node and the second right child node;
and when the value corresponding to the second parent node is minimum, ending the value exchange operation.
Optionally, the method further comprises:
if the second father node has a corresponding second left child node and the second father node does not have a corresponding second right child node, comparing the values of the second father node and the second left child node;
when the numerical value corresponding to the second Zuo Zijie point is smaller than the numerical value corresponding to the second parent node, exchanging the numerical values of the second parent node and the second left child node;
and when the numerical value corresponding to the second parent node is smaller than the numerical value corresponding to the second left child node, ending the numerical value exchange operation.
Optionally, the method further comprises:
and if the second father node does not have a corresponding second left child node, taking the second father node as a new root node.
Optionally, after the determining the first dirty data block corresponding to the second root node as the target dirty data block, the method further includes:
and if the first dirty data block corresponding to the second root node is selected as the target dirty data block and no tail node exists in the first small root heap, determining that the first small root heap is empty.
Optionally, the method further comprises:
when the logic unit obtains a third dirty data block, the third dirty data block represents a dirty data block of newly added full data in the solid state disk;
linking the third dirty data block to the first small root heap if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion;
and linking the third dirty data block to the second small root heap if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion.
Optionally, if the valid data proportion of the third dirty data block is smaller than the preset valid data proportion, linking the third dirty data block to the first small root heap includes:
and if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion, adding a first new node behind the tail node of the first small root heap, and linking the third dirty data block to the first new node.
Optionally, after said linking the third dirty data block to the first incremental node, the method further comprises:
acquiring a third father node corresponding to the first newly added node, and exchanging the values of the third father node and the first newly added node if the value corresponding to the first newly added node is smaller than the value corresponding to the third father node;
and if the numerical value corresponding to the first newly-added node is larger than the numerical value corresponding to the third father node, ending the numerical value exchange operation.
Optionally, if the valid data proportion of the third dirty data block is greater than or equal to the preset valid data proportion, linking the third dirty data block to the second small root heap, including:
and if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion, adding a second newly added node behind the tail node of the second small root heap, and linking the third dirty data block to the second newly added node.
Optionally, after the linking the third dirty data block to the second newly added node, the method further comprises:
acquiring a fourth father node corresponding to the second newly added node, and exchanging the values of the fourth father node and the second newly added node if the value corresponding to the second newly added node is smaller than the value corresponding to the fourth father node;
and if the numerical value corresponding to the second newly-added node is larger than the numerical value corresponding to the fourth father node, ending the numerical value exchange operation.
Optionally, the solid state disk includes multiple logic units, and before the obtaining of the first stub stack and the second stub stack corresponding to the logic unit in the solid state disk, the method further includes:
responding to a small root heap creation operation aiming at each logic unit in the solid state disk, and respectively establishing a first small root heap and a second small root heap corresponding to each logic unit;
linking at least one first dirty data block with a valid data ratio smaller than the preset valid data ratio in the logic unit to the first small root heap;
linking at least one second dirty data block in the logical unit having a valid data fraction greater than or equal to the preset valid data fraction to the second small root heap.
Optionally, the linking, to the first small root heap, at least one first dirty data block in the logical unit, whose valid data proportion is smaller than the preset valid data proportion, includes:
and taking at least one dirty data block with the effective data ratio smaller than the preset effective data ratio in the logic unit as a first dirty data block, and linking each first dirty data block to the first small root heap according to the recycling priority value from small to large.
Optionally, the linking, to the second small root heap, at least one second dirty data block in the logical unit, whose valid data proportion is greater than or equal to the preset valid data proportion, includes:
and taking at least one dirty data block with the effective data ratio larger than or equal to the preset effective data ratio in the logic unit as a second dirty data block, and linking each second dirty data block to the second small root heap according to the recycling priority value from small to large.
The embodiment of the invention also discloses a garbage recycling device of the solid state disk, which comprises:
the system comprises a small root pile acquisition module, a first small root pile and a second small root pile, wherein the first small root pile and the second small root pile correspond to a logic unit in the solid state disk, the first small root pile corresponds to at least one first dirty data block of which the effective data proportion in the logic unit is smaller than a preset effective data proportion, and the second small root pile corresponds to at least one second dirty data block of which the effective data proportion in the logic unit is larger than or equal to the preset effective data proportion;
a second target dirty data block obtaining module, configured to select a target dirty data block from at least one second dirty data block according to the second small root heap if the first small root heap is empty;
a first target dirty data block obtaining module, configured to select a target dirty data block from at least one first dirty data block according to the first small root heap if the first small root heap is not empty;
and the garbage recovery module is used for performing garbage recovery on the target dirty data block.
Optionally, the second small root heap at least includes a first root node, the first root node corresponds to a second dirty data block with a smallest recycling priority value in the second small root heap, and the second target dirty data block obtaining module is configured to:
and if the first small root heap is empty, determining a second dirty data block corresponding to the first root node as a target dirty data block.
Optionally, the second small root heap includes at least a first parent node, and the apparatus further includes:
a first node value comparison module, configured to compare values corresponding to the first parent node, the first left child node, and the first right child node if the first parent node has a corresponding first left child node and the first parent node has a corresponding first right child node;
the first node numerical value exchange module is specifically configured to:
when the numerical value corresponding to the first left child node is minimum, exchanging the numerical values of the first father node and the first left child node;
when the numerical value corresponding to the first right child node is minimum, exchanging the numerical values of the first father node and the first right child node;
and when the value corresponding to the first parent node is minimum, ending the value exchange operation.
Optionally, the first node value comparing module is further specifically configured to:
if the first father node has a corresponding first left child node and the first father node does not have a corresponding first right child node, comparing the values of the first father node and the first left child node;
the first node numerical value exchange module is further specifically configured to:
when the value corresponding to the first left child node is smaller than the value corresponding to the first parent node, exchanging the values of the first parent node and the first left child node;
and when the numerical value corresponding to the first parent node is smaller than the numerical value corresponding to the first left child node, ending the numerical value exchange operation.
Optionally, the apparatus further comprises:
and the first root node determining module is used for taking the first father node as a new root node if the first father node does not have the corresponding first left child node.
Optionally, the apparatus further comprises:
and the second small root heap determining module is used for determining that the second small root heap is empty if a tail node does not exist in the second small root heap after the second dirty data block corresponding to the first root node is selected as the target dirty data block.
Optionally, the first small root heap includes at least a second root node, where the second root node corresponds to a first dirty data block with a smallest recycle priority value in the first small root heap, and the first target dirty data block obtaining module is configured to:
and if the first small root heap is not empty, determining a first dirty data block corresponding to the second root node as a target dirty data block.
Optionally, the first stub includes at least a second parent node, and the apparatus further includes:
a second node value comparison module, configured to compare values corresponding to the second parent node, the second left child node, and the second right child node if the second parent node has a corresponding second left child node and the second parent node has a corresponding second right child node;
the second node numerical value exchange module is specifically configured to:
when the numerical value corresponding to the second left child node is minimum, exchanging the numerical values of the second father node and the second left child node;
when the numerical value corresponding to the second right child node is minimum, exchanging the numerical values of the second father node and the second right child node;
and when the value corresponding to the second parent node is minimum, ending the value exchange operation.
Optionally, the second node value comparing module is further specifically configured to:
if the second father node has a corresponding second left child node and the second father node does not have a corresponding second right child node, comparing the values of the second father node and the second left child node;
the second node numerical value exchange module is further specifically configured to:
when the numerical value corresponding to the second Zuo Zijie point is smaller than the numerical value corresponding to the second parent node, exchanging the numerical values of the second parent node and the second left child node;
and when the value corresponding to the second father node is smaller than the value corresponding to the second left child node, ending the value exchange operation.
Optionally, the apparatus further comprises:
and the second root node determining module is used for taking the second father node as a new root node if the second father node does not have a corresponding second left child node.
Optionally, the apparatus further comprises:
and the first small root heap empty determination module is used for determining that the first small root heap is empty if a tail node does not exist in the first small root heap after the first dirty data block corresponding to the second root node is selected as the target dirty data block.
Optionally, the apparatus further comprises:
a third dirty data block obtaining module, configured to, when the logic unit obtains a third dirty data block, obtain a third dirty data block that indicates a dirty data block of newly added full data in the solid state disk;
a third dirty data block linking module to:
linking the third dirty data block to the first small root heap if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion;
and if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion, linking the third dirty data block to the second small root heap.
Optionally, the third dirty data block linking module includes:
and the first newly-added node linking module is used for adding a first newly-added node behind the tail node of the first small root heap and linking the third dirty data block to the first newly-added node if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion.
Optionally, the apparatus further includes a third father node comparing module, where the third father node comparing module is specifically configured to:
acquiring a third father node corresponding to the first newly added node, and exchanging the values of the third father node and the first newly added node if the value corresponding to the first newly added node is smaller than the value corresponding to the third father node;
and if the value corresponding to the first newly-added node is greater than the value corresponding to the third father node, ending the value exchange operation.
Optionally, the third dirty data block linking module includes:
and the first newly-added node linking module is used for adding a second newly-added node behind the tail node of the second small root heap and linking the third dirty data block to the second newly-added node if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion.
Optionally, the apparatus further includes a fourth father node comparing module, where the fourth father node comparing module is specifically configured to:
acquiring a fourth father node corresponding to the second newly added node, and exchanging the values of the fourth father node and the second newly added node if the value corresponding to the second newly added node is smaller than the value corresponding to the fourth father node;
and if the numerical value corresponding to the second newly-added node is larger than the numerical value corresponding to the fourth father node, ending the numerical value exchange operation.
Optionally, the solid state disk includes a plurality of logic units, and the apparatus further includes:
the small root heap creating module is used for responding to small root heap creating operation aiming at each logic unit in the solid state disk and respectively establishing a first small root heap and a second small root heap corresponding to each logic unit;
a first dirty data block linking module, configured to link at least one first dirty data block in the logical unit, where an effective data proportion is smaller than the preset effective data proportion, to the first small root heap;
and the second dirty data block linking module is used for linking at least one second dirty data block of which the effective data proportion is greater than or equal to the preset effective data proportion in the logic unit to the second small root heap.
Optionally, the first dirty data block linking module is specifically configured to:
and taking at least one dirty data block with the effective data ratio smaller than the preset effective data ratio in the logic unit as a first dirty data block, and linking each first dirty data block to the first small root heap according to the recycling priority value from small to large.
Optionally, the second dirty data block linking module is specifically configured to:
and taking at least one dirty data block with the effective data ratio larger than or equal to the preset effective data ratio in the logic unit as a second dirty data block, and linking each second dirty data block to the second small root heap according to the recycling priority value from small to large.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Also disclosed is a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform a method according to an embodiment of the invention.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, a garbage collection method of a solid state disk is provided, which includes the steps of firstly obtaining a first small root heap and a second small root heap corresponding to a logic unit in the solid state disk, wherein the first small root heap corresponds to at least one first dirty data block with an effective data ratio smaller than a preset effective data ratio in the logic unit, the second small root heap corresponds to at least one second dirty data block with an effective data ratio larger than or equal to the preset effective data ratio in the logic unit, if the first small root heap is empty, selecting a target dirty data block from the at least one second dirty data block according to the second small root heap, if the first small root heap is not empty, selecting the target dirty data block from the at least one first dirty data block according to the first small root heap, and then performing garbage collection on the target dirty data block, so that in a garbage collection process, the priority of the dirty data block can be stored and managed by using a data structure of the small root heap, no additional memory space is occupied, and the small root heap with a small effective data ratio can be preferentially selected each time when the dirty data block is selected, thereby improving the cold collection efficiency and avoiding the storm data collection.
Drawings
FIG. 1 is a schematic flow chart of acquiring dirty data blocks in a garbage collection method of a current solid state disk;
fig. 2 is a flowchart illustrating steps of a garbage collection method for a solid state disk according to an embodiment of the present invention;
fig. 3 is a schematic view of a node sinking operation flow of a small root heap in the garbage recycling method for a solid state disk according to the embodiment of the present invention;
fig. 4 is a schematic diagram of a node floating operation flow of a small root heap in the garbage collection method for a solid state disk according to the embodiment of the present invention;
fig. 5 is a schematic flowchart of a garbage collection method for a solid state disk according to an embodiment of the present invention;
fig. 6 is a block diagram of a garbage collection apparatus for a solid state disk according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a computer-readable medium provided in an embodiment of the invention;
fig. 8 is a block diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, some technical features related to the embodiments of the present invention are explained and explained below:
dirty data block: a data block indicating the presence of erroneous data and/or conflicting data may refer to a data block in the SSD that may be garbage recycled as needed.
Garbage Collection (GC): garbage collection of SSD refers to migrating a valid page of a physical block full of data to a new free block, and erasing an old data block, where the original data block becomes a free block after being erased and can be used to write data again.
Heap (Heap): one particular type of data structure in computer science is the most efficient priority queue, and a heap is usually an array object that can be viewed as a complete binary tree, with each node on the tree corresponding to an element in the array. The tree is completely full except for the bottom-most layer, and array A, which represents a heap, typically has two attributes: length represents the size of the array and size represents how many heap element numbers are present in the array. That is, there may be arrays in array A of the heap that are all stored but only a portion of the valid data in the heap. 1< = A.length < = A.size, the root node of the heap, namely the root node of the binary tree is A [1], and given a node subscript i, array subscripts of a parent node and left and right child nodes can be calculated, wherein the subscript of the parent node is i/2, and the array subscripts are rounded down, namely the value of i is shifted to the right by one bit in the computer, the subscript of the left child node is 2i, namely the value of i is shifted to the left by one bit in the computer, and the subscript of the right child node is 2i +1, namely the value of i is shifted to the left by one bit in the computer and is added with one. When each node of a binary tree is greater than or equal to two child nodes, the binary tree is called heap order. Correspondingly, in the binary tree with ordered heap, each node is less than or equal to its father node, a column of non-decreasing elements can be obtained from any node upwards, and a column of non-increasing elements can be obtained from any node downwards. The root node is the largest node in the binary tree of heap order. Therefore, in a binary tree with ordered stacks, the position of the father node is K/2, and the positions of the corresponding two child nodes are 2K,2K +1 respectively, so that different elements can be obtained in the array through the change of the index.
Small root heap: the small root heap is a kind of heap, and is a sort complete binary tree, and except that all characteristics in the heap are satisfied, the data value of any non-terminal node is not greater than the values of the left child node and the right child node. The small stub has many advantages, and uses no extra space, because garbage reclamation selects the dirty data block with the smallest priority value every time, so the time complexity of each time is O (1) (the lowest space-time complexity, namely the time consumption/space consumption is independent of the size of the input data, no matter how many times the input data is increased, the time consumption/space consumption is unchanged), and the maintenance time complexity of each small stub is O (logn). In the invention, small root heaps are used for realizing the storage and management of the priority of each fully written dirty data block, two small root heaps can be established in each Lun (logical unit), in order to cope with a cold data moving storm, one of the small root heaps is correspondingly linked to the dirty data block with the effective data ratio smaller than the preset effective data ratio and is marked as a first small root heap, the other small root heap is correspondingly linked to the dirty data block with the effective data ratio larger than or equal to the preset effective data ratio and is marked as a second small root heap, and fine adjustment calculation of the priority value is not needed. When the dirty data blocks are selected in garbage collection, only the dirty data blocks of the root nodes need to be obtained from the first small root heap, if the cold data written into the SSD is more, the first small root heap is empty due to the fact that the effective data proportion of the common dirty data blocks is larger, the dirty data blocks of the root nodes are obtained from the second small root heap, and then the small root heap is maintained.
As an example, in the garbage collection process of the SSD, not only the collection efficiency (the space collection rate) but also the solid state disk is ensured to provide the free blocks quickly and continuously, and the wear times (the wear balance of the whole disk and the wear times of a single Block) are also considered to ensure the service life of the solid state disk, so that the selection of the Block plays a crucial role in both performance and service life of the solid state disk.
At present, there may be multiple luns (logical units) in an SSD, each Lun may store an array of a priority link list, and may record a minimum priority value in each Lun in an RBM (resource Block Manager), and when a Block is full, calculate a priority of the Block and insert the Block into a priority link list corresponding to the Lun, and when the Block number of a Lun in the SSD reaches a threshold, garbage collection may be triggered.
To better illustrate, as shown in fig. 1, a schematic flow chart of obtaining dirty data blocks in a garbage collection method of a current solid state disk is shown, in an SSD, each Lun stores an array of a priority chain table, an index of the array is a priority of a data Block under the chain table, and a minimum priority value in each Lun is recorded in an RBM (recycling Block Manager). Each time a block is full, the priority of the block is calculated, inserted into the linked list of priorities corresponding to luns, and saved as the one that will be smaller than the minimum priority value of the current Lun.
The priority is simply calculated as: p = X/a + Y abs (Y)/b + c
Wherein, X is VDFC (Valid Data Frame Count) of the dirty Data block, Y is a difference between the number of times of the old Data block PE (Program and Erase, programming and erasing of the physical block) and the average PE number, Y is a negative value when Y is lower than the average PE, a positive value when Y is higher than the average PE, a zero value when Y is equal to the average PE, 1/a and 1/b are weighting coefficients of VDFC and PE, respectively, and c is offset.
Figure DEST_PATH_IMAGE001
In order to cope with a cold data migration storm, namely, frequently recovering data blocks with larger VDFC, smaller PE and smaller P value, the P value is finely adjusted according to parity.
Specifically, the minimum priority value of a Lun is read from the RBM, a GC is triggered when the remaining free data blocks of the Lun in the SSD reach a threshold, the GC acquires the minimum priority value of the current Lun from a WM (Write Manager, data Write module), finds a corresponding linked list from a priority array of the Lun according to the value, and acquires a GC source data block from the linked list; and if the linked list is empty, selecting the next linked list according to the priority.
According to the method for garbage recovery, firstly, the GC source data block is slow to select, when the linked list in the minimum priority value is empty, the GC source data block can be found only by traversing the whole array, the GC efficiency is affected, secondly, in the aspect of managing the fully written data blocks, each Lun stores an array linked list with a large length, and meanwhile, the RBM also needs to record the occupied space of the minimum priority value of each Lun, so that a large amount of space is occupied.
In view of this, one of the core inventions of the embodiment of the present invention is: a garbage recovery method of a solid state disk is provided, first of all, a first small root heap and a second small root heap corresponding to logic units in the solid state disk are obtained, wherein the first small root heap corresponds to at least one first dirty data block with an effective data proportion smaller than a preset effective data proportion in the logic units, the second small root heap corresponds to at least one second dirty data block with an effective data proportion larger than or equal to the preset effective data proportion in the logic units, if the first small root heap is empty, a target dirty data block is selected from the at least one second dirty data block according to the second small root heap, if the first small root heap is not empty, the target dirty data block is selected from the at least one first dirty data block according to the first small root heap, and garbage recovery is performed on the target dirty data block.
Referring to fig. 2, a flowchart illustrating steps of a garbage collection method for a solid state disk provided in an embodiment of the present invention is shown, which specifically includes the following steps:
step 201, obtaining a first small root heap and a second small root heap corresponding to a logic unit in a solid state disk, where the first small root heap corresponds to at least one first dirty data block in the logic unit whose effective data proportion is smaller than a preset effective data proportion, and the second small root heap corresponds to at least one second dirty data block in the logic unit whose effective data proportion is greater than or equal to the preset effective data proportion;
specifically, before garbage collection is performed, a first small root heap and a second small root heap corresponding to a logic unit in the solid state disk may be obtained, where an effective data proportion in the logic unit corresponding to the first small root heap is smaller than at least one first dirty data block of a preset effective data proportion, and an effective data proportion in the logic unit corresponding to the second small root heap is greater than or equal to at least one second dirty data block of the preset effective data proportion, so that by obtaining the small root heap corresponding to the logic unit, selection operation may be performed on elements in the small root heap in a subsequent garbage collection process, and thus dirty data blocks for garbage collection are selected.
As an optional embodiment, the solid state disk may include a plurality of logic units, for example, a solid state disk may include 16 or 32 logic units, two small root heaps may be respectively established for each logic unit in the solid state disk, where one small root heap is used to link at least one dirty data block whose effective data ratio is smaller than a preset effective data ratio, and the other small root heap is used to link at least one dirty data block whose effective data ratio is greater than or equal to the preset effective data ratio.
As an alternative embodiment, the linking at least one first dirty data block with a valid data ratio smaller than a preset valid data ratio in the logical unit to the first small root heap may be: and taking at least one dirty data block with the effective data proportion smaller than the preset effective data proportion in the logic unit as a first dirty data block, and linking each first dirty data block to the first small root heap according to the recycling priority values from small to large.
Meanwhile, at least one second dirty data block with the valid data proportion greater than or equal to the preset valid data proportion in the logic unit is linked to the second small root heap, and the linking may be: at least one dirty data block with the effective data proportion larger than or equal to the preset effective data proportion in the logic unit is used as a second dirty data block, and each second dirty data block is linked to the second small root heap according to the recovery priority value from small to large, so that each dirty data block in the solid state disk is linked to the corresponding small root heap by using the garbage recovery priority as the link sequence, when garbage recovery is needed, the small root heap can be directly called, quick selection of the dirty data block is achieved, and the garbage recovery efficiency is improved.
Step 202, if the first small root heap is empty, selecting a target dirty data block from at least one second dirty data block according to the second small root heap;
in an actual situation, when a dirty data block is selected in garbage collection, only the dirty data block of a root node needs to be acquired from a first small root heap, if cold data written into an SSD is more, and the first small root heap is empty due to a large effective data occupation ratio of the general dirty data block, the dirty data block of the root node is acquired from a second small root heap, specifically, if the first small root heap is empty, a target dirty data block is selected from at least one second dirty data block according to the second small root heap, so that even if the first small root heap is empty, the target dirty data block can be selected from the second small root heap for garbage collection.
Specifically, the second small root heap may include at least a first root node, where the first root node corresponds to a second dirty data block with a smallest recycling priority value in the second small root heap, and if the first small root heap is empty, the target dirty data block is selected from the at least one second dirty data block according to the second small root heap, where the target dirty data block may be: and if the first small root heap is empty, determining a second dirty data block corresponding to the first root node as a target dirty data block.
As an optional embodiment, the second stub at least includes a first parent node, and after the second dirty data block corresponding to the first root node is determined as the target dirty data block, the second stub may be maintained, that is, a node sinking operation of the stub is performed, specifically, if the first parent node has a corresponding first left child node and the first parent node has a corresponding first right child node, values corresponding to the first parent node, the first left child node, and the first right child node are compared, when the value corresponding to the first left child node is minimum, the values corresponding to the first parent node and the first left child node are exchanged, when the value corresponding to the first right child node is minimum, the values corresponding to the first parent node and the first right child node are exchanged, and when the value corresponding to the first parent node is minimum, the value exchange operation is ended, thereby completing the node sinking operation of the second stub, so that when a next time of garbage collection is performed, the second dirty data block corresponding to the minimum second stub may still be selected as the target dirty data block, and the garbage collection operation is performed.
As an optional embodiment, if the first parent node has a corresponding first left child node, and the first parent node has no corresponding first right child node, comparing values corresponding to the first parent node and the first left child node, exchanging the values of the first parent node and the first left child node when the value corresponding to the first left child node is smaller than the value corresponding to the first parent node, and ending the value exchanging operation when the value corresponding to the first parent node is smaller than the value corresponding to the first left child node, thereby completing the node sinking operation for the second small root heap, so that when performing the next garbage collection, the second dirty data block corresponding to the smallest value in the second small root heap can still be selected as the target dirty data block for performing the garbage collection.
As an alternative embodiment, if the first parent node does not have the corresponding first left child node, the first parent node is taken as a new root node.
Further, after the second dirty data block corresponding to the first root node is determined as the target dirty data block, if there is no tail node in the second small root heap, it may be determined that the second small root heap is empty, and there is no second dirty data block whose effective data ratio is greater than or equal to the preset effective data ratio in the logic unit.
Step 203, if the first small root heap is not empty, selecting a target dirty data block from at least one first dirty data block according to the first small root heap;
in a specific implementation, if the first small root heap is not empty, the target dirty data block is selected from the at least one first dirty data block according to the first small root heap, so that when performing garbage collection, a dirty data block with a smaller effective data occupation can be preferentially selected for garbage collection.
Specifically, the first small root heap at least includes a second root node, where the second root node corresponds to a first dirty data block with a smallest recycling priority value in the first small root heap, and if the first small root heap is not empty, a target dirty data block is selected from at least one first dirty data block according to the first small root heap, where the target dirty data block may be: and if the first small root heap is not empty, determining a first dirty data block corresponding to the second root node as a target dirty data block.
As an optional embodiment, the first stub at least includes a second parent node, and after the first dirty data block corresponding to the second root node is determined as the target dirty data block, the first stub may be maintained, that is, a node sinking operation of the stub is performed, specifically, if the second parent node exists in the corresponding second left child node, and the second parent node exists in the corresponding second right child node, values corresponding to the second parent node, the second left child node, and the second right child node are compared, when the value corresponding to the second left child node is minimum, the values corresponding to the second parent node and the second left child node are exchanged, when the value corresponding to the second right child node is minimum, the values corresponding to the second parent node and the second right child node are exchanged, and when the value corresponding to the second parent node is minimum, the value exchange operation is ended, thereby completing the node sinking operation of the first stub, so that when a next time of recycling is performed, the first dirty data block corresponding to the minimum value in the first stub may still be selected as the target dirty data block, and garbage is recycled.
As an optional embodiment, if the second parent node has a corresponding second left child node, and the second parent node does not have a corresponding second right child node, comparing values corresponding to the second parent node and the second left child node, when the value corresponding to the second Zuo Zijie is smaller than the value corresponding to the second parent node, exchanging the values of the second parent node and the second left child node, and when the value corresponding to the second parent node is smaller than the value corresponding to the second left child node, ending the value exchanging operation, thereby completing the node sinking operation for the first small root heap, so that when performing the next garbage recovery, the first dirty data block corresponding to the smallest value in the first small root heap can still be selected as the target dirty data block for garbage recovery.
As an optional embodiment, if there is no corresponding second left child node in the second parent node, the second parent node is taken as a new root node.
Further, after the first dirty data block corresponding to the second root node is determined as the target dirty data block, if there is no tail node in the first small root heap, it may be determined that the first small root heap is empty, and there is no first dirty data block with an effective data ratio smaller than a preset effective data ratio in the logic unit.
For example, referring to fig. 3, a schematic flow diagram of a node sinking operation of a small root heap in the garbage collection method for a solid state disk provided in the embodiment of the present invention is shown, where the node sinking operation of the small root heap may be applied to a first small root heap and a second small root heap, and it is to be understood that the present invention is not limited to this.
After the root node of the small root heap is selected as the target dirty data block, the small root heap loses one node at the moment, and the target dirty data block is an approximately complete binary tree according to the characteristics of the small root heap, so that the small root heap actually lacks a tail node, the tail node in the heap can be transferred to the position of the root node, the small root heap structure can be maintained according to the method because a father node in the small root heap is smaller than a child node in total, and if the tail node does not exist, the small root heap is empty, and the node sinking operation is finished.
And after the tail node in the heap is transferred to the position of the root node, setting the subscript of the father node as i, judging whether a left child node of the father node exists or not, filling the small root heap from left to right, and if the left child node does not exist, judging that a right child node does not exist, and ending node sinking operation.
If the left child node exists, judging whether the right child node exists, if the right child node exists, comparing values of the father node and the left child node, and if the left child node is the minimum, exchanging the values of the father node and the left child node, wherein i =2i, and repeating until the value of the father node is the minimum.
If the right child node is minimum, the values of the parent node and the right node are exchanged, i =2i +1, and the process is repeated until the value of the parent node is minimum.
And if the parent node is minimum, finishing the node sinking operation.
Similarly, if the right child node does not exist, the values of the parent node and the left child node are only needed to be compared, a small value is selected as a new parent node, a large value is selected as a child node, and because the heap is an approximately complete binary tree, only the last layer of the heap has the situation of not being filled, the left child node is the last layer of the heap under the situation, the left child node does not have the child node, and heap maintenance is finished.
And 204, performing garbage collection on the target dirty data block.
After the target dirty data block is determined from the first small root heap or the second small root heap, garbage collection can be performed on the target dirty data block to achieve garbage collection on the solid state disk.
As an optional embodiment, in addition to the selection of the dirty data block that needs to be garbage-recovered through the selection operation on the small stub, the newly added dirty data block that is full of data may be linked to the small stub, so that when the solid-state disk needs to be garbage-recovered, the newly added dirty data block is taken as one of the selection objects.
Specifically, when the logic unit acquires a third dirty data block, where the third dirty data block represents a dirty data block of full data newly added in the solid state disk, if an effective data proportion of the third dirty data block is smaller than a preset effective data proportion, the third dirty data block is linked to the first small root heap, and if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion, the third dirty data block is linked to the second small root heap, so that the dirty data block can be linked to the corresponding small root heap according to the effective data proportion of the dirty data block.
Further, if the valid data occupancy of the third dirty data block is smaller than the preset valid data occupancy, linking the third dirty data block to the first small root heap may be: and if the effective data occupation ratio of the third dirty data block is smaller than the preset effective data occupation ratio, adding a first newly added node behind the tail node of the first small root heap, and linking the third dirty data block to the first newly added node.
After the third dirty data block is linked to the first newly added node, if the node value corresponding to the third dirty data block is smaller than the corresponding parent node, the node floating operation may be further performed on the first stub, specifically, the third parent node corresponding to the first newly added node may be obtained, if the value corresponding to the first newly added node is smaller than the value corresponding to the third parent node, the values of the third parent node and the first newly added node are exchanged, and if the value corresponding to the first newly added node is larger than the value corresponding to the third parent node, the value exchange operation is ended, thereby completing the maintenance operation on the first stub, and ensuring that the root node value in the first stub is minimum.
Similarly, if the valid data proportion of the third dirty data block is greater than or equal to the preset valid data proportion, linking the third dirty data block to the second small root heap may be: and if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion, adding a second new node behind the tail node of the second small root heap, and linking the third dirty data block to the second new node.
After the third dirty data block is linked to the second newly added node, if the node value corresponding to the third dirty data block is smaller than the corresponding parent node, a node floating operation may be performed on the second small root heap, specifically, a fourth parent node corresponding to the second newly added node may be obtained, if the value corresponding to the second newly added node is smaller than the value corresponding to the fourth parent node, the values of the fourth parent node and the second newly added node are exchanged, and if the value corresponding to the second newly added node is larger than the value corresponding to the fourth parent node, the value exchange operation is ended, thereby completing the maintenance operation on the second small root heap, and ensuring that the root node value in the second small root heap is minimum.
For example, referring to fig. 4, a schematic flow chart of a node floating operation of a small root heap in a garbage collection method of a solid state disk provided in an embodiment of the present invention is shown, where the node floating operation of the small root heap may be applied to a first small root heap and a second small root heap, and it is understood that the present invention is not limited thereto.
Firstly, inserting a new node behind the tail node of the small root heap, linking a newly added third dirty data block to the new node, wherein the subscript of the node can be set as i, then comparing the value of the i node with the value of the parent node of the i node, if the value of the parent node is smaller, finishing the node floating operation of the small root heap, finishing heap maintenance, otherwise exchanging the value of the node with the value of the parent node, i = i >1, i/2 rounding down, repeating the node value comparison operation until finishing or the value of i is 1, and thus linking the newly added dirty data block with full data to the small root heap so as to take the newly added dirty data block as one of the selected objects when the solid state disk needs to be subjected to garbage collection.
It should be noted that, the embodiments of the present invention include, but are not limited to, the above examples, and it can be understood that, under the guidance of the idea of the embodiments of the present invention, a person skilled in the art may also perform setting according to actual needs, and the present invention is not limited to this.
In the embodiment of the invention, a garbage recovery method of a solid state disk is provided, which includes the steps of firstly obtaining a first small root heap and a second small root heap corresponding to a logic unit in the solid state disk, wherein the first small root heap corresponds to at least one first dirty data block of which the effective data proportion in the logic unit is smaller than a preset effective data proportion, the second small root heap corresponds to at least one second dirty data block of which the effective data proportion in the logic unit is larger than or equal to the preset effective data proportion, if the first small root heap is empty, selecting a target dirty data block from the at least one second dirty data block according to the second small root heap, if the first small root heap is not empty, selecting the target dirty data block from the at least one first dirty data block according to the first small root heap, and then performing garbage recovery on the target dirty data block, so that in a garbage recovery process, priorities of the dirty data blocks can be stored and managed by using a data structure of the small root heap, no additional memory space is occupied, and when a dirty data block is selected preferentially, the small root heap can be migrated, and thus cold recovery efficiency is improved.
In order to make the technical solutions of the embodiments of the present invention better understood by those skilled in the art, the following is explained and illustrated by an example:
referring to fig. 5, a schematic flow diagram illustrating a garbage collection method for a solid state disk provided in an embodiment of the present invention is shown, where the solid state disk may include multiple logic units, each logic unit may correspond to a first small root heap and a second small root heap, where the first small root heap corresponds to at least one first dirty data block whose effective data proportion in the logic unit is smaller than a preset effective data proportion, and the second small root heap corresponds to at least one second dirty data block whose effective data proportion in the logic unit is greater than or equal to the preset effective data proportion, it should be noted that this example simply illustrates that only a target dirty data block is selected from the small root heap of the logic unit to perform garbage collection, and it should be understood that the present invention is not limited thereto.
1. Acquiring a first small root stack and a second small root stack in the logic unit, if the first small root stack is empty, executing the step 2, and if the first small root stack is not empty, executing the step 3;
2. acquiring a second dirty data block corresponding to the root node from a second small root heap as a target dirty data block, and performing node sinking operation on the second small root heap, which is not described herein again because detailed description is performed on the node sinking operation in the foregoing embodiment, and then performing step 4;
3. acquiring a first dirty data block corresponding to a root node from a first small root heap as a target dirty data block, and performing node sinking operation on the first small root heap, wherein detailed description of the node sinking operation is omitted in the foregoing embodiment, and then performing step 4;
4. and performing garbage collection on the target dirty data block, and ending.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 6, a block diagram of a structure of a garbage recycling apparatus for a solid state disk provided in an embodiment of the present invention is shown, and specifically, the garbage recycling apparatus may include the following modules:
a small root heap obtaining module 601, configured to obtain a first small root heap and a second small root heap corresponding to a logic unit in a solid state disk, where the first small root heap corresponds to at least one first dirty data block in the logic unit, where an effective data proportion of the first small root heap is smaller than a preset effective data proportion, and the second small root heap corresponds to at least one second dirty data block in the logic unit, where the effective data proportion of the second small root heap is greater than or equal to the preset effective data proportion;
a second target dirty data block obtaining module 602, configured to select a target dirty data block from at least one second dirty data block according to the second small root heap if the first small root heap is empty;
a first target dirty data block obtaining module 603, configured to select a target dirty data block from at least one first dirty data block according to the first small root heap if the first small root heap is not empty;
a garbage collection module 604, configured to perform garbage collection on the target dirty data block.
In an optional embodiment, the second small root heap includes at least a first root node, the first root node corresponds to a second dirty data block with a smallest recycling priority value in the second small root heap, and the second target dirty data block obtaining module 602 is configured to:
and if the first small root heap is empty, determining a second dirty data block corresponding to the first root node as a target dirty data block.
In an alternative embodiment, the second stub includes at least a first parent node, the apparatus further comprising:
a first node value comparison module, configured to compare values corresponding to the first parent node, the first left child node, and the first right child node if the first parent node has a corresponding first left child node and the first parent node has a corresponding first right child node;
the first node numerical value exchange module is specifically configured to:
when the value corresponding to the first left child node is minimum, exchanging the values of the first father node and the first left child node;
when the numerical value corresponding to the first right child node is minimum, exchanging the numerical values of the first father node and the first right child node;
and when the value corresponding to the first parent node is minimum, finishing the value exchange operation.
In an optional embodiment, the first node value comparing module is further specifically configured to:
if the first father node has a corresponding first left child node and the first father node does not have a corresponding first right child node, comparing the values of the first father node and the first left child node;
the first node numerical value exchange module is further specifically configured to:
when the value corresponding to the first left child node is smaller than the value corresponding to the first parent node, exchanging the values of the first parent node and the first left child node;
and when the numerical value corresponding to the first parent node is smaller than the numerical value corresponding to the first left child node, ending the numerical value exchange operation.
In an alternative embodiment, the apparatus further comprises:
and the first root node determining module is used for taking the first father node as a new root node if the first father node does not have the corresponding first left child node.
In an alternative embodiment, the apparatus further comprises:
and the second small root heap determining module is used for determining that the second small root heap is empty if a tail node does not exist in the second small root heap after a second dirty data block corresponding to the first root node is selected as a target dirty data block.
In an optional embodiment, the first stub includes at least a second root node, the second root node corresponds to a first dirty data block with a smallest reclamation priority value in the first stub, and the first target dirty data block obtaining module 603 is configured to:
and if the first small root heap is not empty, determining a first dirty data block corresponding to the second root node as a target dirty data block.
In an alternative embodiment, the first stub includes at least a second parent node, the apparatus further comprising:
a second node value comparison module, configured to compare values corresponding to the second parent node, the second left child node, and the second right child node if the second parent node has a corresponding second left child node and the second parent node has a corresponding second right child node;
the second node numerical value exchange module is specifically configured to:
when the numerical value corresponding to the second left child node is minimum, exchanging the numerical values of the second father node and the second left child node;
when the value corresponding to the second right child node is minimum, exchanging the values of the second father node and the second right child node;
and when the value corresponding to the second parent node is minimum, ending the value exchange operation.
In an optional embodiment, the second node value comparing module is further specifically configured to:
if the second father node has a corresponding second left child node and the second father node does not have a corresponding second right child node, comparing the values of the second father node and the second left child node;
the second node numerical value exchange module is further specifically configured to:
when the numerical value corresponding to the second Zuo Zijie point is smaller than the numerical value corresponding to the second parent node, exchanging the numerical values of the second parent node and the second left child node;
and when the numerical value corresponding to the second parent node is smaller than the numerical value corresponding to the second left child node, ending the numerical value exchange operation.
In an alternative embodiment, the apparatus further comprises:
and the second root node determining module is used for taking the second father node as a new root node if the second father node does not have a corresponding second left child node.
In an alternative embodiment, the apparatus further comprises:
and the first small root heap empty determination module is used for determining that the first small root heap is empty if a tail node does not exist in the first small root heap after the first dirty data block corresponding to the second root node is selected as the target dirty data block.
In an alternative embodiment, the apparatus further comprises:
a third dirty data block obtaining module, configured to, when the logic unit obtains a third dirty data block, where the third dirty data block represents a dirty data block of newly added full data in the solid state disk;
a third dirty data block linking module to:
linking the third dirty data block to the first small root heap if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion;
and if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion, linking the third dirty data block to the second small root heap.
In an optional embodiment, the third dirty data block linking module includes:
and the first newly-added node linking module is used for adding a first newly-added node behind the tail node of the first small root heap and linking the third dirty data block to the first newly-added node if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion.
In an optional embodiment, the apparatus further includes a third parent node comparing module, where the third parent node comparing module is specifically configured to:
acquiring a third father node corresponding to the first newly added node, and exchanging the values of the third father node and the first newly added node if the value corresponding to the first newly added node is smaller than the value corresponding to the third father node;
and if the numerical value corresponding to the first newly-added node is larger than the numerical value corresponding to the third father node, ending the numerical value exchange operation.
In an alternative embodiment, the third dirty data block linking module includes:
and the first newly-added node linking module is used for adding a second newly-added node behind the tail node of the second small root heap and linking the third dirty data block to the second newly-added node if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion.
In an optional embodiment, the apparatus further includes a fourth parent node comparing module, where the fourth parent node comparing module is specifically configured to:
acquiring a fourth father node corresponding to the second newly added node, and exchanging the values of the fourth father node and the second newly added node if the value corresponding to the second newly added node is smaller than the value corresponding to the fourth father node;
and if the numerical value corresponding to the second newly-added node is larger than the numerical value corresponding to the fourth father node, ending the numerical value exchange operation.
In an optional embodiment, the solid state disk includes a plurality of logic units therein, and the apparatus further includes:
the small root heap creating module is used for responding to small root heap creating operation aiming at each logic unit in the solid state disk and respectively establishing a first small root heap and a second small root heap corresponding to each logic unit;
a first dirty data block linking module, configured to link at least one first dirty data block in the logical unit, where a valid data proportion is smaller than the preset valid data proportion, to the first small root heap;
and the second dirty data block linking module is used for linking at least one second dirty data block of which the effective data proportion in the logic unit is greater than or equal to the preset effective data proportion to the second small root heap.
In an optional embodiment, the first dirty data block linking module is specifically configured to:
and taking at least one dirty data block with the effective data ratio smaller than the preset effective data ratio in the logic unit as a first dirty data block, and linking each first dirty data block to the first small root heap according to the recycling priority value from small to large.
In an optional embodiment, the second dirty data block linking module is specifically configured to:
and taking at least one dirty data block with the effective data proportion larger than or equal to the preset effective data proportion in the logic unit as a second dirty data block, and linking each second dirty data block to the second small root heap according to the recycling priority value from small to large.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In addition, an embodiment of the present invention further provides an electronic device, including: the processor, the memory, and the computer program stored in and executable on the memory are executed by the processor to implement the processes of the above-mentioned embodiment of the garbage collection method for a solid state disk, and can achieve the same technical effects, and are not described herein again to avoid repetition.
As shown in fig. 7, an embodiment of the present invention further provides a computer-readable storage medium 701, where the computer-readable storage medium 701 stores a computer program, and when the computer program is executed by a processor, the computer program implements each process of the garbage collection method for a solid state disk, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium 701 may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, a processor 810, and a power supply 811. It will be understood by those skilled in the art that the electronic device configurations involved in the embodiments of the present invention are not intended to be limiting, and that an electronic device may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 801 may be used for receiving and sending signals during a process of sending and receiving information or a call, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 810; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 801 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 801 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 802, such as to assist the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 803 may convert audio data received by the radio frequency unit 801 or the network module 802 or stored in the memory 809 into an audio signal and output as sound. Also, the audio output unit 803 may also provide audio output related to a specific function performed by the electronic apparatus 800 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 803 includes a speaker, a buzzer, a receiver, and the like.
The input unit 804 is used for receiving an audio or video signal. The input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics processor 8041 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 806. The image frames processed by the graphics processor 8041 may be stored in the memory 809 (or other storage medium) or transmitted via the radio unit 801 or the network module 802. The microphone 8042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 801 in case of a phone call mode.
The electronic device 800 also includes at least one sensor 805, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 8061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 8061 and/or the backlight when the electronic device 800 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 805 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 806 is used to display information input by the user or information provided to the user. The Display unit 806 may include a Display panel 8061, and the Display panel 8061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 807 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus. Specifically, the user input unit 807 includes a touch panel 8071 and other input devices 8072. The touch panel 8071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 8071 (e.g., operations by a user on or near the touch panel 8071 using a finger, a stylus, or any other suitable object or accessory). The touch panel 8071 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 810 to receive and execute commands sent by the processor 810. In addition, the touch panel 8071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 8071, the user input unit 807 can include other input devices 8072. In particular, other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 8071 can be overlaid on the display panel 8061, and when the touch panel 8071 detects a touch operation on or near the touch panel 8071, the touch operation is transmitted to the processor 810 to determine the type of the touch event, and then the processor 810 provides a corresponding visual output on the display panel 8061 according to the type of the touch event. It is understood that in one embodiment, the touch panel 8071 and the display panel 8061 are two separate components to implement the input and output functions of the electronic device, but in some embodiments, the touch panel 8071 and the display panel 8061 may be integrated to implement the input and output functions of the electronic device, and this is not limited herein.
The interface unit 808 is an interface for connecting an external device to the electronic apparatus 800. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 808 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 800 or may be used to transmit data between the electronic device 800 and external devices.
The memory 809 may be used to store software programs as well as various data. The memory 809 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 809 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 810 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 809 and calling data stored in the memory 809, thereby integrally monitoring the electronic device. Processor 810 may include one or more processing units; preferably, the processor 810 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 810.
The electronic device 800 may further include a power supply 811 (e.g., a battery) for providing power to the various components, and preferably, the power supply 811 may be logically coupled to the processor 810 via a power management system to manage charging, discharging, and power consumption management via the power management system.
In addition, the electronic device 800 includes some functional modules that are not shown, and are not described in detail herein.
It should be noted that, in this document, 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 a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
In addition, embodiments of the present invention may involve the use of user data, and in practical applications, user-specific personal data may be used in the schemes described herein within the scope of the applicable laws and regulations, subject to the requirements of the applicable laws and regulations in the country in which it is located (e.g., the user explicitly agrees, is informed of the fact by the user, etc.).
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (22)

1. A garbage recycling method of a solid state disk is characterized by comprising the following steps:
acquiring a first small root heap and a second small root heap corresponding to a logic unit in a solid state disk, wherein the first small root heap corresponds to at least one first dirty data block with an effective data proportion smaller than a preset effective data proportion in the logic unit, and the second small root heap corresponds to at least one second dirty data block with an effective data proportion larger than or equal to the preset effective data proportion in the logic unit;
if the first small root heap is empty, selecting a target dirty data block from at least one second dirty data block according to the second small root heap;
if the first small root heap is not empty, selecting a target dirty data block from at least one first dirty data block according to the first small root heap;
and performing garbage collection on the target dirty data block.
2. The method according to claim 1, wherein the second small root heap includes at least a first root node, the first root node corresponding to a second dirty data block with a smallest recycling priority value in the second small root heap, and the selecting a target dirty data block from at least one of the second dirty data blocks according to the second small root heap if the first small root heap is empty includes:
and if the first small root heap is empty, determining a second dirty data block corresponding to the first root node as a target dirty data block.
3. The method of claim 2, wherein the second small root heap includes at least a first parent node, and wherein after the determining a second dirty data block corresponding to the first root node as a target dirty data block, the method further comprises:
if the first father node has a corresponding first left child node and the first father node has a corresponding first right child node, comparing values corresponding to the first father node, the first left child node and the first right child node;
when the numerical value corresponding to the first left child node is minimum, exchanging the numerical values of the first father node and the first left child node;
when the numerical value corresponding to the first right child node is minimum, exchanging the numerical values of the first father node and the first right child node;
and when the value corresponding to the first parent node is minimum, finishing the value exchange operation.
4. The method of claim 3, further comprising:
if the first father node has a corresponding first left child node and the first father node does not have a corresponding first right child node, comparing the values of the first father node and the first left child node;
when the value corresponding to the first left child node is smaller than the value corresponding to the first parent node, exchanging the values of the first parent node and the first left child node;
and when the numerical value corresponding to the first parent node is smaller than the numerical value corresponding to the first left child node, ending the numerical value exchange operation.
5. The method of claim 3, further comprising:
and if the first father node does not have the corresponding first left child node, taking the first father node as a new root node.
6. The method of claim 2, wherein after the determining a second dirty data block corresponding to the first root node as a target dirty data block, the method further comprises:
and if the second small root heap does not have a tail node after the second dirty data block corresponding to the first root node is selected as the target dirty data block, determining that the second small root heap is empty.
7. The method according to claim 1, wherein the first stub includes at least a second root node, the second root node corresponding to a first dirty data block with a smallest reclamation priority value in the first stub, and the selecting a target dirty data block from at least one first dirty data block according to the first stub if the first stub is not empty comprises:
and if the first small root heap is not empty, determining a first dirty data block corresponding to the second root node as a target dirty data block.
8. The method of claim 7, wherein the first stub comprises at least a second parent node, and wherein after the determining the first dirty data block corresponding to the second root node as the target dirty data block, the method further comprises:
if the second father node has a corresponding second left child node and the second father node has a corresponding second right child node, comparing values corresponding to the second father node, the second left child node and the second right child node;
when the numerical value corresponding to the second left child node is minimum, exchanging the numerical values of the second father node and the second left child node;
when the value corresponding to the second right child node is minimum, exchanging the values of the second father node and the second right child node;
and when the value corresponding to the second parent node is minimum, ending the value exchange operation.
9. The method of claim 8, further comprising:
if the second father node has a corresponding second left child node and the second father node does not have a corresponding second right child node, comparing the values of the second father node and the second left child node;
when the numerical value corresponding to the second Zuo Zijie point is smaller than the numerical value corresponding to the second parent node, exchanging the numerical values of the second parent node and the second left child node;
and when the numerical value corresponding to the second parent node is smaller than the numerical value corresponding to the second left child node, ending the numerical value exchange operation.
10. The method of claim 8, further comprising:
and if the second father node does not have a corresponding second left child node, taking the second father node as a new root node.
11. The method of claim 7, wherein after determining the first dirty data block corresponding to the second root node as a target dirty data block, the method further comprises:
and if the first dirty data block corresponding to the second root node is selected as the target dirty data block and no tail node exists in the first small root heap, determining that the first small root heap is empty.
12. The method of claim 1, further comprising:
when the logic unit obtains a third dirty data block, the third dirty data block represents a dirty data block of newly added full data in the solid state disk;
linking the third dirty data block to the first small root heap if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion;
and if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion, linking the third dirty data block to the second small root heap.
13. The method of claim 12, wherein linking the third dirty data block to the first small root heap if the valid data proportion of the third dirty data block is less than the predetermined valid data proportion comprises:
and if the effective data proportion of the third dirty data block is smaller than the preset effective data proportion, adding a first new node behind the tail node of the first small root heap, and linking the third dirty data block to the first new node.
14. The method of claim 13, wherein after the linking the third dirty data block to the first incremental node, the method further comprises:
acquiring a third father node corresponding to the first newly added node, and exchanging the values of the third father node and the first newly added node if the value corresponding to the first newly added node is smaller than the value corresponding to the third father node;
and if the numerical value corresponding to the first newly-added node is larger than the numerical value corresponding to the third father node, ending the numerical value exchange operation.
15. The method of claim 12, wherein linking the third dirty data block to the second small root heap if the valid data fraction of the third dirty data block is greater than or equal to the preset valid data fraction comprises:
and if the effective data proportion of the third dirty data block is greater than or equal to the preset effective data proportion, adding a second new node behind the tail node of the second small root heap, and linking the third dirty data block to the second new node.
16. The method of claim 15, wherein after the linking the third dirty data block to the second newly added node, the method further comprises:
acquiring a fourth father node corresponding to the second newly added node, and exchanging the values of the fourth father node and the second newly added node if the value corresponding to the second newly added node is smaller than the value corresponding to the fourth father node;
and if the numerical value corresponding to the second newly-added node is larger than the numerical value corresponding to the fourth father node, ending the numerical value exchange operation.
17. The method according to claim 1, wherein the solid state disk includes a plurality of logic units, and before the obtaining of the first small root heap and the second small root heap corresponding to the logic units in the solid state disk, the method further includes:
responding to a small root pile creation operation aiming at each logic unit in the solid state disk, and respectively establishing a first small root pile and a second small root pile corresponding to each logic unit;
linking at least one first dirty data block with a valid data ratio smaller than the preset valid data ratio in the logic unit to the first small root heap;
linking at least one second dirty data block with the effective data ratio larger than or equal to the preset effective data ratio in the logic unit to the second small root heap.
18. The method of claim 17, wherein linking at least one first dirty data block in the logical unit having a valid data ratio less than the preset valid data ratio to the first small root heap comprises:
and taking at least one dirty data block with the effective data ratio smaller than the preset effective data ratio in the logic unit as a first dirty data block, and linking each first dirty data block to the first small root heap according to the recycling priority value from small to large.
19. The method of claim 17, wherein the linking at least one second dirty data block in the logical unit having a valid data fraction greater than or equal to the predetermined valid data fraction to the second small root heap comprises:
and taking at least one dirty data block with the effective data proportion larger than or equal to the preset effective data proportion in the logic unit as a second dirty data block, and linking each second dirty data block to the second small root heap according to the recycling priority value from small to large.
20. The utility model provides a rubbish recovery unit of solid state hard drives which characterized in that includes:
the system comprises a small root pile acquisition module, a first small root pile and a second small root pile, wherein the first small root pile and the second small root pile correspond to a logic unit in the solid state disk, the first small root pile corresponds to at least one first dirty data block of which the effective data proportion in the logic unit is smaller than a preset effective data proportion, and the second small root pile corresponds to at least one second dirty data block of which the effective data proportion in the logic unit is larger than or equal to the preset effective data proportion;
a second target dirty data block obtaining module, configured to select a target dirty data block from at least one second dirty data block according to the second small root heap if the first small root heap is empty;
a first target dirty data block obtaining module, configured to select a target dirty data block from at least one first dirty data block according to the first small root heap if the first small root heap is not empty;
and the garbage recovery module is used for performing garbage recovery on the target dirty data block.
21. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing a program stored on the memory, implementing the method of any one of claims 1-19.
22. A computer-readable storage medium having stored thereon instructions, which when executed by one or more processors, cause the processors to perform the method of any one of claims 1-19.
CN202310028731.6A 2023-01-09 2023-01-09 Garbage recycling method and device for solid state disk, electronic equipment and storage medium Active CN115756341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310028731.6A CN115756341B (en) 2023-01-09 2023-01-09 Garbage recycling method and device for solid state disk, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310028731.6A CN115756341B (en) 2023-01-09 2023-01-09 Garbage recycling method and device for solid state disk, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115756341A CN115756341A (en) 2023-03-07
CN115756341B true CN115756341B (en) 2023-04-07

Family

ID=85348750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310028731.6A Active CN115756341B (en) 2023-01-09 2023-01-09 Garbage recycling method and device for solid state disk, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115756341B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158592A (en) * 2019-12-26 2020-05-15 广东浪潮大数据研究有限公司 Solid state disk, garbage recycling method and device thereof and computer readable storage medium
CN112486852A (en) * 2020-12-01 2021-03-12 合肥大唐存储科技有限公司 Solid state disk and address mapping method thereof
CN113641305A (en) * 2021-07-26 2021-11-12 武汉理工大学 Garbage recycling method and device for solid state disk, electronic equipment and storage medium
CN114691041A (en) * 2022-03-24 2022-07-01 湖南大学 Key value storage system and garbage recycling method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8990484B2 (en) * 2012-12-14 2015-03-24 Virtium Technology, Inc Heap-based mechanism for efficient garbage collection block selection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158592A (en) * 2019-12-26 2020-05-15 广东浪潮大数据研究有限公司 Solid state disk, garbage recycling method and device thereof and computer readable storage medium
CN112486852A (en) * 2020-12-01 2021-03-12 合肥大唐存储科技有限公司 Solid state disk and address mapping method thereof
CN113641305A (en) * 2021-07-26 2021-11-12 武汉理工大学 Garbage recycling method and device for solid state disk, electronic equipment and storage medium
CN114691041A (en) * 2022-03-24 2022-07-01 湖南大学 Key value storage system and garbage recycling method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
候玉玲."PCI Express接口固态硬盘管理算法的研究".《中国优秀硕士学位论文全文数据库 信息科技辑》.2015,(第第6期期),全文. *

Also Published As

Publication number Publication date
CN115756341A (en) 2023-03-07

Similar Documents

Publication Publication Date Title
US10423221B2 (en) Apparatus and method for controlling portable terminal
CN110008141B (en) Fragment sorting method and electronic equipment
CN109669784B (en) Method and system for interprocess communication
US11409421B2 (en) Object processing method and terminal device
CN108763540B (en) File browsing method and terminal
CN115599308B (en) Garbage recycling method and device for solid state disk, electronic equipment and storage medium
CN108229574B (en) Picture screening method and device and mobile terminal
CN110618969B (en) Icon display method and electronic equipment
WO2019196878A1 (en) Method for memory management and related device
CN110879680B (en) Icon management method and electronic equipment
CN108257104B (en) Image processing method and mobile terminal
CN110244884B (en) Desktop icon management method and terminal equipment
CN111274160A (en) Data storage method, electronic device, and medium
CN107145386A (en) Data migration method, terminal device and computer-readable recording medium
CN111142734B (en) Application icon processing method and electronic equipment
CN109471841B (en) File classification method and device
CN111522613A (en) Screen capturing method and electronic equipment
CN108491143B (en) Object movement control method and mobile terminal
CN111190528B (en) Brush display method, electronic equipment and storage medium
CN109508300B (en) Disk fragment sorting method and device and computer readable storage medium
CN115756341B (en) Garbage recycling method and device for solid state disk, electronic equipment and storage medium
CN109889568B (en) Data export method, server and system
CN112612552A (en) Application program resource loading method and device, electronic equipment and readable storage medium
CN115543221B (en) Data migration method and device for solid state disk, electronic equipment and storage medium
CN111444145A (en) Data cleaning method and electronic equipment

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