A garbage collection method for solid state hard drive flash memory
By analyzing the historical usage data and ambient temperature of the solid-state drive, predicting the low-load period and idle block exhaust time, optimizing the garbage collection timing, solving the problems of high load and high temperature impact in traditional solid-state drive flash garbage collection strategies, and achieving efficient and stable garbage collection operations.
Patent Information
- Application Number
- CN202510815602.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-18
AI Technical Summary
The garbage collection strategy of traditional solid-state drive flash memory lacks dynamic perception of system load, environmental conditions and data characteristics, resulting in the recovery operation at high load aggravates the pressure of I/O queues, increases response delay, and cannot predict the exhaust time of idle blocks, which may cause insufficient storage space or system crash, and does not consider the temperature impact, reducing recycling efficiency.
By analyzing the historical usage data of the solid state hard disk, predicting the low-load period and idle block exhaust time, combining the ambient temperature, determining the optimal garbage collection time, using the controller to perform garbage collection operations, avoiding the impact of high loads and high temperatures, and optimizing recycling efficiency.
Accurate garbage collection during low load periods is achieved, recycling interrupts and delays are reduced, storage services are guaranteed, and storage resource utilization and environmental temperature prediction are improved.
Smart Images

Figure CN120315904B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of garbage collection of solid state drive flash memory, and in particular to a garbage collection method of solid state drive flash memory. Background Art
[0002] During the long-term use of solid-state drives (SSDs), as data is constantly written and deleted, a large number of invalid pages and the risk of free block exhaustion will be generated in the flash memory media. Garbage collection is a key mechanism for maintaining the performance and lifespan of SSDs. Its execution timing and efficiency directly affect the stability of the storage system and user experience. Traditional garbage collection strategies are usually based on fixed thresholds or periodic triggers, lacking dynamic perception of system load, environmental conditions, and data characteristics, which can easily lead to the following problems: Executing recycling operations when the system is highly loaded may increase I / O queue pressure, resulting in increased response delays and even interruption of normal business processes; the inability to predict the time of free block exhaustion in advance may cause data write failures or system crashes due to insufficient storage space; the impact of environmental factors such as temperature on flash memory media is not considered, and high temperature environments will reduce recycling efficiency; the lack of dynamic analysis of invalid page distribution and recycling efficiency makes it difficult to clear redundant data at the optimal time, resulting in insufficient storage resource utilization.
[0003] Currently, no effective solutions have been proposed for the problems in related technologies. Summary of the Invention
[0004] In response to the problems in the related art, the present invention proposes a garbage recovery method for solid-state drive flash memory to overcome the technical problems of recovery delay and recovery interruption existing in the existing solid-state drive garbage cleaning.
[0005] To this end, the specific technical solutions adopted in the present invention are as follows:
[0006] A garbage collection method for a solid state drive flash memory, the method comprising the following steps:
[0007] S1. Obtain historical usage data of the solid-state drive and obtain low-load periods and estimated free block exhaustion times based on usage habits;
[0008] S2. Select several low-load periods close to the predicted free block exhaustion, collect the ambient temperature during these low-load periods as the outdoor ambient temperature, and simultaneously predict the indoor ambient temperature in combination with historical data;
[0009] S3, analyzing these low-load periods in combination with the ambient temperature and the waste collection efficiency to determine the optimal low-load period for recycling;
[0010] S4. Execute garbage collection of the hard disk through the controller.
[0011] As a preferred embodiment, the method of obtaining historical usage data of the solid state drive and obtaining a low-load period and an estimated time when free blocks are exhausted based on usage habits includes the following steps:
[0012] S11. Use the SSD's operating system tools to record historical data, including daily write volume, load type, I / O queue depth and response time, current number of free blocks, and OP space ratio.
[0013] S12. Analyze the temporal distribution of historical data, mark daily periods of low write volume and low I / O queue depth, and classify load levels based on user behavior patterns to identify potential low-load windows.
[0014] S13. Obtain the garbage collection efficiency and calculate the free block exhaustion time based on the current total free block amount and the average daily effective write volume. The specific calculation formula is:
[0015] ;
[0016] in, The free block exhaustion time is calculated as is the current number of free blocks, is the capacity of a single block, is the average daily user original write volume, is the write amplification factor, which is the ratio of the amount of data actually written to the NAND to the amount written by the user.
[0017] By obtaining low-load periods and the estimated time until free blocks are exhausted based on usage habits, data-driven refined operation and maintenance management can be achieved.
[0018] As a preferred embodiment, analyzing the temporal distribution of historical data, marking time periods with low daily write volume and low I / O queue depth, and classifying load levels based on user behavior patterns to determine potential low-load windows includes the following steps:
[0019] S121. Analyze the fluctuations in write volume and I / O queue depth over 24 hours each day, mark periods of sustained low activity, calculate the mean and standard deviation for each period, and identify periods below the overall mean.
[0020] S122: If the I / O queue depth is ≤ 2 and the response time is < 1ms, the load is classified as low; if the I / O queue depth is 2 < I / O queue depth < 6 and the response time is 1-10ms, the load is classified as medium; if the I / O queue depth is ≥ 6 and the response time is > 10ms, the load is classified as high. At the same time, the user operation records in the system log are correlated and known high-load events are marked.
[0021] S123. Select a period when the write volume is 30% lower than the daily average and the queue depth is ≤ 2.
[0022] As a preferred embodiment, the method of selecting several low-load periods close to the predicted free block exhaustion, collecting the ambient temperature during these low-load periods as the outdoor ambient temperature, and simultaneously predicting the indoor ambient temperature in combination with historical data includes the following steps:
[0023] S21. Obtain the free block exhaustion time point according to the free block exhaustion time, and simultaneously select windows near the exhaustion time point and in the low-load period in combination with the low-load period list;
[0024] S22. Call the meteorological API to obtain the predicted temperature for a future low-load window, associate it with the geographic location of the solid-state drive, and extract the temperature data for the predicted period as the future outdoor ambient temperature data. Simultaneously, collect historical data on the ambient temperature of the hard drive and the outdoor temperature, calculate the average temperature difference, obtain a temperature difference baseline, and establish a calibration model. Input the future outdoor ambient temperature data to obtain the predicted indoor ambient temperature.
[0025] As a preferred embodiment, analyzing these low-load periods in combination with the ambient temperature and the garbage collection efficiency to determine the optimal low-load period for recycling includes the following steps:
[0026] S31. Record the indicators of each garbage collection, including the number of free blocks recovered, the amount of valid data migrated, and the ratio of invalid pages; and calculate the average amount of invalid pages in different time periods;
[0027] S32. Generate an invalid page curve based on the historical data through time series to predict the invalid page increment in a specific period in the future. Then, estimate the invalid page volume in the future low-load period based on the invalid page increment. Finally, calculate the recycling efficiency based on the invalid page increment. The specific calculation formula is:
[0028] ;
[0029] in, The total amount of historical accumulated invalid pages that need to be processed during the current low-load period. The time when the last garbage collection was completed. The time when the current low load period starts, is the invalid page increment in time period t;
[0030] ;
[0031] in, The total amount of historical accumulated invalid pages that need to be processed during the current low-load period. is the total number of pages, is the write amplification factor, is the calculated recovery efficiency;
[0032] S33. Set scoring criteria for recycling efficiency, indoor ambient temperature, and time urgency, set weights for these three indicators, calculate a comprehensive score, sort the scores of each low-load period from high to low, and determine the low-load period with the highest score as the optimal recycling period.
[0033] As a preferred embodiment, setting the scoring criteria for recycling efficiency, indoor ambient temperature, and time urgency, setting weights for these three indicators, calculating a comprehensive score, sorting the scores of the low-load periods from high to low, and determining the low-load period with the highest score as the optimal recycling period includes the following steps:
[0034] S331. Set temperature scoring rules, divide indoor ambient temperature into low, medium and high temperatures, and set the scores as 3, 2 and 1 respectively for the three levels; set recycling efficiency scoring rules, divide recycling efficiency into low efficiency, medium efficiency and high efficiency, and set the scores as 3, 2 and 1 respectively for the three levels; set time urgency scoring standards, divide time urgency into normal, medium and high, and set the scores as 3, 2 and 1 respectively for the three levels;
[0035] S332. Set weights for the three indicators and calculate the comprehensive score. The specific formula is:
[0036] ;
[0037] in, is the calculated comprehensive score, They are recycling efficiency score, temperature score, and urgency score;
[0038] S333. Sort the scores of the low-load periods from high to low, and determine the low-load period with the highest score as the optimal recovery period.
[0039] As a preferred embodiment, performing garbage collection of the hard disk by the controller includes the following steps:
[0040] S41, obtaining the valid status of each page recorded in the flash translation layer of the solid state drive;
[0041] S42. The controller selects a block for garbage collection based on the number of invalid pages and the usage of the block.
[0042] S43, determining a block to be recycled, reading valid data in the block through a controller, and writing the valid data into a new free block;
[0043] S44: Erase the data in the block to be recycled, and reflect the new location of the data and the idle state of the block through the mapping table in the FTL.
[0044] The beneficial effects of the present invention are:
[0045] 1. By obtaining historical usage data of solid-state drives, including daily write volume and low-load windows with low I / O queue depth, the present invention can obtain future low-load periods and the exhaustion time of free blocks, thereby avoiding the execution of garbage collection operations during high-load periods, reducing the recycling interruptions caused by the need to perform other operations on the solid-state drive garbage collection, and reducing the problem of low recycling efficiency.
[0046] 2. By selecting several low-load periods near predicted free block exhaustion, the present invention can plan recycling operations in advance of free block exhaustion, thus avoiding the risk of business interruption due to storage space exhaustion and ensuring the continuity of data storage services. After the low-load periods are selected, the ambient temperature during these low-load periods is collected as the outdoor ambient temperature, and the indoor ambient temperature is predicted in combination with historical data. This not only eliminates the interference of geographical location and seasonal changes in temperature prediction, significantly improving the accuracy and reliability of the prediction of the future operating ambient temperature of the solid-state drive, but also provides an accurate basis for the subsequent selection of low-load periods for garbage collection.
[0047] 3. The present invention analyzes these low-load periods in combination with ambient temperature and garbage collection efficiency to determine the low-load period for optimal recycling. It can accurately evaluate the recycling timing of solid-state hard drives from multiple dimensions. When performing garbage collection, not only the load of the hard drive is important, but also the ambient temperature of the hard drive and the recycling efficiency. Excessively high ambient temperature will affect the garbage collection of the hard drive. The recycling efficiency and time urgency will also affect the garbage collection of the hard drive. Therefore, this evaluation method can not only balance the system load and operating efficiency, and achieve comprehensive optimization from system operating status, environmental conditions to data processing efficiency, but also reduce interference with recycling, thereby reducing garbage collection delays and garbage collection interruptions. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 The present invention is a flowchart of a garbage collection method for a solid state drive flash memory according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention. They are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. By referring to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0051] According to an embodiment of the present invention, a garbage collection method for a solid state drive flash memory is provided.
[0052] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, a garbage collection method for a solid state drive flash memory according to an embodiment of the present invention includes the following steps:
[0053] S1. Obtain historical usage data of the solid-state drive and obtain low-load periods and estimated free block exhaustion times based on usage habits;
[0054] Furthermore, obtaining historical usage data of the solid-state drive and obtaining a low-load period and an estimated time until free blocks are exhausted based on usage habits includes the following steps:
[0055] S11. Use the SSD's operating system tools to record historical data, including daily write volume, load type, I / O queue depth and response time, current number of free blocks, and OP space ratio.
[0056] S12. Analyze the temporal distribution of historical data, mark daily periods of low write volume and low I / O queue depth, and classify load levels based on user behavior patterns to identify potential low-load windows.
[0057] Furthermore, we analyze the temporal distribution of historical data, mark daily periods of low write volume and low I / O queue depth, and classify load levels based on user behavior patterns. Identifying potential low-load windows involves the following steps:
[0058] S121. Analyze the fluctuations in write volume and I / O queue depth over 24 hours each day, mark periods of sustained low activity, calculate the mean and standard deviation for each period, and identify periods below the overall mean.
[0059] S122: If the I / O queue depth is ≤ 2 and the response time is < 1ms, the load is classified as low; if the I / O queue depth is 2 < I / O queue depth < 6 and the response time is 1-10ms, the load is classified as medium; if the I / O queue depth is ≥ 6 and the response time is > 10ms, the load is classified as high. At the same time, the user operation records in the system log are correlated and known high-load events are marked.
[0060] S123, select a period when the write volume is less than 30% of the daily average and the queue depth is ≤ 2
[0061] S13. Obtain the garbage collection efficiency and calculate the free block exhaustion time based on the current total free block amount and the average daily effective write volume. The specific calculation formula is:
[0062] ;
[0063] in, The free block exhaustion time is calculated as is the current number of free blocks, is the capacity of a single block, is the average daily user original write volume, is the write amplification factor, which is the ratio of the amount of data actually written to the NAND to the amount written by the user.
[0064] S2. Select several low-load periods close to the predicted free block exhaustion, collect the ambient temperature during these low-load periods as the outdoor ambient temperature, and simultaneously predict the indoor ambient temperature in combination with historical data;
[0065] Furthermore, several low-load periods close to the predicted free block exhaustion are selected, and the ambient temperatures during these low-load periods are collected as the outdoor ambient temperatures. At the same time, the indoor ambient temperature prediction is performed in combination with historical data, including the following steps:
[0066] S21. Obtain the free block exhaustion time point according to the free block exhaustion time, and simultaneously select windows near the exhaustion time point and in the low-load period in combination with the low-load period list;
[0067] It should be noted that the selected low-load period is before the free block exhaustion time point. This method of predicting the free block exhaustion time in advance and planning garbage collection in conjunction with the low-load period can not only avoid the risk of business interruption due to storage space exhaustion, but also utilize the system low-load period to perform operations, minimizing the impact on user experience and ensuring the stability of data storage services.
[0068] S22. Call the meteorological API to obtain the predicted temperature for a future low-load window, associate it with the geographic location of the solid-state drive, and extract the temperature data for the predicted period as the future outdoor ambient temperature data. Simultaneously, collect historical data on the ambient temperature of the hard drive and the outdoor temperature, calculate the average temperature difference, obtain a temperature difference baseline, and establish a calibration model. Input the future outdoor ambient temperature data to obtain the predicted indoor ambient temperature.
[0069] It should be noted that this temperature prediction method, by integrating real-time meteorological information with historical temperature difference patterns, can not only use meteorological data to predict future indoor and outdoor temperatures, but also analyze the relationship between indoor and outdoor temperature changes through historical data. This allows the established calibration model to effectively eliminate the interference of factors such as geographic location and seasonal changes on temperature prediction, significantly improving the accuracy of the prediction of the future operating environment temperature of the solid-state drive.
[0070] S3. Analyze these low-load periods in combination with ambient temperature and garbage collection efficiency to determine the optimal low-load period for recycling;
[0071] Furthermore, these low-load periods are analyzed in combination with the ambient temperature and garbage collection efficiency to determine the optimal low-load period for garbage collection, including the following steps:
[0072] S31. Record the indicators of each garbage collection, including the number of free blocks recovered, the amount of valid data migrated, and the ratio of invalid pages; and calculate the average amount of invalid pages in different time periods;
[0073] S32. Generate an invalid page curve based on the historical data through time series to predict the invalid page increment in a specific period in the future. Then, estimate the invalid page volume in the future low-load period based on the invalid page increment. Finally, calculate the recycling efficiency based on the invalid page increment. The specific calculation formula is:
[0074] ;
[0075] in, The total amount of historical accumulated invalid pages that need to be processed during the current low-load period. The time when the last garbage collection was completed. The time when the current low load period starts, is the invalid page increment in time period t;
[0076] ;
[0077] in, The total amount of historical accumulated invalid pages that need to be processed during the current low-load period. is the total number of pages, is the write amplification factor, is the calculated recovery efficiency;
[0078] S33. Set scoring criteria for recycling efficiency, indoor ambient temperature, and time urgency, assign weights to these three indicators, calculate a comprehensive score, sort the scores of each low-load period from high to low, and determine the low-load period with the highest score as the optimal recycling period;
[0079] Furthermore, setting scoring criteria for recycling efficiency, indoor ambient temperature, and time urgency, setting weights for these three indicators, calculating a comprehensive score, sorting the scores of each low-load period from high to low, and determining the low-load period with the highest score as the optimal recycling period includes the following steps:
[0080] S331. Set temperature scoring rules, divide indoor ambient temperature into low, medium and high temperatures, and set the scores as 3, 2 and 1 respectively for the three levels; set recycling efficiency scoring rules, divide recycling efficiency into low efficiency, medium efficiency and high efficiency, and set the scores as 3, 2 and 1 respectively for the three levels; set time urgency scoring standards, divide time urgency into normal, medium and high, and set the scores as 3, 2 and 1 respectively for the three levels;
[0081] S332. Set weights for the three indicators and calculate the comprehensive score. The specific formula is:
[0082] ;
[0083] in, is the calculated comprehensive score, They are recycling efficiency score, temperature score, and urgency score;
[0084] S333. Sort the scores of the low-load periods from high to low, and determine the low-load period with the highest score as the optimal recovery period.
[0085] It should be noted that analyzing the low-load period in combination with the ambient temperature and garbage efficiency to determine the optimal low-load period for recycling can accurately evaluate the timing of SSD recycling from multiple dimensions such as system operating status, environmental conditions, and data processing efficiency. On the one hand, performing recycling operations during low-load periods can minimize interference with business operations. On the other hand, combining the ambient temperature can avoid the adverse effects of high or low temperature environments on equipment recycling and processing, ensuring the stability of data processing and equipment safety during the recycling process. At the same time, garbage efficiency analysis can ensure that recycling operations efficiently clear redundant data and improve storage resource utilization.
[0086] S4. Execute garbage collection of the hard disk through the controller.
[0087] Furthermore, performing garbage collection of the hard disk by the controller includes the following steps:
[0088] S41, obtaining the valid status of each page recorded in the flash translation layer of the solid state drive;
[0089] S42. The controller selects a block for garbage collection based on the number of invalid pages and the usage of the block.
[0090] S43, determining a block to be recycled, reading valid data in the block through a controller, and writing the valid data into a new free block;
[0091] S44: Erase the data in the block to be recycled, and reflect the new location of the data and the idle state of the block through the mapping table in the FTL.
[0092] In summary, the present invention can obtain future low-load periods and free block exhaustion time by obtaining historical usage data of the solid-state hard disk, including daily write volume and low-load windows with low I / O queue depth, thereby avoiding performing garbage collection operations during high-load periods, reducing recycling interruptions caused by the need to perform other operations on the solid-state hard disk garbage collection, and reducing the problem of low recycling efficiency; the present invention can plan recycling operations in advance before the free block exhaustion time point by selecting several low-load periods close to the predicted free block exhaustion, thereby avoiding the risk of business interruption due to storage space exhaustion and ensuring the continuity of data storage services; after the low-load period is selected, the ambient temperature of these low-load periods is collected as the outdoor ambient temperature, and the indoor ambient temperature is predicted in combination with historical data, which can not only eliminate the interference of geographical location and seasonal changes on temperature prediction, but also significantly improve the accuracy of the prediction of the future operating ambient temperature of the solid-state hard disk. and reliability, and can also provide an accurate basis for the subsequent selection of low-load periods for garbage collection; the present invention analyzes these low-load periods in combination with ambient temperature and garbage collection efficiency to determine the optimal low-load period for recycling, and can accurately evaluate the recycling timing of solid-state hard drives from multiple dimensions. When performing garbage collection, not only the load of the hard drive is important, but also the ambient temperature of the hard drive and the recycling efficiency are equally important. Excessively high ambient temperature will affect the garbage collection of the hard drive, and the recycling efficiency and time urgency will also affect the garbage collection of the hard drive. Therefore, this evaluation method can balance the system load and operating efficiency, realize comprehensive optimization from system operating status, environmental conditions to data processing efficiency, and reduce interference with recycling, thereby reducing garbage collection delays and garbage collection interruptions.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A garbage collection method for solid state drive flash memory, characterized in that: The method comprises the following steps: S1. Obtain historical usage data of the solid-state drive and obtain low-load periods and estimated free block exhaustion times based on usage habits; S11. Use the SSD's operating system tools to record historical data, including daily write volume, load type, I / O queue depth and response time, current number of free blocks, and OP space ratio. S12. Analyze the temporal distribution of historical data, mark daily periods of low write volume and low I / O queue depth, and classify load levels based on user behavior patterns to identify potential low-load windows. S121. Analyze the fluctuations in write volume and I / O queue depth over 24 hours each day, mark periods of sustained low activity, calculate the mean and standard deviation for each period, and identify periods below the overall mean. S122: If the I / O queue depth is ≤ 2 and the response time is < 1ms, the load is classified as low; if the I / O queue depth is 2 < I / O queue depth < 6 and the response time is 1-10ms, the load is classified as medium; if the I / O queue depth is ≥ 6 and the response time is > 10ms, the load is classified as high. At the same time, the user operation records in the system log are correlated and known high-load events are marked. S123: Select a period when the write volume is 30% lower than the daily average and the queue depth is ≤ 2. S2. Select several low-load periods close to the predicted free block exhaustion, collect the ambient temperature during these low-load periods as the outdoor ambient temperature, and simultaneously predict the indoor ambient temperature in combination with historical data; S3, analyzing these low-load periods in combination with the ambient temperature and the waste collection efficiency to determine the optimal low-load period for recycling; S31. Record the indicators of each garbage collection, including the number of free blocks recovered, the amount of valid data migrated, and the ratio of invalid pages; and calculate the average amount of invalid pages in different time periods; S32. Generate an invalid page curve based on the historical data through time series to predict the invalid page increment in a specific period in the future. Then, estimate the invalid page volume in the future low-load period based on the invalid page increment. Finally, calculate the recycling efficiency based on the invalid page increment. The specific calculation formula is: ; in, The total amount of historical accumulated invalid pages that need to be processed during the current low-load period. The time when the last garbage collection was completed. The time when the current low load period starts, is the invalid page increment in time period t; ; in, The total amount of historical accumulated invalid pages that need to be processed during the current low-load period. is the total number of pages, is the write amplification factor, is the calculated recovery efficiency; S33. Set scoring criteria for recycling efficiency, indoor ambient temperature, and time urgency, assign weights to these three indicators, calculate a comprehensive score, sort the scores of each low-load period from high to low, and determine the low-load period with the highest score as the optimal recycling period; S4. Execute garbage collection of the hard disk through the controller.
2. The garbage collection method for solid state drive flash memory according to claim 1, characterized in that: The method of obtaining historical usage data of the solid state drive and obtaining a low-load period and an estimated time when free blocks are exhausted based on usage habits further includes the following steps: S13. Obtain the garbage collection efficiency and calculate the free block exhaustion time based on the current total free block amount and the average daily effective write volume. The specific calculation formula is: ; in, The free block exhaustion time is calculated as is the current number of free blocks, is the capacity of a single block, is the average daily user original write volume, is the write amplification factor, which is the ratio of the amount of data actually written to the NAND to the amount written by the user.
3. The garbage collection method for solid state drive flash memory according to claim 1, characterized in that: The method of selecting several low-load periods close to the predicted free block exhaustion and collecting the ambient temperatures during these low-load periods as the outdoor ambient temperature and simultaneously predicting the indoor ambient temperature in combination with historical data includes the following steps: S21. Obtain the free block exhaustion time point according to the free block exhaustion time, and simultaneously select windows near the exhaustion time point and in the low-load period in combination with the low-load period list; S22. Call the meteorological API to obtain the predicted temperature of the window during the future low-load period, associate it with the geographic location of the solid-state drive, extract the temperature data during the predicted period, and use it as the future outdoor ambient temperature data. At the same time, collect the historical data of the ambient temperature of the hard drive and the outdoor temperature, calculate the average temperature difference, obtain the temperature difference baseline, and establish a calibration model. Input the future outdoor ambient temperature data to obtain the predicted indoor ambient temperature.
4. The garbage collection method for solid state drive flash memory according to claim 1, wherein: Setting the recycling efficiency, indoor ambient temperature, and time urgency scoring criteria, setting weights for these three indicators, calculating a comprehensive score, sorting the scores of the low-load periods from high to low, and determining the low-load period with the highest score as the optimal recycling period includes the following steps: S331. Set temperature scoring rules, divide indoor ambient temperature into low, medium and high temperatures, and set the scores as 3, 2 and 1 respectively for the three levels; set recycling efficiency scoring rules, divide recycling efficiency into low efficiency, medium efficiency and high efficiency, and set the scores as 3, 2 and 1 respectively for the three levels; set time urgency scoring standards, divide time urgency into normal, medium and high, and set the scores as 3, 2 and 1 respectively for the three levels; S332. Set weights for the three indicators and calculate the comprehensive score. The specific formula is: ; in, is the calculated comprehensive score, They are recycling efficiency score, temperature score, and urgency score; S333. Sort the scores of the low-load periods from high to low, and determine the low-load period with the highest score as the optimal recovery period.
5. The garbage collection method for solid state drive flash memory according to claim 1, wherein: The garbage collection of the hard disk by the controller includes the following steps: S41, obtaining the valid status of each page recorded in the flash translation layer of the solid state drive; S42. The controller selects a block for garbage collection based on the number of invalid pages and the usage of the block. S43, determining a block to be recycled, reading valid data in the block through a controller, and writing the valid data into a new free block; S44: Erase the data in the block to be recycled, and reflect the new location of the data and the idle state of the block through the mapping table in the FTL.
Citation Information
Patent Citations
Dynamic adjustment garbage recycling method suitable for solid-state disk
CN110347612A
Solid state disk dynamic garbage collection method and solid state disk
CN115687174A