Data garbage collection method, device, solid state disk, medium, and program product

By coordinating and interacting with the SSD, the system calculates data priority based on multi-dimensional information and dynamically updates the priority of data to be reclaimed within the SSD. This solves the write amplification problem in solid-state drive garbage collection, improves write amplification optimization efficiency, extends SSD lifespan, and enhances performance stability.

CN121455840BActive Publication Date: 2026-03-31INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In NAND flash-based solid-state drives, write amplification caused by garbage collection leads to shortened SSD lifespan and performance degradation, and existing technologies have low optimization efficiency.

Method used

Through collaborative interaction between the host and SSD, data priority is calculated based on multi-dimensional information such as data value, update frequency, and lifecycle, and the priority of data to be reclaimed inside the SSD is dynamically updated to achieve a precise garbage collection strategy.

Benefits of technology

It improves write amplification optimization efficiency, extends the lifespan of SSDs, reduces the performance interference of garbage collection on front-end services, and enhances the performance stability and reliability of enterprise-level storage systems under high-load scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455840B_ABST
    Figure CN121455840B_ABST
Patent Text Reader

Abstract

The application discloses a data garbage collection method, device, solid state disk, medium and program product, relates to the storage technical field, and through receiving a first priority calculated by a host based on multi-dimensional information (data value, life cycle, system load, write amplification contribution, etc.), dynamically updating the priority of specific target data in the internal data to be recycled of the SSD, and finally executing recycling according to the updated priority. Breaks the isolation of the host and the SSD in the garbage collection decision, closely combines the global business perspective of the host with the underlying physical operation of the SSD. Achieves the leap of the garbage collection strategy from the rough hot and cold division based on the update frequency to the objective priority ordering based on the multi-dimensional weight, so that the data classification can more accurately reflect the real write amplification contribution and business value, and the write amplification optimization efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to data garbage collection methods, devices, solid-state drives, media, and program products. Background Technology

[0002] In solid-state drives (SSDs) based on negative-AND (NAND) flash memory, garbage collection (GC) is required. GC causes write amplification, which in turn leads to a shortened lifespan and performance degradation of the SSD. How to reduce write amplification is a key issue in SSD technology optimization.

[0003] In related technologies, the hardware and algorithms inside the SSD are usually relied upon to mark static data that has not been updated for a long time as an attribute that does not need to be reclaimed, thereby reducing the effective data migration during GC. However, write amplification optimization is relatively inefficient. Summary of the Invention

[0004] This application provides data garbage collection methods, devices, solid-state drives, media, and program products to effectively reduce write amplification.

[0005] This application provides a data garbage collection method, including:

[0006] The receiver sends a first message; the first message includes the first priority of the data to be coordinated; the first priority is related to the first information; the first information includes the data priority of the data to be coordinated, and at least one of the following: the first system load of the solid-state drive, the first write amplification contribution coefficient of the data to be coordinated, and the update frequency; the data priority is determined based on the data value, update frequency and data lifecycle of the data to be coordinated.

[0007] Based on the first priority, the recycling priority of the target data in the current data to be recycled on the solid-state drive is updated to obtain the second priority of the target data; the target data is at least a portion of the data to be coordinated.

[0008] Data to be recovered is processed according to the second priority.

[0009] This application provides a data garbage collection method, including:

[0010] Determine the corresponding data priority based on the data value, update frequency, and data lifecycle of the data to be collaborated on;

[0011] The first priority of the data to be coordinated is determined based on the first information; the first information includes data priority and at least one of the following: system load of the solid-state drive, write amplification contribution of the data to be coordinated, and update frequency;

[0012] Send the first message to the solid-state drive; the first message includes the first priority.

[0013] This application also provides a data garbage recycling device, including:

[0014] A receiving module is used to receive a first message sent by the host; the first message includes a first priority of the data to be coordinated; the first priority is related to first information; the first information includes the data priority of the data to be coordinated, and at least one of the following: the first system load of the solid-state drive, the first write amplification contribution coefficient of the data to be coordinated, and the update frequency; the data priority is determined based on the data value, update frequency and data lifecycle of the data to be coordinated.

[0015] The first determining module is used to update the recycling priority of the target data in the current data to be recycled of the solid-state drive according to the first priority, and obtain the second priority of the target data; the target data is at least a part of the data to be coordinated;

[0016] The processing module is used to process the data to be recycled according to the second priority.

[0017] This application also provides a data garbage recycling device, including:

[0018] The second determining module is used to determine the corresponding data priority based on the data value, update frequency, and data lifecycle of the data to be coordinated;

[0019] The second determining module is further configured to determine the first priority of the data to be coordinated based on the first information; the first information includes data priority and at least one of the following: system load of the solid-state drive, write amplification contribution of the data to be coordinated, and update frequency;

[0020] The sending module is used to send a first message to the solid-state drive; the first message includes the first priority.

[0021] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described data garbage collection methods when executing the computer program.

[0022] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described data garbage collection methods.

[0023] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described data garbage collection methods.

[0024] This application utilizes a system where the receiving host calculates a first priority based on multi-dimensional information (data value, lifecycle, system load, write amplification contribution, etc.) and dynamically updates the priority of specific target data within the SSD's data to be reclaimed. Reclaiming is then performed based on the updated priority. This breaks down the isolation between the host and SSD in garbage collection decisions, tightly integrating the host's global business perspective with the SSD's underlying physical operations. It achieves a leap in garbage collection strategies from a coarse hot / cold classification based on update frequency to an objective priority ranking based on multi-dimensional weights, enabling data classification to more accurately reflect its true write amplification contribution and business value, and improving write amplification optimization efficiency. Attached Figure Description

[0025] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A schematic diagram illustrating the principles of data compression and deduplication in data garbage collection for related technologies;

[0027] Figure 2 A schematic diagram of the system architecture for the data garbage collection method provided in the embodiments of this application;

[0028] Figure 3 A flowchart illustrating the data garbage collection method provided in this application embodiment. Figure 1 ;

[0029] Figure 4 A flowchart illustrating the data garbage collection method provided in this application embodiment. Figure 2 ;

[0030] Figure 5 An interactive schematic diagram of the data garbage collection method provided in the embodiments of this application;

[0031] Figure 6 Schematic diagram of the data garbage recycling device provided in the embodiments of this application Figure 1 ;

[0032] Figure 7 Schematic diagram of the data garbage recycling device provided in the embodiments of this application Figure 2 ;

[0033] Figure 8 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0034] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0035] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0036] This application relates to optimization technologies for enterprise-grade solid-state drives (SSDs), applicable to high-load, high-reliability data center scenarios. With the widespread adoption of cloud computing, big data analytics, and real-time transaction systems, enterprise-grade SSDs, with their core advantages such as high bandwidth (e.g., the Peripheral Component Interconnect Express (PCIe) 4.0 interface supported by the Non-Volatile Memory Express (NVMe) protocol), high input / output operations per second (IOPS), and low latency (microsecond-level response), have gradually replaced traditional hard disk drives (HDDs) as the mainstream medium for core storage. However, the physical characteristics of NAND flash memory (e.g., "erase before write") cause significant write amplification (WA) during garbage collection (GC) in SSDs, directly impacting their lifespan (limited erase / write cycles) and performance (GC operations consume controller computing power and NAND channel bandwidth). In enterprise-level scenarios, daily petabyte (PB) level data interactions and complex business workloads (such as Redundant Array of Independent Disks (RAID) arrays and database transaction processing) place higher demands on SSD write amplification control.

[0037] In related technologies, GC efficiency is usually optimized by the internal hardware and algorithms of the SSD, and the host does not participate in any decision-making. The SSD can adopt an idle GC strategy, that is, trigger GC when the SSD is idle or the load is low, reducing the interference to business. By marking static data that has not been updated for a long time as an attribute that does not need to be reclaimed, the effective data migration during GC is reduced.

[0038] like Figure 1 As shown, data compression and deduplication methods (such as real-time compression and hash deduplication) can be used to merge duplicate data and keep only one copy. This processing method is only suitable for compressible data such as text and logs, and its application scope is relatively narrow.

[0039] Therefore, how to improve the efficiency of write amplification optimization has become an urgent technical problem to be solved.

[0040] To address the aforementioned technical problems, the inventors of this application have discovered that, with reducing write amplification as the core objective, the host can objectively prioritize data based on parameters that significantly impact write amplification. Through collaborative interaction between the host and the SSD, the host notifies the SSD to implement a more accurate garbage collection strategy that optimizes write amplification. Based on this, embodiments of this application provide a data garbage collection method.

[0041] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0042] This section describes the specific application environment architecture or hardware architecture upon which the data garbage collection method depends. (References) Figure 2 , Figure 2 This is a schematic diagram of the system architecture for the data garbage collection method provided in an embodiment of this application. For example... Figure 2 As shown, the data garbage collection method provided in this application embodiment can run in a collaborative system architecture including a host and a solid-state drive.

[0043] The host side, from top to bottom, includes the application layer, file system, SSD system management engine, collaborative data identification and priority calculation unit, and collaborative instruction generation and encoding unit. The collaborative data identification and priority calculation unit calculates the first priority of the data to be collaboratively processed; the collaborative instruction generation and encoding unit encapsulates the first priority into a first message.

[0044] The SSD side may include a cooperative instruction receiving and decoding unit, a cooperative garbage collection control engine, a GC triggering and status feedback unit, a GC module, a traditional flash translation layer (FTL), a NAND operation unit, and NAND media. The cooperative instruction receiving and decoding unit can be used to receive and parse the first message from the host; the cooperative garbage collection control engine is the control center that executes the core logic of the embodiments of this application; and the GC module can be used to perform specific garbage collection operations.

[0045] In the specific implementation, the SSD-side collaborative instruction receiving and decoding unit can receive the first message sent by the host collaborative instruction generation and encoding unit through the host interface, and decode the first message to extract the first priority of the data to be collaboratively processed. The data to be collaboratively processed may contain one or more data blocks identified by the host, which are assigned the same first priority (e.g., P1) by the host. This first priority can be generated by the host-side collaborative data identification and priority calculation unit, and it is related to the first information. The first information includes at least the data priority determined by the host based on the data value, update frequency, and data lifecycle of the data to be collaboratively processed, and may further incorporate one or more of the following: the first system load fed back from the SSD, the first write amplification contribution coefficient of the data to be collaboratively processed, and the update frequency. The first message may also contain identification information such as the logical address range of the data to be collaboratively processed.

[0046] Then, the SSD-side collaborative reclamation control engine performs a priority update operation. Upon receiving the decoded first message, the collaborative reclamation control engine can search and match within the current uncollected data on the SSD based on the data identifier (e.g., address range) carried in the first message. Here, the current uncollected data refers to a set of multiple data blocks that have been initiated by the GC triggering and status feedback unit and are being prepared or planned for reclamation by the GC module. This set may contain multiple data blocks with different original reclamation priorities (e.g., P2, P3, P4, etc.). Then, from the current uncollected data, data blocks whose logical addresses overlap with the uncollected data range are selected and identified as target data. These target data blocks may originally have their own reclamation priorities (e.g., P2). Finally, the engine uses the received first priority (e.g., P1) to uniformly overwrite and update the original reclamation priorities of these target data blocks, thereby generating a new, unified second priority (i.e., P1) for these target data blocks. Other data blocks in the current uncollected data that do not belong to the uncollected data range retain their original reclamation priorities (e.g., still P3, P4). This process enables host policies to precisely intervene in the reclamation priority of specific data blocks within the SSD.

[0047] Finally, the SSD-side collaborative reclamation control engine and the GC module work together to perform reclamation. The collaborative reclamation control engine synchronizes the updated priority status (i.e., some data blocks have been updated to P1, while the remaining data blocks retain their original priorities such as P3 and P4) to the GC module. When scheduling its internal reclamation tasks, the GC module determines the reclamation order based on the updated overall priority status. For example, since P1 has a higher priority than P3 and P4, the GC module will prioritize reclamation of physical blocks containing target data blocks that have been updated to P1 priority. Subsequently, the GC module drives the NAND operation unit to execute specific garbage collection operations according to the above scheduling decisions. The entire reclamation process is based on the updated priority, ensuring that data blocks marked as high priority by the host (currently priority P1) can obtain reclamation resources before other low-priority data blocks (such as P3 and P4), thereby achieving fine-grained control over write amplification.

[0048] Through the above process, the host side calculates data priorities (i.e., data types K1-K4) based on data value, update frequency, and data lifecycle. This ensures that data priorities fully reflect write amplification contributions. Then, based on system load, update frequency, and write amplification contribution coefficient, the first priority is determined, enabling objective ranking of data priorities. Through a standardized message interface, a first message carrying the first priority is sent and applied to the ongoing garbage collection activity within the SSD. The SSD only updates the priority of overlapping data blocks, allowing garbage collection operations to differentiate between data of varying importance. This aligns garbage collection operations with the actual needs of upper-layer applications, thereby optimizing write amplification, extending lifecycle, and reducing performance interference at the system level.

[0049] Optionally, the host may also include a dynamic interaction threshold decision unit and a GC information parsing and response unit. The dynamic interaction threshold decision unit is used to dynamically calculate and adjust the threshold for triggering collaborative operations based on information such as system load fed back by the SSD, thereby achieving intelligent throttling. The GC information parsing and response unit can be used to receive and parse the second message (such as GC status) reported by the SSD, and then generate a third message containing the highest allowed garbage collection priority and the proportion of garbage collection tasks allocated, based on a global policy.

[0050] SSDs may also include a load-sharing garbage collection execution unit and a Logical Block Address (LBA) index. The load-sharing garbage collection execution unit is used to differentiate and schedule garbage collection tasks to channels with different loads based on the allocation ratio of garbage collection tasks issued by the host and the channel idle status. The LBA index is used to persistently record the logical addresses of data that are marked by the host as long-term retention or do not need to be collected, so that the GC module can directly skip these data in subsequent garbage collection cycles and avoid invalid operations.

[0051] Figure 3 A flowchart illustrating the data garbage collection method provided in this application embodiment. Figure 1 ,like Figure 3 As shown, embodiments of this application provide a data garbage collection method, which can be applied to a solid-state drive (SSD) controller or SSD, or software attached to the controller or SSD. The method is described in detail below:

[0052] 301. Receive a first message sent by the host; the first message includes the first priority of the data to be coordinated; the first priority is related to the first information; the first information includes the data priority of the data to be coordinated, and at least one of the following: the first system load of the solid-state drive, the first write amplification contribution coefficient of the data to be coordinated, and the update frequency; the data priority is determined based on the data value, update frequency and data lifecycle of the data to be coordinated.

[0053] In this embodiment, the solid-state drive (SSD) can receive a first message sent by the host. This first message may include a first priority of the data to be coordinated. The first priority may be related to first information, which may include a data priority determined by the host based on the data value, update frequency, and data lifecycle of the data to be coordinated. It may further include at least one of the following: the first system load of the SSD, the first write amplification contribution coefficient of the data to be coordinated, and the update frequency of the data to be coordinated. In this way, the host can comprehensively consider the business semantic value of the data, historical behavioral characteristics, and the real-time status of the SSD to generate a first priority that objectively reflects the importance of the data for write amplification optimization, and encapsulate this first priority in the first message and send it to the SSD, providing a decision-making basis for coordinated garbage collection.

[0054] 302. Based on the first priority, update the recycling priority of the target data in the current data to be recycled on the solid-state drive to obtain the second priority of the target data; the target data is at least a portion of the data to be coordinated.

[0055] In this embodiment, the solid-state drive can update the recycling priority of the target data in its current data to be recycled based on the received first priority, thereby obtaining the second priority of the target data.

[0056] The currently pending data can refer to a collection of multiple data blocks within the SSD that have been triggered and are scheduled for garbage collection.

[0057] The target data can be at least a portion of the data to be coordinated that has a logical address overlap with the data to be recycled.

[0058] In practice, the SSD can identify which data blocks in the current data to be reclaimed belong to the host-specified scope of data to be coordinated, and designate these data blocks as target data. Then, the SSD can use the first priority issued by the host to uniformly overwrite or adjust the original internal reclamation priority of these target data, generating a new second priority. For other data blocks in the current data to be reclaimed that do not belong to the scope of data to be coordinated, their reclamation priority can remain unchanged. This step enables precise and dynamic intervention of the host policy on the reclamation priority of specific data within the SSD.

[0059] 303. Recycle the data to be recycled according to the second priority.

[0060] In this embodiment, when scheduling and executing garbage collection tasks, the SSD's garbage collection module can determine the order of collection operations and resource allocation based on the updated overall priority status (i.e., target data has a second priority, while other data retains its original priority). For example, it can prioritize and process physical blocks containing high-priority target data. By driving the garbage collection process based on the second priority, it ensures that data identified by the host as high-value and high-optimization-demand data receives priority for collection resources. This makes the garbage collection operation more aligned with the true intent of upper-layer applications, enabling fine-grained control over write amplification.

[0061] The data garbage collection method provided in this application embodiment receives a first priority calculated by the host based on multi-dimensional information (data value, lifecycle, system load, write amplification contribution, etc.), and dynamically updates the priority of specific target data in the data to be reclaimed within the SSD. Finally, it performs reclamation based on the updated priority. This breaks down the isolation between the host and the SSD in garbage collection decisions, tightly integrating the host's global business perspective with the underlying physical operations of the SSD. It achieves a leap from a coarse hot / cold data classification based on update frequency to an objective priority ranking based on multi-dimensional weights, making data classification more accurately reflect its true write amplification contribution and business value, thus improving write amplification optimization efficiency. Furthermore, through real-time intervention of the SSD's internal reclamation queue by the host policy, it ensures that data with high optimization value is processed first, thereby significantly improving the overall efficiency and targeting of write amplification optimization. While extending the SSD's lifespan, it reduces the performance interference of garbage collection on front-end business input / output (I / O), improving the performance stability and reliability of enterprise-level storage systems under complex high-load scenarios.

[0062] In some embodiments, the first message may further include at least one of the following: the address range of the data to be coordinated, the first write amplification contribution coefficient, the data lifetime, and whether it is recyclable.

[0063] For example, the first message Msg1 can be a data attribute synchronization command, used to push attribute information of high-priority data to the SSD. The format is shown in Table 1.

[0064] Table 1

[0065]

[0066] The method provided in this application, by transmitting additional information such as the address range of the data to be coordinated, the first write amplification contribution coefficient, the data lifecycle, and whether it is recyclable, enables SSDs to more accurately identify and locate target data and to more comprehensively understand the context and state of the data, thereby supporting more refined and intelligent collaborative garbage collection decisions and further improving optimization efficiency.

[0067] In some embodiments, recycling the data to be recycled according to a second priority includes: determining the highest priority of the data to be recycled based on the second priority.

[0068] Send a second message to the host; the second message includes the highest priority of the data to be reclaimed.

[0069] The receiving host sends a third message; the third message includes: allowing the highest priority to be reclaimed; the allowed highest priority to be reclaimed is determined based on the highest priority of the data to be reclaimed.

[0070] Based on the highest priority allowed for recycling, the data range to be recycled is adjusted to obtain new data to be recycled, and the new data to be recycled is then processed.

[0071] In some embodiments, the process of recycling data according to a second priority can be further refined to achieve more secure two-way collaboration.

[0072] Optionally, the solid-state drive (SSD) can determine the highest priority among all currently pending data based on a second priority. The SSD can send a second message to the host, which may include the determined highest priority of the pending data. Furthermore, the SSD can receive a third message from the host in response to the second message, which may include a allowed highest priority for recycling. This allowed highest priority may be determined by the host based on the received highest priority of the pending data and its global policy. Finally, the SSD can adjust the current range of pending data based on this allowed highest priority; for example, it may include only data with a priority equal to or lower than the allowed highest priority in the recycling range, thereby obtaining new pending data, and ultimately recycling this new batch of pending data.

[0073] For example, each message in this embodiment (e.g., the first message Msg1, the second message Msg2, and the third message Msg3) can adopt a structure of an instruction header, a data field, and a check field. The instruction header may include key information such as instruction type and priority identifier, the data field may carry quantization parameters, and the check field may use CRC8 checksum. The following are examples of the second message Msg2 and the third message Msg3.

[0074] The second message, Msg2, is the GC status feedback instruction sent by the SSD to the host. It is used to synchronize the GC trigger status and the data to be reclaimed with the host. The format is shown in Table 2.

[0075] Table 2

[0076]

[0077] The third message, Msg3, is the SSD recycling policy adjustment command sent by the host. It is used by the host to adjust the SSD recycling policy according to business load and data priority. The format is shown in Table 3.

[0078] Table 3

[0079]

[0080] During the priority filtering process for reclaimed blocks, the data attributes pushed by the host through Msg1 (such as first priority and data priority (data types such as K1, K2, K3, K4, etc.)) and the highest priority allowed for reclamation in Msg3 can be combined to perform a secondary screening of the SSD data blocks to be reclaimed.

[0081] For example, K1 type data blocks (high-value static data) and data blocks with priority ≥ the allowed recycling threshold can be deleted from multiple data blocks of data to be recycled (e.g., when the threshold is set to P3, P1 and P2 type data blocks are removed).

[0082] It can also prioritize the retention of low-value redundant data blocks of type K4, cached data blocks of type K3, and low-priority data blocks that have not reached the threshold, forming an accurate recycling list.

[0083] This application's embodiment introduces a two-way handshake mechanism involving the highest-priority reporting and host confirmation, enabling the host to perform final review and authorization for the upcoming SSD reclamation operation. This effectively prevents the SSD from reclaiming high-value data that the host deems unsuitable for immediate processing due to internal state misjudgment, enhancing the security and controllability of the collaborative process and ensuring that the garbage collection strategy remains consistent with the host's overall business objectives.

[0084] In some embodiments, the recycling process for new data to be recycled includes: determining the channel load of multiple channels; determining the load status of multiple channels based on the system load and the channel load of multiple channels; and recycling the new data to be recycled based on the load status of multiple channels.

[0085] In some embodiments, the solid-state drive (SSD) can first determine the channel load of each of its multiple NAND flash memory channels. Then, the SSD can combine its overall system load with the determined channel loads to comprehensively determine which channels are relatively idle. Finally, the SSD can schedule and execute recycling tasks for new data based on the determined channel load status, for example, prioritizing the allocation of recycling tasks to channels with lower or no load.

[0086] This application embodiment intelligently schedules tasks by sensing and utilizing the differentiated load states of multiple NAND channels, which can more evenly distribute the I / O pressure brought by garbage collection operations across hardware resources. This effectively avoids the concentrated occupation of a few busy channels by garbage collection tasks, thus minimizing interference with foreground business I / O. Therefore, while performing necessary garbage collection in the background, it maximizes the stability and efficiency of the overall storage system performance.

[0087] In some embodiments, determining the load status of multiple channels based on system load and channel load of multiple channels includes: determining an average channel load based on the channel load of each channel; and determining a first coefficient based on system load.

[0088] The idle channel threshold is determined based on the first coefficient and the average channel load.

[0089] For each channel, the load status of the channel is determined based on the channel load and the idle channel threshold.

[0090] In some embodiments, an average channel load can be calculated based on the channel load of each channel. Simultaneously, a first coefficient can be determined based on the system load; this first weight reflects the influence of the overall system busyness on channel idleness determination. Then, by combining this first coefficient with the calculated average channel load, a dynamic idle channel threshold can be determined. Finally, for each channel, by comparing its own channel load with the dynamically determined idle channel threshold, it can be determined whether the channel is in a loaded state (e.g., if the channel load is below the threshold, it is determined to be idle).

[0091] For example, in this embodiment, the recycling strategy parameters (such as the highest priority allowed for recycling, the recycling task allocation ratio, etc.) issued by the host through Msg3 can be combined with the internal GC status of the SSD (feedback to the host through Msg2) to achieve precise matching of data priority, channel load and collaborative strategy for traffic distribution recycling. This is fully compatible with the host-SSD bidirectional collaborative closed-loop design and avoids resource waste and efficiency loss caused by independent SSD recycling.

[0092] In the specific implementation process, the collaborative parameter parsing and initialization can be performed first. For example, the SSD receives the recycling policy adjustment instruction sent by the host through Msg3, and extracts the core parameters based on the recycling policy adjustment instruction (which may include the highest priority allowed for recycling (such as P3), the recycling task allocation ratio, the maximum task limit of a single channel, etc.). At the same time, the recycling parameters can be initialized by combining the system load SL and NAND channel status fed back by itself through Msg2.

[0093] Furthermore, intelligent channel load grading can be implemented. For example, the load of each NAND channel can be collected at preset intervals (e.g., 100ms). Based on the channel load calculation formula (Load_Chan = current queue length / maximum queue length × 100%), and combined with the overall load SL, the idle channel determination logic can be optimized.

[0094] When SL≤30% (indicating a system trough): Idle channel threshold Load_Th = average queue length / maximum queue length × 80% (this can expand the range of idle channels and make full use of redundant resources).

[0095] When 30% < SL < 70% (indicating system stability): Load_Th = average queue length / maximum queue length × 100% (can maintain normal idle channel filtering);

[0096] When SL≥70% (indicating system peak): Load_Th = average queue length / maximum queue length × 120% (this can shrink the range of idle channels to ensure user IO response);

[0097] Ultimately, channels with Load_Chan ≤ Load_Th can be selected as idle channels, and the rest are non-idle channels (non-idle channels with channel load ≤ 50% can also be used to participate in the recycling task).

[0098] This application's embodiments introduce an idle channel threshold that is dynamically adjusted based on system load, making the determination of channel load status no longer static and isolated, but capable of sensitively responding to changes in the overall system load. This ensures the adaptability of the recycling task scheduling strategy, which can fully utilize hardware resources to accelerate recycling when the system is idle, while maintaining restraint when the system is busy, thereby more intelligently balancing background recycling efficiency and foreground business performance.

[0099] In some embodiments, the second message further includes the amount of data to be reclaimed or the second write amplification contribution coefficient; the third message further includes: a reclamation task allocation ratio; the reclamation task allocation ratio represents the proportion of the data corresponding to the highest priority that can be reclaimed in the new data to be reclaimed, and is determined based on the amount of data to be reclaimed or the second write amplification contribution coefficient; the new data to be reclaimed is reclaimed based on the load status of multiple channels, including: reclaiming the new data to be reclaimed based on the reclamation task allocation ratio and the load status of multiple channels.

[0100] In some embodiments, the second message may further include the amount of data to be reclaimed or a second write amplification contribution coefficient. Correspondingly, the third message returned by the host may include, in addition to allowing the highest priority for reclamation, a reclamation task allocation ratio, which is determined by the host based on the amount of data or the second write amplification contribution coefficient reported in the second message. During reclamation processing, the solid-state drive can reclaim new data to be reclaimed based on this reclamation task allocation ratio and in conjunction with the load status of multiple channels. For example, if the amount of data is less than a preset amount, the host may not intervene in the allocation ratio; if the amount of data is greater than the preset amount, the host can determine the allocation ratio based on the second write amplification contribution coefficient. For example, the allocation ratio may not be set if the second write amplification contribution coefficient is greater than a preset value (e.g., the average value of the write amplification contribution coefficient over a preset time period); if the second write amplification contribution coefficient is less than the preset value, the allocation ratio can be determined based on the ratio between the difference between the second write amplification contribution coefficient and the preset value and the preset value.

[0101] In this embodiment, the host dynamically specifies the allocation ratio of the highest priority data to be recycled and other priority data (data other than the data corresponding to the highest priority data in the new data to be recycled) based on the data size or write amplification effect. This allows the host to adaptively adjust the degree of intervention in the SSD recycling strategy based on the information fed back by the SSD.

[0102] In some embodiments, based on the recycling task allocation ratio, new data to be recycled is recycled according to the load status of multiple channels, including: determining the ratio between the first data and the second data in the data to be recycled according to the recycling task allocation ratio; the second priority of the first data is the same as the highest priority allowed for recycling, and the second priority of the second data is lower than the highest priority allowed for recycling.

[0103] The first data is allocated to an idle channel for recycling.

[0104] The second data is allocated to a non-idle channel for recycling.

[0105] In some embodiments, the ratio between the first data and the second data in the data to be recycled can be determined based on the recycling task allocation ratio issued by the host. The first data refers to data whose second priority is the same as the highest priority allowed for recycling by the host, while the second data refers to data whose second priority is lower than the highest allowed priority for recycling. Then, during recycling scheduling, the first data can be preferentially allocated to channels currently determined to be idle for recycling processing, ensuring that high-priority data is recycled in a timely and low-interference manner. Simultaneously, the second data can be allocated to channels that are not idle (i.e., have high load) for recycling processing, thereby achieving differentiated resource scheduling for data of different importance.

[0106] This application embodiment achieves fine-grained matching between recycling tasks and hardware resources by classifying data according to priority and matching it to channels with different load states. This ensures that high-priority recycling tasks receive high-quality channel resources for rapid completion, while allowing low-priority tasks to execute in the background, thereby optimizing the overall balance between recycling efficiency and system performance and improving resource utilization.

[0107] In some embodiments, during the hierarchical task allocation and scheduling process, task scheduling can be performed based on data priority (i.e., data types K1-K4) and channel load status, according to the allocation ratio specified by Msg3.

[0108] For example, cold data recycling tasks (mainly K4 type redundant data and low-priority K3 type data that has not been updated for a long time) can be assigned to idle channels to reduce business interference by utilizing idle resources;

[0109] Hot data recycling tasks (mainly low-priority K2 class data that is updated frequently) can also be assigned to non-idle channels with a load of ≤50% to balance recycling efficiency and IO response speed.

[0110] Alternatively, based on the maximum task volume per channel (10 blocks) limit, and with reference to the data weight parameters in Msg1, channel resources can be allocated preferentially to high-weight, low-priority data blocks to avoid recycling delays.

[0111] During the recycling process, the SSD provides real-time statistics on channel load, task completion progress, and effective data migration amount, which are then synchronized to the host via the subsequent Msg2 command. This provides data support for the host to dynamically adjust the recycling strategy (update the Msg3 parameter), forming a closed-loop optimization.

[0112] In some embodiments, the third message also includes the maximum single-channel task volume, and the recycling process for new data to be recycled includes: recycling the new data to be recycled based on the maximum single-channel task volume and the load status of multiple channels.

[0113] In some embodiments, the third message sent by the host may also include a parameter for the maximum number of tasks per channel. Accordingly, when the solid-state drive (SSD) processes new data to be reclaimed, it can perform reclamation scheduling based on this maximum number of tasks per channel, combined with the load status of multiple channels. For example, even if a channel is determined to be idle, the number of reclamation tasks allocated to that channel will not exceed the maximum number of tasks per channel set by the host.

[0114] This application embodiment sets an upper limit on the amount of recycling tasks per channel by the host, providing a clear resource constraint boundary for the parallel recycling operation of SSDs. This effectively prevents performance bottlenecks or latency fluctuations caused by a single channel processing an excessive number of recycling tasks, ensuring that the occupation of channel resources by the recycling operation is controllable and balanced. Thus, while improving the parallelism of recycling, it also ensures the stability of I / O response of each channel.

[0115] Figure 4 A flowchart illustrating the data garbage collection method provided in this application embodiment. Figure 2 ,like Figure 4 As shown, embodiments of this application provide a data garbage collection method, which can be applied to a host controller or host, or software attached to a host controller or host. The method is described in detail below:

[0116] 401. Determine the corresponding data priority based on the data value, update frequency, and data lifecycle of the data to be collaborated on.

[0117] In this embodiment, the host can determine the corresponding data priority based on the data value, update frequency, and data lifecycle of the data to be coordinated. For example, the host can assess the importance or business value of the data to be coordinated to upper-layer applications (data value), analyze the frequency of modification or overwriting of the data (update frequency), and predict or obtain the expected effective storage time of the data (data lifecycle). By comprehensively considering these three dimensions, the host can assign an initial data priority to the data to be coordinated (that is, divide the data into different data types such as K1, K2, K3, K4). This data priority can initially reflect the potential importance and urgency of data with different priorities in garbage collection optimization, laying the foundation for subsequent more refined priority calculations.

[0118] 402. Determine the first priority of the data to be coordinated based on the first information; the first information includes data priority and at least one of the following: system load of the solid-state drive, write amplification contribution of the data to be coordinated, and update frequency.

[0119] In this embodiment, the host can determine the final first priority of the data to be coordinated based on the first information. The first information includes at least the data priority determined in step 401, and may further incorporate at least one of the following data: the SSD system load obtained or estimated from the SSD, the contribution of the data to be coordinated to the overall write amplification of the SSD (write amplification contribution coefficient), and the update frequency of the data. By combining the data priority, which reflects the characteristics of the data itself, with indicators reflecting the real-time status of the SSD (system load) and the impact of historical data behavior on physical wear (write amplification contribution coefficient), the host can calculate a more comprehensive, objective, and dynamic first priority. This first priority not only reflects the business semantics of the data but also considers the actual efficiency and timing of write amplification optimization, achieving multi-dimensional integration of decision-making criteria.

[0120] 403. Send the first message to the solid-state drive; the first message includes the first priority.

[0121] In this embodiment, the host can send a first message to the solid-state drive (SSD), which may include a determined first priority. This enables the SSD to obtain and adjust its internal garbage collection strategy based on the priority information provided by the host, which is closely related to the needs of upper-layer applications and the system state, during subsequent garbage collection operations.

[0122] The data garbage collection method provided in this application determines data priority on the host side based on data value, update frequency, and lifecycle. It further integrates real-time and historical information such as SSD system load and write amplification contribution to comprehensively calculate the first priority of the data to be coordinated, and finally distributes this priority to the SSD. This constructs a multi-dimensional, quantifiable data importance assessment system, enabling the priority to truly reflect the value of data to the business and its impact on storage device lifespan (write amplification), surpassing the traditional simple classification based solely on hot and cold data. By proactively pushing priority instructions that incorporate real-time system status to the SSD, information exchange and policy coordination between the upper and lower layers of the storage stack are achieved, aligning the underlying SSD garbage collection operations with the true intent of upper-layer applications and the real-time load status of the system. This guides the SSD to perform smarter and more accurate garbage collection, effectively reducing write amplification, extending SSD lifespan, and minimizing performance fluctuations caused by background garbage collection.

[0123] In some embodiments, data priority includes a first level, a second level, a third level, and a fourth level, from high to low. The corresponding data priority is determined based on the data value, update frequency, and data lifecycle of the data to be coordinated, including: if the data value of the data to be coordinated is less than a first preset value, then the data priority is determined to be the fourth level. Data value may include the data source; for example, user data may be determined to have higher value, such as being greater than a second preset value.

[0124] If the value of the data to be coordinated is greater than the second preset value and the update frequency is greater than the first frequency, then the data priority is determined to be the first level; the second preset value is greater than the first preset value.

[0125] If the value of the data to be collaborated on is greater than the first preset value, the update frequency is less than the second frequency, and the data lifecycle is less than the second preset duration, then the data priority is determined to be the third level; the first frequency is greater than or equal to the second frequency.

[0126] If the value of the data to be coordinated is greater than the first preset value, the update frequency is less than the second frequency, and the data lifecycle is greater than the first preset duration, then the data priority is determined to be the second level; the first preset duration is greater than or equal to the second preset duration.

[0127] In this embodiment, based on the degree of contribution to write amplification optimization and data characteristics, data can be divided into multiple data priorities (i.e., multiple data types), such as four data types: K1, K2, K3, and K4, to clarify the core characteristics and collaborative value of each type of data.

[0128] For data type K1, which is the first level, this type belongs to high-value static data, usually ice data that has not been updated for a long time. It is important data that has not been updated for a long time after being written. Moving this type of data within the SSD is mainly triggered by wear leveling. The moving efficiency is close to 100%. A strict coordination mechanism is required to ensure the accuracy of this type of data identification. If the accuracy cannot be guaranteed, the moving efficiency will be severely affected. The coordination frequency is low, but accuracy is required.

[0129] For data type K2, which is the second level, this type of data is high-value hot data, which is usually updated frequently. It is usually user data and important metadata of the storage system. This type of data is written frequently and is the main contributor to garbage collection inside the SSD. This type of data has a certain probability of being overwritten by users in a short period of time after garbage collection data is moved, which leads to a decrease in the efficiency of garbage collection. The coordination of this type of data needs to be relatively frequent, the coordination frequency is generally moderate, and the accuracy is slightly higher.

[0130] For data type K3, which is the third level, this type of data belongs to cached data with a very short lifespan. The recycling efficiency brought by the traditional garbage collection strategy will be very low, and it is highly likely that the data will be quickly rewritten by the user after being recycled. However, K3 data can become K2 data due to changes in storage system behavior and user behavior. The frequency of coordination is relatively high, and a certain degree of accuracy is required.

[0131] For data type K4, or the fourth level, this type of data is low-value redundant data. This type of data is only process data and has no value for relocation. This type of data accounts for a small proportion and requires timely coordination to change the data type.

[0132] This application's embodiments transform multi-dimensional qualitative assessments into clear and executable priority determination rules by setting explicit value, frequency, and lifecycle thresholds. This automates and standardizes data priority classification, reduces the arbitrariness of subjective judgment, ensures consistency and predictability in priority ranking among different data types, and provides a reliable decision-making basis for large-scale, efficient collaborative data management by the host system.

[0133] In some embodiments, determining the first priority of the data to be coordinated based on the first information includes: fusing the data in the first information according to the weights corresponding to each data item to determine the first priority of the data to be coordinated.

[0134] In this embodiment, a weighting coefficient can be configured for each piece of data (e.g., data priority, system load, write amplification contribution, update frequency, etc.) included in the first information. These weighting coefficients can be preset or dynamically adjusted. Then, based on the weights of each piece of data, they are comprehensively calculated and fused (e.g., weighted summation or other fusion algorithms) to finally determine the first priority of the data to be coordinated.

[0135] Optionally, a pre-trained deep learning model can be used to identify each data item in the first information to obtain the first priority.

[0136] This application's embodiments introduce configurable weighting coefficients to weight and fuse multi-source information, making the calculation of the first priority highly flexible and adjustable. Users or systems can dynamically adjust the weight of each decision factor according to different business scenarios or optimization goals, thereby customizing and generating data priorities that best suit current needs, achieving refined management and adaptive optimization of priority strategies.

[0137] In some embodiments, the first information includes: the first write amplification contribution, update frequency, data priority, and system load of the solid-state drive of the data to be coordinated; the data in the first information are fused according to the weights corresponding to each data to determine the first priority of the data to be coordinated, including: weighting and fusing the write amplification contribution, update frequency, data priority, and system load of the data to be coordinated according to the first weight of the first write amplification contribution, the second weight of the update frequency, the third weight of the data priority, and the fourth weight of the system load to determine the first priority of the data to be coordinated.

[0138] Among them, the second weight is less than or equal to the first weight and greater than the third weight; the fourth weight is less than or equal to the third weight.

[0139] The first priority P can be determined according to formula (1), which is as follows:

[0140] (1)

[0141] in, The weight that contributes to write amplification can be a fixed value in practice and is the core objective of write amplification optimization. It is the largest among the four weight parameters. The update frequency has a greater impact on the number of rewrites than the update frequency itself; The lifecycle weight determines the value of write amplification optimization over a long period of time. To adapt weights to system load, when the SSD load is high, the frequency of collaborative interaction should be reduced to improve the SSD's IO response capability. The write amplification contribution coefficient is obtained by using historical statistics of SSDs and normalizing the data. The data update frequency is calculated by normalizing the host's statistical write speed, for example, by using the percentage of updates of various types of data within a fixed time range; The value is determined based on the data type; for example, class K1 can take 6, class K2 can take 2, class K3 can take 1, and class K4 can take 0.2. The value represents the system load and is determined based on the system load. For example, a system load of ≤30% indicates a low point and can be set to 1.0; a system load of 30%-70% indicates a stable system and can be set to 0.8; and a system load of ≥70% indicates a peak and can be set to 0.5.

[0142] For example, the above four weights can meet the following requirements. The specific value can be determined based on actual measurements in the firmware implementation. For example, it can be achieved by using... The value of .

[0143] For example, the application rules for the first priority can be set as follows: if P ≥ 0.8, it is determined to be of extremely high priority (P1), and the collaborative interaction is triggered first; if 0.6 ≤ P < 0.8, it is determined to be of high priority (P2), and the second priority is triggered; if 0.3 ≤ P < 0.6, it is determined to be of medium priority (P3), and it can be triggered as needed (during system downtime); if P < 0.3, it is determined to be of low priority (P4), and the collaboration is not triggered (using traditional processing).

[0144] It should be noted that the above thresholds (0.8, 0.6, 0.3) are just examples and can be adjusted according to the actual situation.

[0145] This application's embodiments establish a clear weighting relationship: write amplification contribution has the highest weight, followed by update frequency, then data priority, and finally, system load has the lowest weight. This sets reducing physical wear (write amplification) and improving recycling efficiency (focusing on frequently updated data) as the core optimization objectives. This ensures that the calculated first priority strongly guides the SSD to prioritize the recycling of data that has a significant impact on its lifespan and is frequently updated, thereby achieving a more effective balance between write amplification optimization and performance improvement at the system level.

[0146] In some embodiments, sending a first message to the solid-state drive includes: determining a trigger threshold based on system load; and sending a first message to the solid-state drive if a first priority is greater than the trigger threshold.

[0147] In this embodiment, the host can determine a dynamic trigger threshold based on the currently acquired solid-state drive system load. Then, the host compares the calculated first priority with this trigger threshold. Only when the first priority is greater than (i.e., higher than) the trigger threshold will the host send a first message containing this first priority to the solid-state drive; otherwise, the host may not send the message or take other actions.

[0148] This application's embodiments achieve intelligent throttling of priority message sending by introducing a dynamic trigger threshold based on system load. This ensures that the host only initiates a collaborative reclamation request to the SSD when the data priority is sufficiently high and the system load conditions are suitable, avoiding interference caused by frequently sending low-value instructions when the SSD is under high load, thereby improving communication efficiency and the accuracy of collaborative operations.

[0149] In some embodiments, the trigger threshold is linearly related to the system load.

[0150] For example, to reduce invalid interactions, the interaction trigger threshold T can be dynamically calculated based on the system load. When the data priority score P > T, the interaction is triggered, and the following formula (2) can be used:

[0151] (2)

[0152] in, The current CPU utilization rate (%) is 0-100; the threshold T ranges from 0.3 (CPU utilization 0%, low period) to 0.8 (CPU utilization 100%, peak period).

[0153] According to formula (2) above, during peak system periods (CPU ≥ 70%), T ≥ 0.65, allowing only high-value data of types P1 and P2 to trigger interactions, thus reducing the occupation of host resources by interactions; during off-peak periods (CPU ≤ 30%), T ≤ 0.45, allowing data of type K3 to join the collaboration, making full use of idle resources to optimize write amplification. Theoretically, this mechanism can reduce the proportion of invalid interactions.

[0154] The interaction between the host and the SSD can be extended based on the NVMe standard protocol, and an independent system control path can be designed.

[0155] In the process of dual-judgment triggering using priority and threshold: the host collaborative data identification unit can scan LBA block data once based on a preset period (e.g., 60s); (the preset period can be adjusted according to the computing power of the system. The longer the time interval, the worse the collaborative effect, and the shorter the time interval, the better the effect, but the greater the impact on performance).

[0156] The first priority P and the trigger threshold T are calculated according to formula (1).

[0157] If P > T, then the interaction preparation is triggered; otherwise, it is skipped.

[0158] In some embodiments, when the system load is greater than or equal to a first preset load and less than or equal to a second preset load (where the first preset load is less than the second preset load), the trigger threshold is set to be linearly related to the system load; for example, the higher the load, the higher the trigger threshold. When the system load is less than the first preset load or greater than the second preset load, the trigger threshold is determined to be an invalid value, meaning that within this load range, the trigger mechanism may not be applicable or may require special handling.

[0159] This application's embodiments achieve refined and safe boundary control of the collaborative triggering strategy by defining a linear relationship between the trigger threshold and system load. It ensures that collaborative operations are intelligently adjusted only when the system load is within a typical operating range, avoiding inappropriate interventions when the load is extremely low or high, thereby improving the applicability and robustness of the collaborative mechanism.

[0160] In some embodiments, the method further includes: receiving a second message sent by the solid-state drive; the second message includes: the highest priority of the data to be reclaimed. Based on the highest priority of the data to be reclaimed, a highest allowable reclaiming priority for the data to be reclaimed is determined.

[0161] Send a third message to the solid-state drive; the third message includes: allow reclamation with the highest priority.

[0162] In this embodiment, the host receives a second message from the solid-state drive (SSD), which may include the highest priority of the data to be reclaimed determined internally by the SSD. Based on this highest priority, the host analyzes and makes a decision to determine the highest priority that allows the SSD to be reclaimed (i.e., the highest priority allowed for reclamation). The host can then send a third message to the SSD, which may include the highest priority allowed for reclamation.

[0163] This application's embodiments introduce a closed-loop interactive process involving SSD reporting, host decision-making, and host authorization, thereby centralizing the power to reclaim SSDs with the host. This allows the host to regulate SSD reclamation policies, preventing SSDs from making reclamation decisions that could impact overall performance due to a partial view of the system, and enhancing system-level control over background operations.

[0164] In some embodiments, determining the highest priority for recycling data based on the highest priority of the data to be recycled includes: determining the data priority of the data to be recycled according to the highest priority of the data to be recycled and a first correspondence relationship; the first correspondence relationship includes a one-to-one correspondence relationship between multiple first priorities and multiple data priorities.

[0165] Get the update status of the data to be recycled; the update status includes whether it is being updated and the object that initiated the update.

[0166] Based on the data priority and update status of the data to be recycled, determine the highest priority for recycling the data.

[0167] In some embodiments, the data priority corresponding to the data to be reclaimed can be reverse-looked up or derived based on the received highest priority and a preset first correspondence (which defines a one-to-one mapping between multiple first priorities and multiple data priorities). Secondly, the host obtains the update status of the data to be reclaimed, such as whether the data is currently being updated and the initiator of the update operation (e.g., from which application or user). Finally, the host comprehensively considers the data priority and its update status to determine the final highest priority allowed for reclamation.

[0168] This application's embodiments make a secondary decision by combining the original business priority (data priority) of the data with its real-time update status, making the priority of host authorization reclamation more accurate. This effectively avoids granting high-priority reclamation when data is being updated by critical business processes, thereby preventing resource conflicts between reclamation operations and front-end services, and ensuring the continuity and performance of critical business operations.

[0169] In some embodiments, the second message further includes at least one of the following: a recycling triggering reason and remaining redundant space; determining the highest allowable recycling priority of the data to be recycled based on the highest priority of the data to be recycled, including: determining the highest allowable recycling priority of the data to be recycled based on at least one of the recycling triggering reason and the remaining redundant space, and the highest priority of the data to be recycled.

[0170] In some embodiments, the second message sent by the solid-state drive may also include additional information such as the reason for reclamation (e.g., insufficient redundant space, wear leveling, etc.) and / or remaining redundant space. Accordingly, the host may take this additional information into account when determining the highest priority for reclamation.

[0171] This application's embodiments incorporate the physical state of the SSD (such as remaining space) and internal events (triggering causes) into the host's decision-making process, making the authorization decisions more aligned with the actual health status and urgency of the SSD. This helps the host to more actively reclaim authorizations when SSD space is scarce, or to adopt a more conservative strategy when non-urgent triggers occur, thus achieving coordination between business logic and the physical state of the device.

[0172] In some embodiments, the second message further includes a second write amplification contribution coefficient and / or the amount of data to be reclaimed; the third message further includes a reclamation task allocation ratio that allows the reclamation of data corresponding to the highest priority; the method further includes: determining the reclamation task allocation ratio based on the second write amplification contribution coefficient and / or the amount of data to be reclaimed.

[0173] In some embodiments, the second message may further include a second write amplification contribution coefficient and / or the amount of data to be reclaimed. Accordingly, in addition to allowing the highest priority for reclamation, the host may also return a reclamation task allocation ratio for data of that priority in the third message. The host needs to calculate and determine this reclamation task allocation ratio based on the second write amplification contribution coefficient and / or the amount of data to be reclaimed.

[0174] This application embodiment allows the host to dynamically adjust the intensity (allocation ratio) of a single data recycling operation for various types of data based on the potential impact (contribution coefficient) of the recycling operation on write amplification or the task scale (data volume). This achieves refined and quantitative control over the recycling process.

[0175] Figure 5 This is an interactive schematic diagram of the data garbage collection method provided in the embodiments of this application, such as... Figure 5 As shown, embodiments of this application provide a data garbage collection method, which is described in detail below:

[0176] 501. Host file system / storage system sends data IO log.

[0177] 502. The collaborative data identification unit calculates the first priority P and the trigger threshold T to determine whether to trigger.

[0178] 503. If triggered, output the data attributes (the first priority of the data to be coordinated).

[0179] 504. The collaborative instruction generation unit organizes and sends the first message Msg1.

[0180] 505. SSD receiver unit parsing instruction (i.e., Msg1).

[0181] 506. The SSD receiving unit sends the LBA attribute (e.g., first priority) in the parsed data to be coordinated.

[0182] 507. The GC unit updates the LBA (Level 1 Priority) and RETAIN (Reclaimable) flags in the currently pending data.

[0183] 508. The GC unit organizes and sends a second message, Msg2, to report the GC status (including the highest priority pending garbage collection). It can also report the write amplification contribution coefficient and the SSD's system load (i.e., CPU utilization) for use in the next calculation of P and T.

[0184] 509. The cooperative instruction generation unit determines the highest priority allowed for garbage collection based on the GC status.

[0185] 510. The collaborative instruction generation unit organizes and sends the third message Msg3.

[0186] 511. SSD receiver unit parsing command (i.e., Msg3).

[0187] 512. The SSD receiving unit sends the parsed LBA attributes (e.g., the highest priority for allowing recycling).

[0188] 513. GC unit update and reclamation strategy.

[0189] In this embodiment, through the orderly collaboration of multiple functional units on the host side and the SSD side, closed-loop management from data identification and priority decision-making to recycling execution and feedback is achieved.

[0190] The host performs data identification and instruction generation through steps 501-504. Specifically, the host file system or storage system sends data I / O logs. Based on these logs, the collaborative data identification unit calculates the first priority P of the data to be coordinated and the trigger threshold T determined according to the system load, and determines whether the triggering conditions are met. If triggered, the data attributes containing the first priority are output. The collaborative instruction generation unit organizes and generates the first message Msg1 (i.e., the collaborative instruction containing the first priority) and sends it to the SSD. This process demonstrates that the host performs priority fusion calculation based on multiple dimensions of information such as data value, update frequency, lifecycle, write amplification contribution, and system load, and can control instruction sending based on dynamic thresholds.

[0191] Furthermore, the SSD performs instruction parsing and status feedback through steps 505-508. Specifically, the SSD receiving unit parses Msg1 and extracts its Logical Block Address (LBA) attributes (such as first priority). The Garbage Collection (GC) unit updates its internal management status based on this information, marking the corresponding LBA in the data to be reclaimed to indicate whether it has first priority and whether it should be reclaimed. The GC unit organizes and sends a second message, Msg2, to the host, providing feedback on the current garbage collection status, which includes at least the highest priority of the data to be reclaimed. In addition, Msg2 may also contain write amplification contribution coefficients and SSD system load (such as CPU utilization), providing input for the host to trigger a new Msg1 in the next round of computation.

[0192] Finally, steps 509-513 perform host decision-making authorization and SSD-side policy updates. Specifically, after receiving Msg2, the host-side collaborative instruction generation unit determines the highest allowed priority for reclamation based on the feedback GC status (e.g., highest priority) and may consider update status, triggering reasons, remaining space, etc. Then, it organizes and sends a third message, Msg3, to the SSD. This message contains the highest allowed priority for reclamation and may include parameters such as the reclamation task allocation ratio. The SSD receiving unit parses Msg3 and extracts relevant LBA attributes (e.g., the highest allowed priority for reclamation). Finally, the GC unit updates its reclamation strategy based on the parsed instructions, for example, by performing differentiated reclamation scheduling based on the highest allowed priority and possible task allocation ratio, combined with the channel idle state.

[0193] This application embodiment uses a host-SSD bidirectional collaborative closed-loop mechanism to accurately locate high-value collaborative data, quantify priority ranking, refine interaction command content, and design dynamic triggering strategies. This solves the problems of resource waste, priority confusion, computing power waste, and low interaction efficiency in the prior art, and ultimately achieves a significant reduction in enterprise-level SSD write amplification.

[0194] By employing priority formulas and dynamic thresholds, invalid interactions are reduced, host process switching overhead is decreased, and the response requirements of high-load business scenarios (such as real-time financial transactions) are adapted. Furthermore, write amplification is reduced, increasing SSD lifespan and improving the overall storage lifespan. Instructions include quantized parameters, eliminating the need for secondary parsing by the SSD, thus reducing the controller's computing power consumption. Moreover, by relying on host-SSD collaborative parameter interaction, the blind nature of independent SSD reclamation is avoided, and load grading and priority filtering echo the system's dynamic threshold strategy and data classification standards, ensuring that reclamation operations are highly compatible with the overall collaborative system design.

[0195] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0196] Figure 6 Schematic diagram of the data garbage recycling device provided in the embodiments of this application Figure 1 .like Figure 6 As shown, embodiments of this application also provide a data garbage recycling device, which may include a receiving module 601, a first determining module 602, and a processing module 603.

[0197] The receiving module 601 is used to receive a first message sent by the host; the first message includes a first priority of the data to be coordinated; the first priority is related to the first information; the first information includes the data priority of the data to be coordinated, and at least one of the following: the first system load of the solid-state drive, the first write amplification contribution coefficient of the data to be coordinated, and the update frequency; the data priority is determined according to the data value, update frequency and data life cycle of the data to be coordinated.

[0198] The first determining module 602 is used to update the recycling priority of the target data in the current data to be recycled of the solid-state drive according to the first priority, and obtain the second priority of the target data; the target data is at least a part of the data to be coordinated;

[0199] Processing module 603 is used to process the data to be recycled according to the second priority.

[0200] In some embodiments, the first message may further include at least one of the following: the address range of the data to be coordinated, the first write amplification contribution coefficient, the data lifetime, and whether it is recyclable.

[0201] In some embodiments, the processing module 603 is specifically configured to: determine the highest priority of the data to be reclaimed based on a second priority; send a second message to the host; the second message includes the highest priority of the data to be reclaimed; receive a third message sent by the host; the third message includes: allowing the highest priority to be reclaimed; the allowed highest priority to be reclaimed is determined based on the highest priority of the data to be reclaimed; adjust the data range of the data to be reclaimed according to the allowed highest priority to be reclaimed, obtain new data to be reclaimed, and perform reclaiming processing on the new data to be reclaimed.

[0202] In some embodiments, the processing module 603 is specifically configured to: determine the channel load of multiple channels; determine the load status of multiple channels based on the system load and the channel load of multiple channels; and perform recycling processing on new data to be recycled based on the load status of multiple channels.

[0203] In some embodiments, the processing module 603 is specifically configured to: determine the average channel load based on the channel load of each channel; determine a first coefficient based on the system load; determine an idle channel threshold based on the first coefficient and the average channel load; and determine the load status of each channel based on the channel load and the idle channel threshold.

[0204] In some embodiments, the second message further includes the amount of data to be recycled or the second write amplification contribution coefficient; the third message further includes: the recycling task allocation ratio; the recycling task allocation ratio represents the proportion of the data corresponding to the highest priority that can be recycled in the new data to be recycled, and is determined according to the amount of data to be recycled or the second write amplification contribution coefficient; the processing module 603 is specifically used to: perform recycling processing on the new data to be recycled based on the recycling task allocation ratio and according to the load status of multiple channels.

[0205] In some embodiments, the load state includes an idle state and a non-idle state. The processing module 603 is specifically used to: determine the ratio between the first data and the second data in the data to be recycled according to the recycling task allocation ratio; the second priority of the first data is the same as the highest priority allowed for recycling, and the second priority of the second data is lower than the highest priority allowed for recycling; allocate the first data to the channel in the idle state for recycling processing; and allocate the second data to the channel in the non-idle state for recycling processing.

[0206] In some embodiments, the third message also includes the maximum task volume of a single channel, and the processing module 603 is specifically used to: perform recycling processing on new data to be recycled based on the maximum task volume of a single channel and the load status of multiple channels.

[0207] For a description of the features in the embodiment corresponding to the data garbage collection device, please refer to the relevant description of the embodiment corresponding to the data garbage collection method provided in the solid-state drive side embodiment, which will not be repeated here.

[0208] Figure 7 Schematic diagram of the data garbage recycling device provided in the embodiments of this application Figure 2 .like Figure 7 As shown, embodiments of this application also provide a data garbage collection device, which may include a second determining module 701 and a sending module 702.

[0209] The second determining module 701 is used to determine the corresponding data priority based on the data value, update frequency and data lifecycle of the data to be coordinated.

[0210] The second determining module 701 is further configured to determine the first priority of the data to be coordinated based on the first information; the first information includes data priority and at least one of the following: system load of the solid-state drive, write amplification contribution of the data to be coordinated, and update frequency;

[0211] The sending module 702 is used to send a first message to the solid-state drive; the first message includes a first priority.

[0212] In some embodiments, data priority includes a first level, a second level, a third level, and a fourth level from high to low; the second determining module 701 is specifically used to: determine the data priority as the fourth level if the data value of the data to be coordinated is less than a first preset value; determine the data priority as the first level if the data value of the data to be coordinated is greater than a second preset value and the update frequency is greater than a first frequency; the second preset value is greater than the first preset value; determine the data priority as the third level if the data value of the data to be coordinated is greater than the first preset value, the update frequency is less than the second frequency, and the data lifespan is less than a second preset duration; the first frequency is greater than or equal to the second frequency; determine the data priority as the second level if the data value of the data to be coordinated is greater than the first preset value, the update frequency is less than the second frequency, and the data lifespan is greater than the first preset duration; the first preset duration is greater than or equal to the second preset duration.

[0213] In some embodiments, the second determining module 701 is specifically used to: fuse the data in the first information according to the weights corresponding to each data item, and determine the first priority of the data to be coordinated.

[0214] In some embodiments, the first information includes: the first write amplification contribution, update frequency, data priority, and system load of the solid-state drive of the data to be coordinated; the second determining module 701 is specifically used to: perform weighted fusion of the write amplification contribution, update frequency, data priority, and system load of the solid-state drive of the data to be coordinated based on the first weight of the first write amplification contribution, the second weight of the update frequency, the third weight of the data priority, and the fourth weight of the system load to determine the first priority of the data to be coordinated; wherein, the second weight is less than or equal to the first weight and greater than the third weight; and the fourth weight is less than or equal to the third weight.

[0215] In some embodiments, the sending module 702 is specifically used to: determine a trigger threshold based on system load; if the first priority is greater than the trigger threshold, send a first message to the solid-state drive.

[0216] In some embodiments, the trigger threshold is linearly related to the system load.

[0217] In some embodiments, the sending module 702 is further configured to: receive a second message sent by the solid-state drive; the second message includes: the highest priority of the data to be recycled; determine the highest priority allowed for recycling of the data to be recycled based on the highest priority of the data to be recycled; and send a third message to the solid-state drive; the third message includes: the highest priority allowed for recycling.

[0218] In some embodiments, the sending module 702 is specifically used to: determine the data priority of the data to be recycled based on the highest priority of the data to be recycled and the first correspondence relationship; the first correspondence relationship includes a one-to-one correspondence relationship between multiple first priorities and multiple data priorities; obtain the update status of the data to be recycled; the update status includes whether it is being updated and the update initiator object; and determine the highest priority allowed for recycling of the data to be recycled based on the data priority and update status of the data to be recycled.

[0219] In some embodiments, the second message further includes at least one of the following: a recycling triggering reason and remaining redundant space; the sending module 702 is specifically configured to: determine the highest priority allowed for recycling of the data to be recycled based on at least one of the recycling triggering reason and remaining redundant space, and the highest priority of the data to be recycled.

[0220] In some embodiments, the second message further includes a second write amplification contribution coefficient and / or the amount of data to be reclaimed; the third message further includes a reclamation task allocation ratio that allows the reclamation of data corresponding to the highest priority; the sending module 702 is further configured to: determine the reclamation task allocation ratio based on the second write amplification contribution coefficient and / or the amount of data to be reclaimed.

[0221] For a description of the features in the embodiment corresponding to the data garbage collection device, please refer to the relevant description of the embodiment corresponding to the data garbage collection method provided in the host-side embodiment, which will not be repeated here.

[0222] Figure 8 A schematic diagram of the structure of the electronic device provided in this application. Figure 8 As shown, the electronic device 80 provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the electronic device 80 further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus.

[0223] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to execute the above-described data garbage collection method embodiment.

[0224] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0225] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0226] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0227] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0228] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described embodiments of the data garbage collection method when running.

[0229] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0230] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described embodiments of the data garbage collection method.

[0231] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described data garbage collection method embodiments.

[0232] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0233] The data garbage collection method provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A data garbage collection method characterized by, The method comprises: receiving a first message sent by a host; the first message comprising a first priority of to-be-coordinated data; the first priority being related to first information; the first information comprising a data priority of the to-be-coordinated data and at least one of the following data: a first system load of a solid state disk, a first write amplification contribution coefficient of the to-be-coordinated data, and an update frequency; the data priority being determined according to a data value, an update frequency and a data life cycle of the to-be-coordinated data; updating, according to the first priority, a recycling priority of target data in current to-be-recycled data of a solid state disk, to obtain a second priority of the target data; the target data being at least part of the to-be-coordinated data; recycling processing the to-be-recycled data according to the second priority; wherein the recycling processing the to-be-recycled data according to the second priority comprises: determining a highest priority of the to-be-recycled data based on the second priority; sending a second message to the host; the second message comprising the highest priority of the to-be-recycled data; receiving a third message sent by the host; the third message comprising: an allowed recycling highest priority; the allowed recycling highest priority being determined based on the highest priority of the to-be-recycled data; adjusting a data range of the to-be-recycled data according to the allowed recycling highest priority, to obtain new to-be-recycled data, and recycling processing the new to-be-recycled data.

2. The data garbage collection method according to claim 1, characterized by, The first message further comprises at least one of the following: an address range of the to-be-coordinated data, a first write amplification contribution coefficient, a data life cycle, and a recyclable flag.

3. The data garbage collection method according to claim 2, characterized by, The recycling processing the new to-be-recycled data comprises: determining channel loads of multiple channels; determining load states of the multiple channels according to the system load and the channel loads of the multiple channels; recycling processing the new to-be-recycled data according to the load states of the multiple channels.

4. The data garbage collection method according to claim 3, characterized by, The determining the load states of the multiple channels according to the system load and the channel loads of the multiple channels comprises: determining an average channel load according to the channel loads of the channels; determining a first coefficient according to the system load; determining an idle channel threshold according to the first coefficient and the average channel load; for each channel, determining a load state of the channel according to the channel load of the channel and the idle channel threshold.

5. The data garbage collection method according to claim 3, characterized by, The second message further comprises a data amount of the to-be-recycled data or a second write amplification contribution coefficient; the third message further comprises: a recycling task allocation proportion; the recycling task allocation proportion representing a proportion of data corresponding to the allowed recycling highest priority in the new to-be-recycled data, and being determined according to the data amount of the to-be-recycled data or the second write amplification contribution coefficient; the recycling processing the new to-be-recycled data according to the load states of the multiple channels comprises: recycling processing the new to-be-recycled data according to the load states of the multiple channels based on the recycling task allocation proportion.

6. The data garbage collection method according to claim 5, wherein, The load state includes an idle state and a non-idle state, and the recycling processing of the new to-be-recycled data according to the load states of the multiple channels based on the recycling task allocation ratio includes: According to the recycling task allocation ratio, the ratio between first data and second data in the to-be-recycled data is determined; the second priority of the first data is the same as the allowed recycling highest priority, and the second priority of the second data is less than the allowed recycling highest priority; The first data is allocated to a channel in the idle state for recycling processing; The second data is allocated to a channel in the non-idle state for recycling processing.

7. The data garbage collection method according to claim 3, characterized by, The third message further includes a single-channel maximum task amount, and the recycling processing of the new to-be-recycled data includes: The recycling processing of the new to-be-recycled data according to the load states of the multiple channels based on the single-channel maximum task amount.

8. A data garbage collection method characterized by comprising: The method includes: According to the data value, update frequency and data life cycle of the to-be-coordinated data, a corresponding data priority is determined; According to first information, a first priority of the to-be-coordinated data is determined; the first information includes the data priority and at least one of the following data: system load of a solid state disk, write amplification contribution degree of the to-be-coordinated data, update frequency; A first message is sent to the solid state disk; the first message includes the first priority; The method further includes: A second message sent by the solid state disk is received; the second message includes: a highest priority of to-be-recycled data; Based on the highest priority of the to-be-recycled data, an allowed recycling highest priority of the to-be-recycled data is determined; A third message is sent to the solid state disk; the third message includes: the allowed recycling highest priority.

9. The data garbage collection method according to claim 8, characterized by, The data priority includes a first level, a second level, a third level and a fourth level from high to low; According to the data value, update frequency and data life cycle of the to-be-coordinated data, a corresponding data priority is determined, including: If the data value of the to-be-coordinated data is less than a first preset value, it is determined that the data priority is the fourth level; If the data value of the to-be-coordinated data is greater than a second preset value and the update frequency is greater than a first frequency, it is determined that the data priority is the first level; the second preset value is greater than the first preset value; If the data value of the to-be-coordinated data is greater than the first preset value, the update frequency is less than a second frequency, and the data life cycle is less than a second preset time length, it is determined that the data priority is the third level; the first frequency is greater than or equal to the second frequency; If the data value of the to-be-coordinated data is greater than the first preset value, the update frequency is less than a second frequency, and the data life cycle is greater than a first preset time length, it is determined that the data priority is the second level; the first preset time length is greater than or equal to the second preset time length.

10. The data garbage collection method according to claim 8, wherein, According to the first information, a first priority of the to-be-coordinated data is determined, including: According to the weight corresponding to each item of data, each item of data in the first information is fused to determine the first priority of the to-be-coordinated data.

11. The data garbage collection method according to claim 10, wherein, The first information includes: a first write amplification contribution degree of the to-be-coordinated data, an update frequency, a data priority, and a system load of the solid state disk; and the first priority of the to-be-coordinated data is determined by fusing each item of data in the first information according to a weight corresponding to each item of data. The first priority of the to-be-coordinated data is determined by weighting and fusing the write amplification contribution degree of the to-be-coordinated data, the update frequency, the data priority, and the system load of the solid state disk according to a first weight of the first write amplification contribution degree, a second weight of the update frequency, a third weight of the data priority, and a fourth weight of the system load. The second weight is less than or equal to the first weight and greater than the third weight, and the fourth weight is less than or equal to the third weight.

12. The data garbage collection method according to claim 8, wherein, The first message is sent to the solid state disk, including: The trigger threshold is determined according to the system load; If the first priority is greater than the trigger threshold, the first message is sent to the solid state disk.

13. The data garbage collection method according to claim 12, wherein, The trigger threshold is linearly related to the system load.

14. The data garbage collection method according to claim 8, characterized by, The allowed recycling highest priority of the to-be-recycled data is determined based on the highest priority of the to-be-recycled data, including: The data priority of the to-be-recycled data is determined according to the highest priority of the to-be-recycled data and a first correspondence relationship; the first correspondence relationship includes a one-to-one correspondence relationship between a plurality of first priorities and a plurality of data priorities; The update situation of the to-be-recycled data is obtained; the update situation includes whether to update and an update initiator; The allowed recycling highest priority of the to-be-recycled data is determined according to the data priority of the to-be-recycled data and the update situation.

15. The data garbage collection method according to claim 8, wherein, The second message further includes at least one of the following: a recycling trigger reason and a remaining redundant space; and the allowed recycling highest priority of the to-be-recycled data is determined based on the highest priority of the to-be-recycled data, including: The allowed recycling highest priority of the to-be-recycled data is determined according to at least one of the recycling trigger reason and the remaining redundant space and the highest priority of the to-be-recycled data.

16. The data garbage collection method according to claim 8, characterized by, The second message further includes a second write amplification contribution coefficient and / or a data amount of the to-be-recycled data; and the third message further includes a recycling task allocation proportion of data corresponding to the allowed recycling highest priority. The method further includes: The recycling task allocation proportion is determined according to the second write amplification contribution coefficient and / or the data amount of the to-be-recycled data.

17. A data garbage collection apparatus characterized by comprising: The method further includes: The receiving module is configured to receive a first message sent by a host; the first message includes a first priority of to-be-coordinated data; the first priority is related to first information; the first information includes a data priority of the to-be-coordinated data and at least one of the following data: a first system load of a solid state disk, a first write amplification contribution coefficient of the to-be-coordinated data, and an update frequency; and the data priority is determined according to a data value, an update frequency, and a data life cycle of the to-be-coordinated data. The first determining module is configured to update a recycling priority of target data in the current to-be-recycled data of the solid state disk according to the first priority, and obtain a second priority of the target data; the target data is at least part of the to-be-coordinated data; The processing module is configured to perform recycling processing on the to-be-recycled data according to the second priority; The processing module is specifically configured to: determine a highest priority of the to-be-recycled data based on the second priority; send a second message to the host; the second message includes the highest priority of the to-be-recycled data; receive a third message sent by the host; The third message includes: an allowed recycling highest priority; the allowed recycling highest priority is determined based on the highest priority of the to-be-recycled data; adjust a data range of the to-be-recycled data according to the allowed recycling highest priority, obtain new to-be-recycled data, and perform recycling processing on the new to-be-recycled data.

18. A data garbage collection apparatus characterized by comprising: Comprise: The second determining module is configured to determine a corresponding data priority according to a data value, an update frequency, and a data life cycle of to-be-coordinated data; The second determining module is further configured to determine a first priority of the to-be-coordinated data according to first information; the first information includes the data priority and at least one of the following data: a system load of the solid state disk, a write amplification contribution degree of the to-be-coordinated data, and an update frequency; The sending module is configured to send a first message to the solid state disk; the first message includes the first priority; The sending module is further configured to: receive a second message sent by the solid state disk; the second message includes: a highest priority of to-be-recycled data; determine an allowed recycling highest priority of the to-be-recycled data based on the highest priority of the to-be-recycled data; send a third message to the solid state disk; the third message includes: the allowed recycling highest priority.

19. An electronic device, comprising: Comprise: The memory is configured to store a computer program; The processor is configured to implement the steps of the data garbage recycling method or of any one of claims 1-16 when executing the computer program.

20. A solid state drive, comprising: Comprise The memory is configured to store a computer program; The processor is configured to implement the steps of the data garbage recycling method or of any one of claims 1-7 when executing the computer program.

21. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and when the computer program is executed by the processor, the steps of the data garbage recycling method of any one of claims 1-16 are implemented.

22. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor, and the steps of the data garbage recycling method of any one of claims 1-16 are implemented.

Citation Information

Patent Citations

  • Solid state disk configuration method, garbage collection method and related equipment

    CN117909250A

  • Storage space recovery method, electronic equipment, storage medium and program product

    CN120335733A