Solid state disk data pre-reading method based on access frequency
Through the data block filtering method based on access frequency and read delay, the pre-reading area of the solid-state hard disk is optimized, and the problem of insufficient response speed caused by limited pre-reading area is solved, and more efficient data pre-reading and response speed is achieved.
Patent Information
- Application Number
- CN202510999773.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-08-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The pre-reading method of existing solid-state drives fails to effectively utilize the access frequency and read delay of data blocks, resulting in insufficient response speed when the pre-reading area is limited.
The data read controller counts the access frequency of data blocks, sets a threshold to filter out high-frequency data blocks and performs pre-reading, and selects associated data blocks to join the pre-reading area in combination with the read delay, optimizing the data selection of the pre-reading area.
In the case of limited pre-read area, useful data blocks can be effectively acquired and response speed can be improved, taking into account the read delay and access frequency of associated data blocks.
Smart Images

Figure CN120508263A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a solid state hard disk, and in particular to a method for pre-reading data of a solid state hard disk based on access frequency. Background Art
[0002] In the field of data storage, solid-state drives (SSDs) have high data storage and reading speeds. With increasingly mature technologies, it is difficult to achieve higher data reading speeds by breaking through the design of the SSD itself. Therefore, there are various means to assist in improving data reading speeds, among which pre-reading is a commonly used one. However, the current pre-reading of SSDs is often performed in batches without considering the data reading frequency and reading latency. Therefore, when the pre-reading area is limited, useful data may not be pre-read, and the response speed is still insufficient. Summary of the Invention
[0003] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a solid state hard disk data pre-reading method based on access frequency, which can effectively ensure that more useful pre-read data can be obtained when the pre-read area is limited, while taking into account the response speed.
[0004] The object of the present invention is achieved through the following technical solution: a method for pre-reading data from a solid-state hard disk based on access frequency, comprising the following steps: S1. Divide the data stored in the solid-state drive into several data blocks, and count the access frequency of each data block over a period of time through a data reading controller connected to the solid-state drive; S2. The data read controller sets the access frequency threshold, filters out data blocks whose access frequency is greater than the access frequency threshold, pre-reads the filtered data blocks, and saves them to the pre-read area; S3. The data read controller obtains the associated data blocks of each data block in the pre-read area, and selects the associated data blocks to add to the pre-read area based on the read latency and access frequency.
[0005] The beneficial effects of the present invention are as follows: the present invention first screens the data blocks in the pre-read area based on the access frequency, and can effectively ensure that more useful pre-read data can be obtained when the pre-read area is limited. Moreover, when selecting the associated data blocks in the pre-read area, the reading delay and access frequency of the associated data blocks are taken into account, and useful associated data blocks can be obtained while taking into account the response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0007] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the following.
[0008] like Figure 1 As shown, a method for pre-reading data from a solid-state hard disk based on access frequency is characterized by comprising the following steps: S1. Divide the data stored in the solid-state drive into several data blocks, and count the access frequency of each data block within a historical period of time through a data reading controller connected to the solid-state drive; the historical period of time is 0.5 hours, 1 hour or 2 hours.
[0009] S2. The data read controller sets the access frequency threshold, filters out data blocks whose access frequency is greater than the access frequency threshold, pre-reads the filtered data blocks, and saves them to the pre-read area; The step S2 comprises: S201. The data read controller sets the initial access frequency threshold; S202. The data read controller filters out data blocks whose access frequency is greater than the access frequency threshold, and calculates the total size of the filtered data blocks; S203. The data reading controller determines whether the total size of the filtered data blocks is greater than half of the storage space size of the pre-read area: If yes, then the frequency threshold is incremented by 1 and the process returns to step S202; If not, the filtered data blocks are pre-read and saved in the pre-read area.
[0010] S3. The data read controller obtains the associated data blocks of each data block in the pre-read area, and selects the associated data blocks to add to the pre-read area based on the read latency and access frequency.
[0011] The step S3 comprises: S301. The data read controller selects any data block from the pre-read area as the current data block, and statistics the other data blocks accessed during the historical period of time, each time the current data block is accessed, as associated data blocks added to the associated set of the current data block; S302. For each data block in the pre-storage area, repeat step S301 to obtain an associated set of data blocks in the pre-storage area each time; S303. The data read controller merges the associated sets of all data blocks to obtain a pre-storage area associated set, compares the data blocks in the pre-storage area and the pre-storage area associated set, and removes the data blocks that have appeared in the pre-storage area from the pre-storage area associated set; S304. The data read controller counts the occurrence frequency of each remaining data block in the pre-storage area associated set; S305. The data reading controller reads the data from the pre-stored area associated with the set of delays for each remaining data block, calculates the average delay, and divides the delay corresponding to each remaining data block by the average delay as the weight of the remaining data block; S306. The data reading controller multiplies the frequency of occurrence of each remaining data block in the pre-storage area associated set by the weight of the remaining data block to obtain each remaining priority value, and adds the remaining data blocks in the pre-storage area associated set to the pre-reading area in descending order of the priority values until the storage capacity of the pre-reading area reaches a preset threshold.
[0012] The method also includes: when a user initiates a data request to a data read controller, the data read controller parses the data block contained in the data request, and if the data block is in a pre-read area, directly feeds back the data in the pre-read area to the user; if the data block is not in the pre-read area, the data is read from the solid-state hard drive and fed back to the user.
[0013] The method further comprises: regularly updating the data blocks in the pre-storage area, clearing the data in the pre-storage area each time the data blocks are updated, and executing steps S1 to S3.
[0014] The foregoing description shows and describes a preferred embodiment of the present invention. However, as previously stated, it should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Instead, the present invention is applicable to various other combinations, modifications, and environments and is capable of modification within the scope of the inventive concept described herein, through the teachings above, or through techniques or knowledge in the relevant art. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be within the scope of the appended claims.
Claims
1. A method for pre-reading data from a solid-state drive based on access frequency, characterized by: The following steps are involved: S1. Divide the data stored in the solid-state drive into several data blocks, and count the access frequency of each data block over a period of time through a data reading controller connected to the solid-state drive; S2. The data read controller sets the access frequency threshold, filters out data blocks whose access frequency is greater than the access frequency threshold, pre-reads the filtered data blocks, and saves them to the pre-read area; S3. The data read controller obtains the associated data blocks of each data block in the pre-read area, and selects the associated data blocks to add to the pre-read area based on the read latency and access frequency.
2. The method for pre-reading data from a solid-state drive based on access frequency according to claim 1, wherein: The historical time period is 0.5 hours, 1 hour or 2 hours.
3. The method for pre-reading data from a solid-state drive based on access frequency according to claim 1, wherein: The step S2 comprises: S201. The data read controller sets the initial access frequency threshold; S202. The data read controller filters out data blocks whose access frequency is greater than the access frequency threshold, and calculates the total size of the filtered data blocks; S203. The data reading controller determines whether the total size of the filtered data blocks is greater than half of the storage space size of the pre-read area: If yes, then the frequency threshold is incremented by 1 and the process returns to step S202; If not, the filtered data blocks are pre-read and saved in the pre-read area.
4. The method for pre-reading data from a solid-state drive based on access frequency according to claim 1, wherein: The step S3 comprises: S301. The data read controller selects any data block from the pre-read area as the current data block, and statistics the other data blocks accessed during the historical period of time, each time the current data block is accessed, as associated data blocks added to the associated set of the current data block; S302. For each data block in the pre-storage area, repeat step S301 to obtain an associated set of data blocks in the pre-storage area each time; S303. The data read controller merges the associated sets of all data blocks to obtain a pre-storage area associated set, compares the data blocks in the pre-storage area and the pre-storage area associated set, and removes the data blocks that have appeared in the pre-storage area from the pre-storage area associated set; S304. The data read controller counts the occurrence frequency of each remaining data block in the pre-storage area associated set; S305. The data reading controller reads the data from the pre-stored area associated with the set of delays for each remaining data block, calculates the average delay, and divides the delay corresponding to each remaining data block by the average delay as the weight of the remaining data block; S306. The data reading controller multiplies the frequency of occurrence of each remaining data block in the pre-storage area associated set by the weight of the remaining data block to obtain each remaining priority value, and adds the remaining data blocks in the pre-storage area associated set to the pre-reading area in descending order of the priority values until the storage capacity of the pre-reading area reaches a preset threshold.
5. The method for pre-reading data from a solid-state drive based on access frequency according to claim 1, wherein: The method also includes: when a user initiates a data request to a data read controller, the data read controller parses the data block contained in the data request, and if the data block is in a pre-read area, directly feeds back the data in the pre-read area to the user; if the data block is not in the pre-read area, the data is read from the solid-state hard drive and fed back to the user.
6. The method for pre-reading data from a solid-state drive based on access frequency according to claim 1, wherein: The method further comprises: regularly updating the data blocks in the pre-storage area, clearing the data in the pre-storage area each time the data blocks are updated, and executing steps S1 to S3.
Citation Information
Patent Citations
Method for improving read cache hit of NVMe SSD
CN107943715A
Data processing method, storage medium, electronic device and program product
CN119902720A
Solid state disk pre-reading method and device based on host I / O software and medium
CN120010775A
Adaptive prefecth for predicted write requests
US9298633B1