A method and system for optimizing data distribution in intelligent hard disk drives with built-in SLC NAND caching.
By generating data feature vectors for dynamic logical partitioning and migration of SLC NAND cache, the problems of cache pollution and performance degradation are solved, cache space utilization is optimized, and system performance and cache device lifespan are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 四川华鲲振宇智能科技有限责任公司
- Filing Date
- 2026-07-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing SLC NAND cache management methods cannot effectively distinguish between long-term access value and short-term behavior of data, resulting in cache pollution and performance degradation. Furthermore, the write lifecycle is consumed by low-value data, and the cache management strategy is out of sync with the state of the main storage area.
By monitoring host input/output requests, a data feature vector containing access mode type, lifecycle type, and long-term access popularity value is generated. Dynamic logical partitioning and SLC caching are used to route data to the corresponding partitions, periodically evaluate and perform data migration based on the status of the main storage area.
It effectively distinguishes the long-term value of data, optimizes cache space utilization, improves system performance and stability, reduces cache device wear, and increases cache hit rate and overall storage performance.
Smart Images

Figure CN122489018A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data storage technology, and in particular to a method and system for optimizing data distribution in a smart hard disk drive with built-in SLC NAND cache. Background Technology
[0002] In the field of data storage technology, intelligent hard drives such as hybrid solid-state drives (SSHDs) or solid-state drives (SSDs) employing SLC caching technology widely utilize SLC NAND flash memory as a high-speed cache layer. Their core objective is to migrate frequently accessed data from the large-capacity main storage area to the SLC cache to improve system read performance. Traditional cache management mechanisms primarily rely on simple replacement algorithms based on access timestamps, such as the Least Recently Used (LRU) strategy, to implement unified and coarse-grained management of the entire SLC cache space. However, such methods have significant limitations: they only make decisions based on the recent access frequency of data and cannot effectively distinguish between the long-term access value and short-term behavior patterns of data. In practical applications, temporary data generated by bursty sequential write operations (such as large file copying or temporary data generation) is incorrectly identified as high-value hot data, occupying a large amount of SLC cache space. This causes truly critical data with long-term high access frequency (such as operating system kernel files or frequently used application data) to be squeezed out of the cache, resulting in severe cache pollution. This directly leads to a decrease in cache hit rate and deterioration in system response performance. Meanwhile, the physical characteristics of SLC NAND flash memory limit its write lifespan, and the frequent writing and replacement of temporary data unnecessarily consumes valuable write cycles, accelerating the wear and tear of the cache device. In addition, existing cache management strategies are completely decoupled from the operating status of the main storage area; when the main storage area is in a high-latency state due to garbage collection or other background tasks, the cache system still mechanically performs data migration operations, further exacerbating performance jitter and latency spikes.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this application is to provide a method and system for optimizing data distribution in a smart hard disk drive with built-in SLC NAND cache, which aims to optimize cache space utilization, improve system performance stability, and reduce cache device wear.
[0005] To achieve the above objectives, this application proposes a data distribution optimization method for a smart hard disk drive with built-in SLC NAND cache, the method comprising: Monitor host input / output requests, and generate a data feature vector containing access mode type, lifecycle type, and long-term access popularity value for the accessed data based on the requests; Based on the data feature vector, the SLC cache space is dynamically logically partitioned to generate a logical partition configuration that defines at least three logical partitions and their management strategies. For data that needs to be cached, based on the data feature vector and the logical partition configuration, it is routed and stored in the corresponding logical partition in the SLC cache. Periodically, based on the updated data feature vector and the logical partition configuration, the state of the data in the SLC cache is evaluated, and a data migration instruction set is generated. Based on the data migration instruction set and the current performance status of the main storage area, perform data migration between logical partitions and from the SLC cache to the main storage area.
[0006] In one embodiment, the step of monitoring host input / output requests and generating a data feature vector containing access mode type, lifecycle type, and long-term access popularity value for the accessed data based on the requests includes: Record the logical block address and access timestamp of each request in the host input / output requests; Based on the historical records of the logical block address and access timestamp, calculate the long-term access popularity value of the corresponding data; Analyze the request size and address continuity of the request to mark the access mode type of the accessed data; Track subsequent access behavior to the data, predict and label the data's lifecycle type; The long-term access popularity value, the access mode type, and the lifecycle type are integrated to generate the data feature vector.
[0007] In one embodiment, the step of analyzing the request size and address continuity of the request to mark the access pattern type of the accessed data includes: The average size of data requests is statistically analyzed, and the address continuity of the data requests is also analyzed. If the average size is less than a first threshold and the address continuity is less than a second threshold, then the data is marked as a random small-granularity access mode. If the average size is greater than or equal to the first threshold and the address continuity is greater than or equal to the second threshold, then the data is marked as a sequential large-granularity access mode.
[0008] In one embodiment, the step of tracking subsequent access behavior to the data and predicting and labeling the lifecycle type of the data includes: Monitor the number of times newly written data is accessed within a preset observation period; If the number of accesses to the newly written data exceeds the third threshold during the observation period but the subsequent continuous period of no access exceeds the silent threshold, then it is marked as temporary data. If the number of accesses to the newly written data exceeds the fourth threshold during the observation period and in several consecutive statistical periods thereafter, it will be marked as long-term hot data.
[0009] In one embodiment, the step of dynamically logically partitioning the SLC cache space based on the data feature vector to generate a logical partition configuration that defines at least three logical partitions and their management strategies includes: Based on the distribution of access mode types of all data in the data feature vector, the capacity ratio of the first logical partition and the second logical partition is determined. The first logical partition is used to store data marked as random small-granularity access mode, and the second logical partition is used to store data marked as sequential large-granularity access mode. Configure the capacity of the third logical partition used to temporarily store newly written data and data to be evaluated; The first logical partition, the second logical partition, and the third logical partition are configured with promotion thresholds and demotion thresholds respectively to form the logical partition configuration.
[0010] In one embodiment, for data that needs to be cached, the step of routing and storing it into the corresponding logical partition in the SLC cache based on the data feature vector and the logical partition configuration includes: Based on the data feature vector of the data to be cached and the logical partition configuration, if the access mode type of the data is random small-granularity access mode and the lifecycle type is long-term hot data, then it is routed to the first logical partition. Based on the data feature vector of the data to be cached and the logical partition configuration, if the access mode type of the data is sequential large-granularity access mode, then it is routed to the second logical partition; Based on the data feature vector of the data to be cached and the logical partition configuration, if the data does not meet the corresponding conditions of the first and second logical partitions, the data is routed to the third logical partition.
[0011] In one embodiment, the step of periodically evaluating the state of data in the SLC cache based on the updated data feature vector and the logical partition configuration, and generating a data migration instruction set, includes: Scan each logical partition of the SLC cache to obtain the latest access records of data within the partition; Based on the latest access record, update the long-term access popularity value and lifecycle type of the corresponding data to update its data feature vector; The long-term access popularity value in the updated data feature vector is compared with the promotion threshold or demotion threshold of the logical partition where the data is located in the logical partition configuration. Based on the comparison results and the updated lifecycle type, a migration instruction for the data is generated; All migration instructions are gathered to generate the data migration instruction set.
[0012] In one embodiment, the step of generating migration instructions for the data based on the comparison result and the updated lifecycle type includes: For data located in the third logical partition, if its updated long-term access popularity value exceeds the promotion threshold of the third logical partition in the logical partition configuration and its lifecycle type is long-term hot data, a migration instruction to promote to the first logical partition is generated. For data located in the first logical partition, if its updated long-term access popularity value is lower than the degradation threshold of the first logical partition in the logical partition configuration, a migration instruction to downgrade to the main storage area is generated. For data located in the second logical partition, if the latest access record indicates that access has stopped for more than a preset time, a migration instruction to downgrade to the primary storage area is generated.
[0013] In one embodiment, the steps of migrating data between logical partitions and from the SLC cache to the main storage area based on the data migration instruction set and the current performance status of the main storage area include: Parse the data migration instruction set and obtain the current write latency status of the main storage area; If the current write latency is higher than the latency threshold, all migration instructions downgraded to the main storage area in the data migration instruction set will be temporarily suspended, and the corresponding data will be temporarily stored in the reserved area of the SLC cache. When the current write latency state recovers to below the latency threshold, the data in the reserved area will be written to the main storage area in batches; The execution of the data migration instructions focuses on migration instructions between logical partitions within the SLC cache.
[0014] Furthermore, to achieve the above objectives, this application also proposes a smart hard disk drive data distribution optimization system with built-in SLC NAND cache. The smart hard disk drive data distribution optimization system with built-in SLC NAND cache includes: a memory, a processor, and a smart hard disk drive data distribution optimization program with built-in SLC NAND cache stored on the memory and executable on the processor. The smart hard disk drive data distribution optimization program with built-in SLC NAND cache is configured to implement the steps of the smart hard disk drive data distribution optimization method with built-in SLC NAND cache.
[0015] The proposed method and system for optimizing data distribution in a smart hard disk drive with built-in SLC NAND caching includes monitoring host input / output requests to generate data feature vectors containing access mode type, lifecycle type, and long-term access popularity value; dynamically partitioning the SLC cache; routing data to the corresponding partitions; periodically evaluating and migrating data; and considering the status of the main storage area. This solves the problems of cache pollution, performance degradation, and write wear caused by the inability to distinguish the long-term value of data in traditional cache management. It can effectively distinguish data access modes, optimize cache space utilization, improve system performance stability, and reduce cache device wear. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating an embodiment of the data distribution optimization method for a smart hard disk drive with built-in SLC NAND cache in this application. Figure 2 This is a schematic diagram of a structure provided for an embodiment of the intelligent hard disk drive data distribution optimization system with built-in SLC NAND cache in this application.
[0019] Explanation of icon numbers: 10. Memory; 20. Processor.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] The technical solutions 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. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of this application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0022] It should be understood that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0023] In existing technologies, SLC NAND cache management primarily relies on a simple replacement algorithm based on access timestamps for uniform coarse-grained management. This method cannot effectively distinguish between the long-term access value and short-term behavior of data, leading to temporary data polluting the cache space, crowding out the space for long-term hot data, and severely reducing cache hit rate and overall performance. Furthermore, the SLC cache write lifecycle is consumed by a large amount of low-value data, and the cache management strategy is disconnected from the busy state of the backend main storage, making collaborative optimization impossible.
[0024] Based on this, embodiments of this application provide a method for optimizing data distribution in a smart hard disk drive with built-in SLC NAND cache, referring to... Figure 1 The data distribution optimization method for the intelligent hard disk drive with built-in SLC NAND cache includes steps S100 to S500, wherein: Step S100: Monitor host input / output requests, and generate a data feature vector containing access mode type, lifecycle type and long-term access popularity value for the accessed data based on the requests; Step S200: Based on the data feature vector, dynamically logically partition the SLC cache space to generate a logical partition configuration that defines at least three logical partitions and their management strategies. Step S300: For data that needs to be cached, based on the data feature vector and the logical partition configuration, route it and store it in the corresponding logical partition in the SLC cache; Step S400: Periodically evaluate the status of the data in the SLC cache based on the updated data feature vector and the logical partition configuration, and generate a data migration instruction set; Step S500: Based on the data migration instruction set and the current performance status of the main storage area, perform data migration between logical partitions and from the SLC cache to the main storage area.
[0025] In this embodiment, SLC NAND cache refers to using single-layer cell NAND flash memory as a high-speed cache area. Its characteristics include fast read / write speeds and relatively limited erase / write lifespan, and it is often used to improve the performance of storage systems. Intelligent hard disk drive refers to a storage device that integrates traditional mechanical hard disk drives or NAND flash memory with intelligent cache management logic, aiming to improve overall performance by optimizing the distribution of data across different storage media. Data feature vector refers to a set of attributes used to describe accessed data. It includes multiple dimensions, such as access pattern type, lifecycle type, and long-term access frequency value, used to comprehensively characterize the behavioral characteristics and value of the data. Access pattern type refers to the read / write behavior pattern exhibited when data is accessed, such as random or sequential access, or fine-grained or large-grained access.
[0026] In this embodiment, lifecycle type refers to the access activity characteristics exhibited by data throughout its entire lifecycle, from creation to when it is no longer accessed, such as whether it is temporary data or long-term hot data. Long-term access heat value is a quantitative indicator measuring the frequency and importance of data access over a long period, reflecting the continued access value of the data. Dynamic logical partitioning refers to the logical division of the physical storage space of the SLC cache according to the characteristics of the data, and the size and number of partitions can be adjusted according to changes in system operating status and data characteristics. Logical partition configuration refers to the set of attributes and management rules defining each logical partition in the SLC cache, including but not limited to the partition capacity, the type of data stored, and the data migration strategy within and outside the partition. Data migration instruction set refers to a series of operation instructions generated by the cache management logic, used to guide the movement of data between different logical partitions of the SLC cache and between the SLC cache and the main storage area. The main storage area refers to the area in the intelligent hard disk drive used for long-term storage of large amounts of data, typically composed of high-capacity NAND flash memory or mechanical hard disk drives, whose read / write performance is usually lower than that of the SLC cache.
[0027] In this embodiment, the intelligent hard disk drive data distribution optimization method with built-in SLC NAND cache first monitors host input / output requests and generates data feature vectors for the accessed data based on these requests. These data feature vectors include access mode type, lifecycle type, and long-term access popularity value. For example, the system administrator can manually preset the access mode type, lifecycle type, and an initial long-term access popularity value for each data type. Alternatively, the system can simply record the number of times data is accessed as the long-term access popularity value and roughly determine its lifecycle type based on the length of time the data was created.
[0028] In this embodiment, based on the generated data feature vector, the SLC cache space is dynamically logically partitioned, and a logical partition configuration defining at least three logical partitions and their management strategies is generated. For example, the SLC cache space can be divided into three fixed-size logical partitions, used to store random access data, sequential access data, and newly written data, respectively. Each partition can be set with a simple capacity limit, and when a partition is full, the oldest data is evicted using a first-in, first-out (FIFO) strategy.
[0029] In this embodiment, for data that needs to be cached, it is routed and stored in the corresponding logical partition in the SLC cache based on the data feature vector and logical partition configuration of the data. For example, based on the access mode type in the data feature vector, all data marked as "random" can be routed to the first logical partition, all data marked as "sequential" can be routed to the second logical partition, and other data can be routed to the third logical partition.
[0030] Furthermore, this method periodically evaluates the state of data within the SLC cache based on the updated data feature vectors and logical partition configuration, and generates a data migration instruction set. For example, a fixed time interval can be set to scan the data in the SLC cache and simply update the data access count. Then, the updated access count is compared with a preset global threshold; if it exceeds the threshold, a "retain" instruction is generated; otherwise, a "remove" instruction is generated.
[0031] In this embodiment, finally, based on the generated data migration instruction set and the current performance state of the main storage area, the migration of data between logical partitions and from the SLC cache to the main storage area is executed. For example, once data migration instructions are generated, the system immediately executes these instructions to move data from one logical partition to another, or to downgrade data from the SLC cache to the main storage area, regardless of the current write load or latency of the main storage area.
[0032] In this embodiment, by performing in-depth analysis of host input / output requests, multi-dimensional feature vectors are generated for the data, and the SLC cache space is dynamically logically partitioned and finely managed accordingly. This effectively distinguishes between the long-term value and short-term behavior of data, avoids temporary data contamination of the cache space, and ensures that long-term frequently accessed data is prioritized for caching, thereby improving cache hit rate and overall storage performance. Simultaneously, data migration is performed in conjunction with the performance status of the main storage area, avoiding performance fluctuations caused by main storage area overload and optimizing the write lifespan of the SLC cache.
[0033] In some of the embodiments described above in this application, a method of generating data feature vectors to guide the optimization of data distribution in SLC cache is proposed. However, if the generation process of data feature vectors lacks sufficient granularity and accuracy, such as failing to fully capture the access characteristics, lifecycle, and popularity of data, it may lead to inaccurate subsequent cache partitioning, data routing, and migration decisions, thereby affecting the overall efficiency and performance of SLC cache.
[0034] To address this, this application further proposes a step for monitoring host input / output requests and generating a data feature vector containing access mode type, lifecycle type, and long-term access popularity value for the accessed data based on the requests. This step includes: recording the logical block address and access timestamp of each request in the host input / output requests; calculating the long-term access popularity value of the corresponding data based on the historical records of the logical block address and access timestamp; analyzing the request size and address continuity of the requests to label the access mode type of the accessed data; tracking subsequent access behavior of the data to predict and label the lifecycle type of the data; and integrating the long-term access popularity value, the access mode type, and the lifecycle type to generate the data feature vector.
[0035] In this embodiment, recording the logical block address and access timestamp of each request in the host input / output requests is the basis for generating data feature vectors. The I / O monitoring module in the storage controller or hard disk firmware can capture each read / write request issued by the host in real time and accurately record the logical block address (LBA) involved in the request and the system timestamp when the request occurred. This raw access information is stored in a history buffer or log file, providing detailed raw data for subsequent data analysis.
[0036] Based on this, the long-term access popularity value of the corresponding data is calculated using the historical records of the logical block address and access timestamp. This step aims to quantify the frequency and recentity of data access. For example, access counts within a sliding time window, exponential moving average (EMA), or other weighted algorithms can be used to calculate the popularity value. Recently accessed data receives a higher weight, causing its popularity value to rise rapidly; while data that has not been accessed for a long time will have its popularity value gradually decay. This popularity value is usually normalized to a preset range to facilitate subsequent comparisons and decisions.
[0037] In this embodiment, the request size and address continuity of the requests are analyzed to label the accessed data with access pattern types. This analysis aims to distinguish whether the data access pattern is random small-granularity access or sequential large-granularity access. The system calculates the average size of individual I / O requests and evaluates whether the logical block addresses of a series of consecutive requests are continuous. For example, if the request sizes are generally small and the logical block addresses jump significantly, it is likely to be labeled as a random small-granularity access pattern; if the request sizes are generally large and the logical block addresses increase sequentially, it is likely to be labeled as a sequential large-granularity access pattern. This pattern recognition is crucial for subsequent cache partitioning strategies.
[0038] In this embodiment, subsequent access behavior of the data is tracked to predict and label the data's lifecycle type. This step predicts future access trends by observing the access patterns of data over a period of time after it is written or first accessed. For example, for newly written data, the system monitors its access frequency within a preset observation period. If data is frequently accessed in a short period but then quickly cools down, it may be labeled as temporary data; if data maintains a high access frequency over a longer period, it may be labeled as long-term hot data. This lifecycle prediction helps avoid short-term hot data occupying valuable SLC cache space for extended periods.
[0039] In this embodiment, the long-term access popularity value, the access pattern type, and the lifecycle type are ultimately integrated to generate the data feature vector. This integration process brings together the three independent analysis results into a unified data structure, such as a tuple or a structure. This data feature vector comprehensively describes the access characteristics of a specific data block, including its activity level, access method, and expected lifecycle. This vector will serve as the core basis for subsequent SLC cache management decisions (such as partitioning, routing, and migration).
[0040] In this embodiment, through the above technical solution, this application can perform in-depth analysis of host input / output requests, accurately calculate the long-term access heat value of data from logical block addresses and access timestamps, and identify its access pattern type by combining request size and address continuity. Simultaneously, it tracks subsequent access behavior to predict the data's lifecycle type. This multi-dimensional and refined data feature vector generation mechanism enhances the understanding and characterization of data characteristics. Therefore, subsequent operations such as dynamic logical partitioning of the SLC cache space, data routing, and state evaluation will be based on a more accurate and comprehensive data profile, ensuring that data can be rationally allocated to the most suitable logical partition. This effectively avoids the problems of low data caching efficiency or frequent invalid migrations caused by inaccurate feature identification, thereby optimizing the overall performance and lifespan of the SLC NAND cache.
[0041] In some embodiments described above, this application proposes labeling access mode types for accessed data by analyzing the request size and address continuity of host input / output requests. However, in actual implementation, accurately and reliably defining the characteristics of different access modes to avoid misjudgment and ensure the accuracy of subsequent data distribution optimization is a technical problem that needs to be solved. Failure to effectively distinguish between random small-granularity access and sequential large-granularity access may lead to improper storage location of data in the SLC cache, thereby affecting cache efficiency and overall system performance.
[0042] To address this, this application further proposes a step of analyzing the request size and address continuity of the request to mark the access pattern type of the accessed data, including: calculating the average size of the data requests and analyzing the address continuity of the data requests; if the average size is less than a first threshold and the address continuity is less than a second threshold, then the data is marked as a random small-granularity access pattern; if the average size is greater than or equal to the first threshold and the address continuity is greater than or equal to the second threshold, then the data is marked as a sequential large-granularity access pattern.
[0043] In this embodiment, to accurately identify data access patterns, the system first continuously calculates the average size of requests to a specific data block or logical block address range. This average size is a key indicator for measuring the granularity of data access. For example, a smaller average size typically indicates random access to metadata or small files, while a larger average size may indicate sequential access to large files. Simultaneously, the system also analyzes the address continuity of requests to the data. This can be achieved by monitoring whether consecutively accessed logical block addresses are adjacent, or by calculating the proportion of consecutively accessed logical block addresses to the total number of accessed logical block addresses within a certain time window. High address continuity generally means that data is accessed sequentially, while low address continuity indicates that data is accessed randomly.
[0044] In this embodiment, to quantify and distinguish different access patterns, this application introduces a first threshold and a second threshold. The first threshold defines the boundary of the average request size; for example, it can be set to the sector size, page size, or a typical small data block size (such as 4KB, 8KB, etc.) within the hard drive. When the average request size is below this threshold, the data is considered small-granularity access. The second threshold defines the boundary of address continuity; for example, it can be set as a percentage value (such as 20%, 50%). When address continuity is below this threshold, the data is considered random access. These two thresholds can be empirically set or dynamically adjusted based on the specific hardware characteristics of the hard drive, the performance characteristics of the SLC NAND cache, and the workload characteristics of the actual application scenario to achieve the best access pattern recognition effect.
[0045] In this embodiment, based on the above statistical and analytical results, the system can clearly mark data access patterns. Specifically, if the average size of requests for a certain data is less than a preset first threshold, and its address continuity is lower than a preset second threshold, then the data is clearly marked as a random small-granularity access pattern. This pattern typically corresponds to scenarios such as database indexes, operating system metadata, or random read / write of small files. These data are latency-sensitive and have dispersed access patterns. Conversely, if the average size of requests for a certain data is greater than or equal to the preset first threshold, and its address continuity is higher than or equal to the preset second threshold, then the data is clearly marked as a sequential large-granularity access pattern. This pattern typically corresponds to scenarios such as large file read / write, video streaming, or log recording. These data are usually accessed in contiguous blocks and have high throughput requirements.
[0046] In this embodiment, through the above technical solution, this application can accurately distinguish data access patterns based on clear quantitative indicators (average request size and address continuity). By setting a first threshold and a second threshold, the system can avoid fuzzy judgments of access patterns, thereby ensuring the accuracy of access pattern types in the data feature vector. This accurate pattern recognition provides a reliable basis for the subsequent dynamic logical partitioning of the SLC cache space, enabling data with random small-granularity access patterns to be routed to specially optimized partitions (e.g., partitions optimized for random read / write performance), while data with sequential large-granularity access patterns is routed to partitions suitable for sequential writes and reads. This not only improves the hit rate and utilization of the SLC cache but also reduces the access pressure on the main storage area, especially when handling mixed workloads, effectively improving the overall input / output performance and response speed of the intelligent hard disk drive.
[0047] In some of the embodiments described above in this application, a data feature vector containing access mode type, lifecycle type, and long-term access popularity value is proposed for the accessed data. However, in the implementation process, how to accurately predict and label the lifecycle type of data to distinguish between short-term active data and long-term important data is a key challenge in optimizing SLC cache resource allocation. If the lifecycle of data cannot be effectively identified, temporary data may occupy valuable cache space, or long-term hot data may be prematurely evicted due to misjudgment, thereby affecting cache efficiency and overall system performance.
[0048] To address this, this application further proposes tracking subsequent access behavior of the data to predict and label its lifecycle type. Specifically, this step includes: monitoring the number of accesses to newly written data within a preset observation period; if the number of accesses to the newly written data exceeds a third threshold within the observation period but the subsequent continuous inaccessibility time exceeds a silent threshold, then it is labeled as temporary data; if the number of accesses to the newly written data exceeds a fourth threshold within the observation period and in multiple consecutive statistical periods thereafter, then it is labeled as long-term hot data.
[0049] In this embodiment, monitoring the number of accesses to newly written data within a preset observation period aims to obtain data activity information in the initial stage. This monitoring process can be achieved by assigning a unique identifier to the data when it is written to the SLC cache or main storage area and recording its write timestamp. Subsequently, the system continuously tracks all read and write operations on the data within the preset observation period and accumulates the number of accesses. The preset observation period can be a configurable time window, such as several hours or several days, and its length should be set according to the typical change cycle of data activity in the actual application scenario. The number of accesses can be counted based on logical block addresses (LBAs) or data block granularity.
[0050] In this embodiment, if the number of accesses to newly written data exceeds a third threshold during the observation period but the subsequent continuous inaccessibility time exceeds a silence threshold, it is marked as temporary data. This judgment logic is used to identify data that exhibits high activity in a short period of time but then quickly cools down. The third threshold is a preset access count value used to define the "activity" level of data during the observation period. The silence threshold is a preset continuous inaccessibility time, such as several minutes or several hours, used to determine whether the data has entered a "silent" state. When data meets the condition of reaching a certain level of access during the observation period but then not being accessed for a long time, it can be determined as temporary data. This type of data usually loses its value after completing a specific task.
[0051] In this embodiment, if the number of accesses to the newly written data exceeds a fourth threshold during the observation period and in multiple consecutive statistical periods thereafter, it is marked as long-term hot data. This judgment logic is used to identify data that maintains a consistently high access frequency. The fourth threshold is another preset access frequency value used to measure the sustained activity of the data in each statistical period. The statistical period can be a different time unit than the observation period, such as daily or weekly. By continuing to monitor the access behavior of the data in multiple consecutive statistical periods after the observation period and requiring its access frequency to consistently exceed the fourth threshold, it can be ensured that the data marked as long-term hot data truly has a persistent access demand, rather than a short-lived hot spot.
[0052] In this embodiment, through the above technical solution, this application can accurately predict and label the lifecycle type of newly written data. By distinguishing the activity level of data in the initial stage and its subsequent access patterns, "temporary data" and "long-term hot data" can be effectively identified. This refined lifecycle classification enables the SLC cache management system to make data routing and storage decisions more intelligently. For example, temporary data can be preferentially written to cache areas that are easy to clear quickly, or rapidly degraded to the main storage area after reaching a quiescent threshold, thereby avoiding the occupation of valuable SLC cache space. Long-term hot data can be preferentially retained in the SLC cache to ensure that it continuously receives low-latency access, improving the cache hit rate and the overall response speed of the storage system. This optimization based on data lifecycle prediction effectively solves the problem of wasted cache resources caused by the inability to accurately judge the value of data in traditional caching strategies, thereby improving the data distribution optimization efficiency of intelligent hard disk drives.
[0053] In some of the embodiments described above in this application, it is proposed to optimize the data distribution of SLC NAND cache by monitoring host input / output requests and generating data feature vectors. However, in the process of SLC cache space management, if fine-grained partitioning and strategy configuration are not performed according to the access characteristics of different types of data, it may lead to low cache utilization, or even affect the overall performance due to mixed data types, making it difficult to fully realize the acceleration effect of SLC cache.
[0054] To address this, this application further proposes a method for dynamically logically partitioning the SLC cache space based on the aforementioned data feature vector, generating a logical partition configuration that defines at least three logical partitions and their management strategies. Specifically, this step includes: determining the capacity ratio of a first logical partition to a second logical partition based on the distribution of access mode types for all data in the data feature vector, wherein the first logical partition is used to store data marked as random small-granularity access mode, and the second logical partition is used to store data marked as sequential large-granularity access mode; setting the capacity of a third logical partition for temporarily storing newly written data and data to be evaluated; and configuring promotion thresholds and demotion thresholds for the first, second, and third logical partitions, respectively, to form the logical partition configuration.
[0055] In this embodiment, the SLC cache space is divided into multiple logical partitions to accommodate data with different access patterns. The first logical partition is specifically used to store data with random, small-granularity access patterns. This type of data is typically characterized by scattered access, small but frequent requests, and is sensitive to latency. The second logical partition is used to store data with sequential, large-granularity access patterns. This type of data is typically characterized by continuous access, large requests, and high throughput requirements. Determining the capacity ratio of these two partitions is based on statistical analysis of the distribution of access pattern types for all data in the current or historical data feature vectors. For example, the system can statistically analyze the proportion of random, small-granularity access pattern data and sequential, large-granularity access pattern data over a period of time, and dynamically adjust the capacity of the first and second logical partitions accordingly. This ensures that cache resources are efficiently allocated to the current primary access pattern type, avoiding resource waste or bottlenecks. This dynamic adjustment can be performed based on preset algorithms, such as weighted averages, sliding window statistics, or machine learning models.
[0056] In this embodiment, the third logical partition is primarily used to temporarily store newly written data and data whose access characteristics or lifecycle types have not yet been fully evaluated. Newly written data initially has unclear access patterns and popularity; placing it in the third logical partition first avoids it immediately occupying partition space specifically designated for hot data or data with specific access patterns, thus reducing interference with existing cached data. After a period of monitoring and feature vector generation, the characteristics of the data to be evaluated will gradually become clear. At that time, it will be routed to the appropriate first or second logical partition, or directly downgraded, based on its complete data feature vector. The capacity setting of the third logical partition needs to balance the rate of new data inflow and the data evaluation cycle to ensure sufficient buffer space.
[0057] In this embodiment, promotion and demotion thresholds are key parameters for managing data migration between different logical partitions and between the SLC cache and main storage. These thresholds are typically associated with metrics in the data feature vector, such as long-term access popularity, access frequency, and lifecycle type. The promotion threshold defines the conditions required for data to move from a lower-priority or general-purpose partition (e.g., the third logical partition) to a higher-priority or dedicated partition (e.g., the first logical partition). For example, when the long-term access popularity of data exceeds a certain preset value, it indicates a high probability of becoming hot data and should be promoted. The demotion threshold defines the conditions required for data to be removed from the SLC cache or moved from a higher-priority partition to a lower-priority partition. For example, when the long-term access popularity of data is below a certain preset value, or its lifecycle type is determined to be temporary data, it should be degraded. By configuring independent promotion and demotion thresholds for each logical partition, fine-grained data lifecycle management and cache eviction policies can be achieved, ensuring that the SLC cache always stores the most valuable data.
[0058] In this embodiment, through the above technical solution, this application can dynamically adjust the capacity ratio of the first logical partition and the second logical partition according to the distribution of different access mode types in the data feature vector. This allows the SLC cache space to flexibly adapt to the actual needs of random small-granularity access mode and sequential large-granularity access mode data, avoiding resource waste or performance bottlenecks caused by fixed partitions. Simultaneously, by setting a third logical partition to temporarily store newly written data and data to be evaluated, the impact of uncertain data on the core hot data partition is effectively isolated, providing a buffer period for the evaluation of new data. Furthermore, configuring promotion and demotion thresholds for each logical partition enables intelligent and dynamic migration of data within the SLC cache and between the SLC cache and the main storage area. This ensures that the SLC cache always stores the most valuable hot data, thereby improving the overall utilization efficiency of the SLC NAND cache and the data access performance of the smart hard disk drive.
[0059] In intelligent hard drives with built-in SLC NAND cache, to optimize data distribution, the SLC cache space is typically dynamically logically partitioned based on the data's feature vectors, generating corresponding logical partition configurations. However, in practical applications, a key issue that needs to be addressed is how to efficiently and accurately route the data to be cached to the pre-defined logical partitions in the SLC cache to fully leverage the optimization effects of different partitions for specific data types, while avoiding performance degradation caused by misplaced data.
[0060] To address this, this application further proposes a method for routing and storing data requiring caching into the corresponding logical partition in the SLC cache based on the data feature vector and the logical partition configuration. This step is crucial for data entering the SLC cache, as it accurately guides data to the most suitable logical partition for storage and processing based on the data's characteristics (reflected by the data feature vector) and the SLC cache's preset management strategy (reflected by the logical partition configuration). This ensures that different types of data can be allocated to specially optimized storage areas, thereby improving caching efficiency and overall system performance. When a data write request arrives, the system first obtains the complete data feature vector of the data, which includes information such as access mode type, lifecycle type, and long-term access popularity value. Simultaneously, the system queries the currently active logical partition configuration, which defines the purpose, capacity, and management strategy of each logical partition. Based on these two pieces of information, and through preset routing rules, the system can determine which logical partition the data should be stored in. For example, routing logic can be implemented using decision trees, rule engines, or lookup tables.
[0061] In this embodiment, if the access pattern of the data is random small-granularity access and its lifecycle type is long-term hot data, it is routed to the first logical partition. This rule aims to directly guide data that is frequently accessed in random small blocks and is expected to maintain high access frequency for a long time to the first logical partition, which is specifically optimized for this type of data. The first logical partition is usually optimized for random small-granularity access, for example, by using smaller block size management and faster lookup mechanisms to reduce the latency of random access. When the system receives data to be cached, it first parses its data feature vector. If the parsing result shows that the access pattern type of the data is marked as "random small-granularity access" and its lifecycle type is marked as "long-term hot data", the system will immediately perform a routing operation and write the data to the first logical partition in the SLC cache. This is usually achieved by updating the metadata of the data block and instructing the SLC cache controller to write the data to the physical address range corresponding to the first logical partition.
[0062] In this embodiment, if the data's access mode type is sequential large-granularity access mode, it is routed to the second logical partition. This rule is used to route data accessed in consecutive large blocks to the second logical partition, which is specifically optimized for sequential large-granularity access mode. The second logical partition is typically optimized for sequential writes and reads, for example, by using larger block sizes, read-before / write-before mechanisms, etc., to improve throughput. After obtaining the data feature vector, if the system finds that its access mode type is "sequential large-granularity access mode," it will route it to the second logical partition regardless of its lifecycle type. This routing decision is based on prioritizing sequential access modes, because sequential access usually has high throughput requirements, and placing it directly in the optimized partition maximizes performance.
[0063] Furthermore, if the data does not meet the corresponding conditions of the first and second logical partitions, it will be routed to the third logical partition. This rule serves as a fallback mechanism to handle data that is unclear whether it belongs to random, small-granularity, long-term hot data or sequential, large-granularity data. The third logical partition is typically designed as a temporary storage area for newly written data or data to be evaluated, providing a buffer for the system to perform more refined evaluations and migrations later. If the data feature vector of the data to be cached does not meet the conditions of "random, small-granularity access pattern and lifecycle type long-term hot data" or "sequential, large-granularity access pattern," the system will route it to the third logical partition by default. This includes, for example, temporary data, cold data, and new data whose access pattern and lifecycle type have not yet been fully determined. After entering the third logical partition, the data will wait for subsequent periodic evaluations to determine its final allocation.
[0064] In this embodiment, through the above technical solution, this application can achieve intelligent routing and storage of data requiring caching. Specifically, by accurately identifying the access mode type and lifecycle type of the data, the system can directly guide random, small-granularity, and long-term hot data to the first logical partition, thereby fully utilizing the partition's optimization characteristics for random, small-granularity access and effectively reducing random read / write latency. Simultaneously, routing data with sequential, large-granularity access patterns to the second logical partition maximizes sequential read / write throughput and improves the efficiency of large file transfers and continuous data processing. For data that does not meet the above-mentioned explicit classification conditions, it is uniformly routed to the third logical partition as a temporary storage and evaluation area, avoiding wasted cache resources or performance bottlenecks caused by unclear data characteristics, and providing a flexible basis for subsequent dynamic evaluation and data migration. This refined data routing strategy improves the hit rate and utilization efficiency of the SLC cache and optimizes the overall data distribution and access performance of the hard disk drive.
[0065] In some of the above implementations, although data is routed and stored in the corresponding logical partition in the SLC cache based on the initial feature vector and the preset logical partition configuration, the access patterns, popularity, and lifecycle of the data are not static. Without continuous evaluation and dynamic adjustment of the data state within the cache, the partition affiliation of data in the cache may no longer match its latest characteristics, thereby affecting the overall efficiency and performance of the SLC cache.
[0066] To address this, this application further proposes a method to periodically assess the state of data within the SLC cache based on updated data feature vectors and logical partition configurations, thereby generating a data migration instruction set. This step specifically includes: scanning each logical partition of the SLC cache to obtain the latest access records for data within each partition; updating the long-term access popularity value and lifecycle type of the corresponding data based on the latest access records to update its data feature vector; comparing the long-term access popularity value in the updated data feature vector with the promotion or demotion threshold of the logical partition containing the data in the logical partition configuration; generating migration instructions for the data based on the comparison results and the updated lifecycle type; and compiling all migration instructions to generate a data migration instruction set.
[0067] In this embodiment, to continuously optimize the data distribution within the SLC cache, the system periodically scans each logical partition (including the first, second, and third logical partitions) of the SLC cache. This process aims to obtain the latest access records of data within each partition, such as data access timestamps, access frequency, read / write operation types, and access sizes. In this way, the system can monitor the activity level and usage patterns of data in the cache in real time, providing foundational data for subsequent data characteristic evaluation.
[0068] In this embodiment, after acquiring the latest access records, the system uses this information to update the long-term access popularity value and lifecycle type of the corresponding data. The update of the long-term access popularity value can be calculated based on factors such as access frequency, access concentration, and access persistence within a sliding time window. For example, data accessed frequently recently will have a higher popularity value. The update of the lifecycle type may involve tracking data access behavior over a period of time. For instance, if data previously marked as temporary data continues to be accessed frequently after the observation period, it may be remarked as long-term hot data. Through this dynamic update, it is ensured that the data feature vector of each data point accurately reflects its current actual usage and potential value.
[0069] In this embodiment, after the data feature vector is updated, the system compares the long-term access popularity value contained therein with the promotion or demotion threshold configured for the logical partition where the data is currently located. For example, if the data is currently located in the third logical partition, its updated long-term access popularity value will be compared with the promotion threshold of the third logical partition to determine whether it should be promoted to a higher-level cache partition. If the data is located in the first logical partition, its popularity value will be compared with the demotion threshold of the first logical partition to determine whether it should be demotion to the primary storage area. This comparison is the key basis for deciding on data migration.
[0070] In this embodiment, based on the comparison results and the updated lifecycle type, the system generates corresponding migration instructions for each piece of data. For example, if a piece of data is in the third logical partition, and its long-term access popularity value exceeds the promotion threshold and its lifecycle type is updated to long-term hot data, an instruction to promote it to the first logical partition will be generated. Conversely, if the data popularity value in the first logical partition is lower than the degradation threshold, an instruction to degrade it to the main storage area will be generated. These instructions clearly define the target location of the data to achieve optimized configuration of cache resources.
[0071] In this embodiment, after evaluating all relevant data in the SLC cache and generating their respective migration instructions, the system aggregates these independent instructions into a unified data migration instruction set. This instruction set contains all data migration operations that need to be executed within this evaluation cycle and can be processed uniformly by subsequent execution modules, thereby improving the efficiency of migration operations and the utilization of system resources.
[0072] In this embodiment, by periodically scanning each logical partition of the SLC cache to obtain and update the latest access records, long-term access popularity values, and lifecycle types of the data, this application can dynamically capture changes in data characteristics. Based on these updated data feature vectors, the system can accurately compare the current popularity value of the data with preset promotion or demotion thresholds, thereby intelligently determining whether the data is still suitable for its current logical partition. When it is found that the data characteristics do not match the current partition, the system can generate corresponding migration instructions in a timely manner to ensure that the data is always placed in the logical partition where it can best exert its performance advantages, or demotion to the main storage area when appropriate. This continuous evaluation and adjustment mechanism based on real-time data characteristics effectively solves the problem of decreased cache efficiency caused by dynamic changes in data characteristics, improves the utilization rate of the SLC cache and the overall data access performance of the smart hard disk drive, and avoids reduced cache hit rate or unnecessary performance bottlenecks caused by data "aging" or "heating".
[0073] In some embodiments described above, this application proposes optimizing data distribution by periodically evaluating the data status within the SLC cache and generating data migration instruction sets. However, in practice, accurately determining when data should be promoted, demoted, or removed from the cache based on its specific characteristics and the management strategy of its logical partition, to ensure the most efficient use of SLC cache resources, is a problem that requires careful consideration. Simply generating migration instructions without specific judgment criteria for different data types and partition roles may lead to low cache efficiency and fail to fully leverage the high-performance advantages of the SLC cache.
[0074] In response, this application further proposes specific conditions for generating migration instructions for the data, including: for data located in the third logical partition, if its updated long-term access popularity value exceeds the promotion threshold of the third logical partition in the logical partition configuration and its lifecycle type is long-term hot data, then a migration instruction to promote to the first logical partition is generated; for data located in the first logical partition, if its updated long-term access popularity value is lower than the degradation threshold of the first logical partition in the logical partition configuration, then a migration instruction to downgrade to the primary storage area is generated; and for data located in the second logical partition, if its latest access record indicates that access has stopped for more than a preset duration, then a migration instruction to downgrade to the primary storage area is generated.
[0075] In this embodiment, for data located in the third logical partition, this partition is mainly used to temporarily store newly written data and data to be evaluated. Its function is to act as an "observation area" or "incubation area" for the data, performing preliminary access behavior monitoring and feature analysis when the data first enters the SLC cache, preventing unevaluated data from directly occupying core cache resources. When the long-term access heat value of the updated data exceeds the promotion threshold of the third logical partition in the logical partition configuration, it indicates that the data has shown sustained high access activity. Simultaneously, if its lifecycle type is marked as long-term hot data, meaning that the number of accesses exceeds a specific threshold within a preset observation period and subsequent consecutive statistical periods, this indicates that the data has the potential for frequent long-term access and is worth residing in the high-performance cache for a long time. Under these dual conditions, the system will generate a migration instruction to promote the data to the first logical partition. According to the above implementation, the first logical partition is specifically used to store data marked as having a random small-granularity access pattern. Moving data that meets the promotion conditions from the third logical partition to the first logical partition aims to place it in the cache area most suitable for its access pattern and with optimal performance, in order to cope with its high-frequency random small-granularity access needs.
[0076] In this embodiment, for data located in the first logical partition, which is used to store data with random, small-granularity access patterns, when its updated long-term access heat value decreases over time or due to changes in access patterns, and falls below the degradation threshold of the first logical partition in the logical partition configuration, it indicates that the data is no longer "hot data," and its value in continuing to occupy high-performance SLC cache resources decreases. At this time, the system will generate a migration instruction to downgrade to the primary storage area. The primary storage area typically refers to the HDD platter or QLC / TLC NAND flash memory area in a hard disk drive, and its performance is lower than that of the SLC cache. Degrading no longer hot data to the primary storage area can free up valuable SLC cache space for use by hotter or more critical data, thereby optimizing the overall performance and cost-effectiveness of the storage system.
[0077] In this embodiment, the data located in the second logical partition is used to store data marked as sequential large-granularity access. This type of data typically experiences a significant decrease in subsequent access demand after one or several consecutive accesses. When the latest access record indicates that access has ceased for more than a preset duration—that is, when no new access records are recorded for the data within a "preset duration"—it can be considered that the data's mission in the SLC cache has been completed. At this point, the system will generate a migration instruction to downgrade to the main storage area. Similar to the downgrading of the first logical partition, downgrading inactive sequential large-granularity data to the main storage area is to promptly reclaim SLC cache resources, freeing up space for new sequential write or read operations, and preventing the cache from being occupied by no longer needed data for an extended period.
[0078] In this embodiment, through the above technical solution, this application can intelligently and accurately generate data migration instructions based on the specific characteristics of the data and the management strategy of its logical partition. Specifically, for newly entered cache or data to be evaluated, it will only be promoted to a dedicated high-performance random access partition when it is confirmed to have long-term hotspot attributes and its access frequency reaches a certain standard, thereby avoiding the occupation of core cache resources by temporary or low-value data. At the same time, for data already in the high-performance partition, the system will continuously monitor its frequency. Once the frequency drops below a preset threshold, it will be promptly downgraded to the main storage area to ensure that the SLC cache always serves the most active data. In addition, for data with sequential large-granularity access patterns, this solution monitors its access stop duration to quickly remove it from the cache after completing its main access task, effectively preventing cache pollution. This fine-grained migration strategy enables the SLC cache space to be used dynamically and efficiently, improving the cache hit rate and the overall response speed of the storage system, thereby optimizing the data distribution performance of the intelligent hard disk drive.
[0079] In some of the embodiments described above in this application, after the data migration instruction set is generated, it is necessary to perform data migration between SLC cache logical partitions and from the SLC cache to the main storage area according to these instructions. However, in actual operation, if the main storage area is under high load or high write latency, directly performing the downgrade operation to the main storage area may further exacerbate the system performance bottleneck and affect the overall data processing efficiency.
[0080] To address this, this application further proposes a method for migrating data between logical partitions and from the SLC cache to the main storage area based on a data migration instruction set and the current performance status of the main storage area. This method first parses the data migration instruction set and obtains the current write latency status of the main storage area. Specifically, parsing the data migration instruction set refers to identifying and interpreting system-generated migration commands containing information such as data block identifiers, source locations, and target locations to clarify the migration operation to be executed. Obtaining the current write latency status of the main storage area involves real-time monitoring of the main storage area's I / O performance metrics, such as average write response time, write queue depth, or bandwidth utilization, to assess the efficiency and load of the main storage area in processing write requests. This is typically achieved through communication with the storage controller or through an internal performance monitoring module.
[0081] In this embodiment, if the current write latency is higher than a preset latency threshold, all migration instructions degraded to the main storage area in the data migration instruction set are temporarily suspended, and the corresponding data is temporarily stored in a reserved area within the SLC cache. The latency threshold is a pre-set, acceptable upper limit for main storage area write latency. When the actual monitored write latency exceeds this threshold, it indicates that the main storage area is under high load or a performance bottleneck. At this time, the system identifies all migration instructions whose target is to degrade data from the SLC cache to the main storage area and suspends the execution of these instructions. Simultaneously, the data that should have been degraded is not immediately written to the main storage area but is temporarily moved and stored in a specific area within the SLC cache, namely the reserved area. This reserved area can be a fixed space reserved in the SLC cache or dynamically allocated storage space as needed. This measure aims to avoid applying additional write pressure to the main storage area when its performance is poor, thereby preventing further deterioration of system performance.
[0082] In this embodiment, when the current write latency recovers to below the latency threshold, the data in the reserved area is written to the main storage area in batches. This means the system continuously monitors the write latency status of the main storage area. Once a decrease in write latency is detected and it falls below the latency threshold, it indicates that the main storage area has recovered from a high-load state and has good write processing capabilities. At this time, the system will initiate a batch write operation to efficiently write all the data previously temporarily stored in the reserved area to the main storage area at once or in batches. Batch writing can effectively utilize the recovery performance of the main storage area and improve the efficiency of data degradation.
[0083] In this embodiment, the execution of the data migration instructions focuses on migration instructions between logical partitions within the SLC cache. Unlike the operation of demotion to the primary storage area, migration between logical partitions within the SLC cache (e.g., promotion from the third logical partition to the first logical partition) does not involve write operations to the primary storage area, and therefore its execution is not affected by the current write latency state of the primary storage area. These internal migration instructions can be executed independently and in real time to ensure that the data distribution within the SLC cache remains optimized at all times, thereby maximizing the performance advantages of the SLC cache.
[0084] In this embodiment, the above-described technical solution effectively addresses the issue of excessively high write latency in the main storage area. When the main storage area performs poorly, the system no longer forces data migration downgraded to the main storage area. Instead, it temporarily retains this data in the reserved area of the SLC cache, thereby avoiding additional pressure on the already heavily loaded main storage area and preventing further performance degradation. Simultaneously, data migration between logical partitions within the SLC cache can continue unaffected, ensuring optimized data distribution within the cache. Once the main storage area performance recovers, the temporarily stored data is efficiently downgraded through batch writing. This not only smooths out write peaks in the main storage area but also ensures that the data is ultimately correctly downgraded, thereby improving the overall stability and data processing efficiency of the intelligent hard disk drive under complex operating conditions.
[0085] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the data distribution optimization method of the smart hard disk drive with built-in SLC NAND cache in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0086] This application also provides an intelligent hard disk drive data distribution optimization system with built-in SLC NAND cache, see reference. Figure 2 The intelligent hard disk drive data distribution optimization system with built-in SLC NAND cache includes: a memory 10, a processor 20, and an intelligent hard disk drive data distribution optimization program with built-in SLC NAND cache stored on the memory 10 and executable on the processor 20. The intelligent hard disk drive data distribution optimization program with built-in SLC NAND cache is configured to implement the steps of the intelligent hard disk drive data distribution optimization method with built-in SLC NAND cache.
[0087] The intelligent hard disk drive data distribution optimization system with built-in SLC NAND cache provided in this application adopts the intelligent hard disk drive data distribution optimization method with built-in SLC NAND cache in the above embodiments, which can optimize cache space utilization, improve system performance stability, and reduce cache device wear. Compared with the prior art, the beneficial effects of the intelligent hard disk drive data distribution optimization system with built-in SLC NAND cache provided in this application are the same as the beneficial effects of the intelligent hard disk drive data distribution optimization method with built-in SLC NAND cache provided in the above embodiments, and other technical features of the intelligent hard disk drive data distribution optimization system with built-in SLC NAND cache are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0088] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0089] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. All equivalent structural transformations made under the technical concept of this application using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the scope of patent protection of this application.
Claims
1. A method for optimizing data distribution in a smart hard disk drive with built-in SLC NAND cache, characterized in that, The method includes: Monitor host input / output requests, and generate a data feature vector containing access mode type, lifecycle type, and long-term access popularity value for the accessed data based on the requests; Based on the data feature vector, the SLC cache space is dynamically logically partitioned to generate a logical partition configuration that defines at least three logical partitions and their management strategies. For data that needs to be cached, based on the data feature vector and the logical partition configuration, it is routed and stored in the corresponding logical partition in the SLC cache. Periodically, based on the updated data feature vector and the logical partition configuration, the state of the data in the SLC cache is evaluated, and a data migration instruction set is generated. Based on the data migration instruction set and the current performance status of the main storage area, perform data migration between logical partitions and from the SLC cache to the main storage area.
2. The data distribution optimization method for a smart hard disk drive with built-in SLC NAND cache as described in claim 1, characterized in that, The steps of monitoring host input / output requests and generating a data feature vector containing access mode type, lifecycle type, and long-term access popularity value for the accessed data based on the requests include: Record the logical block address and access timestamp of each request in the host input / output requests; Based on the historical records of the logical block address and access timestamp, calculate the long-term access popularity value of the corresponding data; Analyze the request size and address continuity of the request to mark the access mode type of the accessed data; Track subsequent access behavior to the data, predict and label the data's lifecycle type; The long-term access popularity value, the access mode type, and the lifecycle type are integrated to generate the data feature vector.
3. The data distribution optimization method for a smart hard disk drive with built-in SLC NAND cache as described in claim 2, characterized in that, The steps of analyzing the request size and address continuity of the request, and marking the access mode type of the accessed data, include: The average size of data requests is statistically analyzed, and the address continuity of the data requests is also analyzed. If the average size is less than a first threshold and the address continuity is less than a second threshold, then the data is marked as a random small-granularity access mode. If the average size is greater than or equal to the first threshold and the address continuity is greater than or equal to the second threshold, then the data is marked as a sequential large-granularity access mode.
4. The data distribution optimization method for a smart hard disk drive with built-in SLC NAND cache as described in claim 2, characterized in that, The steps of tracking subsequent access behavior to the data and predicting and labeling the data's lifecycle type include: Monitor the number of times newly written data is accessed within a preset observation period; If the number of accesses to the newly written data exceeds the third threshold during the observation period but the subsequent continuous period of no access exceeds the silent threshold, then it is marked as temporary data; If the number of accesses to the newly written data exceeds the fourth threshold during the observation period and in multiple consecutive statistical periods thereafter, it will be marked as long-term hot data.
5. The data distribution optimization method for a smart hard disk drive with built-in SLC NAND cache as described in claim 1, characterized in that, Based on the data feature vector, the steps of dynamically logically partitioning the SLC cache space and generating a logical partition configuration that defines at least three logical partitions and their management strategies include: Based on the distribution of access mode types of all data in the data feature vector, the capacity ratio of the first logical partition and the second logical partition is determined. The first logical partition is used to store data marked as random small-granularity access mode, and the second logical partition is used to store data marked as sequential large-granularity access mode. Configure the capacity of the third logical partition used to temporarily store newly written data and data to be evaluated; The first logical partition, the second logical partition, and the third logical partition are configured with promotion thresholds and demotion thresholds respectively to form the logical partition configuration.
6. The method for optimizing data distribution in a smart hard disk drive with built-in SLC NAND cache as described in claim 5, characterized in that, For data that needs to be cached, the steps of routing and storing it into the corresponding logical partition in the SLC cache based on the data feature vector and the logical partition configuration include: Based on the data feature vector of the data to be cached and the logical partition configuration, if the access mode type of the data is random small-granularity access mode and the lifecycle type is long-term hot data, then it is routed to the first logical partition. Based on the data feature vector of the data to be cached and the logical partition configuration, if the access mode type of the data is sequential large-granularity access mode, then it is routed to the second logical partition; Based on the data feature vector of the data to be cached and the logical partition configuration, if the data does not meet the corresponding conditions of the first and second logical partitions, the data is routed to the third logical partition.
7. The data distribution optimization method for a smart hard disk drive with built-in SLC NAND cache as described in claim 6, characterized in that, The steps of periodically evaluating the state of data in the SLC cache based on the updated data feature vector and the logical partition configuration, and generating a data migration instruction set, include: Scan each logical partition of the SLC cache to obtain the latest access records of data within the partition; Based on the latest access record, update the long-term access popularity value and lifecycle type of the corresponding data to update its data feature vector; The long-term access popularity value in the updated data feature vector is compared with the promotion threshold or demotion threshold of the logical partition where the data is located in the logical partition configuration. Based on the comparison results and the updated lifecycle type, a migration instruction for the data is generated; All migration instructions are gathered to generate the data migration instruction set.
8. The method for optimizing data distribution in a smart hard disk drive with built-in SLC NAND cache as described in claim 7, characterized in that, The steps for generating migration instructions for the data based on the comparison results and the updated lifecycle type include: For data located in the third logical partition, if its updated long-term access popularity value exceeds the promotion threshold of the third logical partition in the logical partition configuration and its lifecycle type is long-term hot data, a migration instruction to promote to the first logical partition is generated. For data located in the first logical partition, if its updated long-term access popularity value is lower than the degradation threshold of the first logical partition in the logical partition configuration, a migration instruction to downgrade to the main storage area is generated. For data located in the second logical partition, if the latest access record indicates that access has stopped for more than a preset time, a migration instruction to downgrade to the primary storage area is generated.
9. The method for optimizing data distribution in a smart hard disk drive with built-in SLC NAND cache as described in claim 1, characterized in that, Based on the data migration instruction set and the current performance status of the main storage area, the steps for migrating data between logical partitions and from the SLC cache to the main storage area include: Parse the data migration instruction set and obtain the current write latency status of the main storage area; If the current write latency is higher than the latency threshold, all migration instructions downgraded to the main storage area in the data migration instruction set will be temporarily suspended, and the corresponding data will be temporarily stored in the reserved area of the SLC cache. When the current write latency state recovers to below the latency threshold, the data in the reserved area is written to the main storage area in batches; The execution of the data migration instructions focuses on migration instructions between logical partitions within the SLC cache.
10. A smart hard disk drive data distribution optimization system with built-in SLC NAND cache, characterized in that, The intelligent hard disk drive data distribution optimization system with built-in SLC NAND cache includes: a memory, a processor, and an intelligent hard disk drive data distribution optimization program with built-in SLC NAND cache stored on the memory and executable on the processor, wherein the intelligent hard disk drive data distribution optimization program with built-in SLC NAND cache is configured to implement the steps of the intelligent hard disk drive data distribution optimization method with built-in SLC NAND cache as described in any one of claims 1 to 9.