WO2021120731A1 - 数据存储方法及组件,数据处理方法及组件 - Google Patents

数据存储方法及组件,数据处理方法及组件 Download PDF

Info

Publication number
WO2021120731A1
WO2021120731A1 PCT/CN2020/115543 CN2020115543W WO2021120731A1 WO 2021120731 A1 WO2021120731 A1 WO 2021120731A1 CN 2020115543 W CN2020115543 W CN 2020115543W WO 2021120731 A1 WO2021120731 A1 WO 2021120731A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
update
timestamp
target
logical address
Prior art date
Application number
PCT/CN2020/115543
Other languages
English (en)
French (fr)
Inventor
王岩
李法豪
李卫军
Original Assignee
深圳大普微电子科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201911310534.3A external-priority patent/CN112988612B/zh
Priority claimed from CN201911312256.5A external-priority patent/CN112988042B/zh
Priority claimed from CN201911310513.1A external-priority patent/CN112988040B/zh
Application filed by 深圳大普微电子科技有限公司 filed Critical 深圳大普微电子科技有限公司
Publication of WO2021120731A1 publication Critical patent/WO2021120731A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • This application relates to the field of data storage technology, and in particular to a data storage method and component, and a data processing method and component.
  • the space occupied by invalid data pages can be released by erasing blocks to realize the recovery of available space.
  • erasing blocks will bring about the migration of valid data pages.
  • the amount of data writing will increase (ie write amplification), and the increase of data writing will increase the wear of the storage medium and reduce storage. The life and performance of the medium.
  • the solid state drive includes multiple physical blocks, and each physical block includes multiple data pages. If the storage space is released by erasing the block, the data in the valid data page in the current physical block needs to be migrated to other physical blocks in order to release the storage space of the current physical block. If there are many valid data pages in the current physical block, the amount of data migration and writing will be relatively large, which will directly affect the performance of the solid state drive.
  • the purpose of this application is to provide a data storage method and assembly, a data processing method and assembly, so as to reduce the wear of the storage medium and improve the life and performance of the storage medium.
  • the specific plan is as follows:
  • this application provides a data storage method, including: obtaining the logical address and operating I/O timestamp corresponding to the I/O data; judging whether the recorded I/O timestamp of the logical address is the initial timestamp; if No, update the update cycle of the logical address to the difference between the operation I/O time stamp and the record I/O time stamp; update the record I/O time stamp to the operation I/O time stamp; calculate the update cycle and each time The difference degree of the preset period of each group; the I/O data is stored in the target physical block corresponding to the target group corresponding to the smallest difference degree.
  • the method further includes: if the recording I/O timestamp is the initial timestamp, judging whether the update period is the initial period; if so, updating the recording I/O timestamp to the operation I/O timestamp, and changing the update period Update to the minimum preset period; store the I/O data to the object physical block corresponding to the object group corresponding to the minimum preset period.
  • the method further includes: if the update period is not the initial period, retain the update period, and execute the update of the record I/O timestamp to the operation I/O timestamp; respectively calculate the difference between the update period and the preset period of each group Degree; the step of storing I/O data in the target physical block corresponding to the target group corresponding to the smallest difference degree.
  • storing the I/O data in the target physical block corresponding to the target group corresponding to the smallest difference degree includes: writing the I/O data into the target data page corresponding to the target group, the target data page being the target physical block in the target physical block Physical data page.
  • the method further includes: updating the preset period of the target group to an average value of the update periods of all logical addresses corresponding to the target group.
  • the method further includes: judging whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups; if so, closing the group with the least number of data pages in all groups, and splitting the target group For two groups, and establish the corresponding relationship between the two groups and the target physical block.
  • judging whether the record I/O time stamp of the logical address is before the initial time stamp further includes: determining the address range to which the logical address belongs, and determining the record I/O time stamp and update period of the address range as the record of the logical address I/O timestamp and update cycle.
  • the present application provides a data storage device, including: an acquisition module for acquiring the logical address and operation I/O timestamp corresponding to the I/O data; and a judgment module for judging the record I/O of the logical address Whether the O timestamp is the initial timestamp; the first update module is used to update the update cycle of the logical address to the operation I/O timestamp and the recording I/O timestamp if the recording I/O timestamp is not the initial timestamp The second update module is used to update the record I/O timestamp to the operation I/O timestamp; the calculation module is used to calculate the difference between the update period and the preset period of each group; the storage module , Used to store I/O data to the target physical block corresponding to the target group corresponding to the smallest difference degree.
  • this application provides a data storage method, including: if a Trim operation instruction is received, determining a logical address according to the Trim operation instruction; updating the update cycle of the logical address to the instruction timestamp and logical address of the Trim operation instruction The difference between the recorded I/O timestamps; the update cycle indicates the activity of the data stored through the logical address; the recorded I/O timestamp of the logical address is updated to the initial timestamp; if the I/O corresponding to the logical address is obtained Data, the I/O data is stored according to the update cycle and the recorded I/O timestamp.
  • the I/O data is stored according to the update cycle and the recorded I/O timestamp, including: obtaining the I/O data corresponding to the logical address; determining the I/O data correspondence The operation I/O timestamp; judge whether the record I/O timestamp is the initial timestamp; if not, update the logical address update cycle to the difference between the operation I/O timestamp and the record I/O timestamp; Update the record I/O timestamp to the operation I/O timestamp; calculate the difference between the update period and the preset period of each group separately; store the I/O data to the target corresponding to the target group corresponding to the smallest difference Physical block.
  • the method further includes: if the recording I/O timestamp is the initial timestamp, judging whether the update period is the initial period; if so, updating the recording I/O timestamp to the operation I/O timestamp, and changing the update period Update to the minimum preset period; store the I/O data to the object physical block corresponding to the object group corresponding to the minimum preset period.
  • the method further includes: if the update period is not the initial period, retain the update period, and execute the update of the record I/O timestamp to the operation I/O timestamp; respectively calculate the difference between the update period and the preset period of each group Degree; the step of storing I/O data in the target physical block corresponding to the target group corresponding to the smallest difference degree.
  • storing the I/O data in the target physical block corresponding to the target group corresponding to the smallest difference degree includes: writing the I/O data into the target data page corresponding to the target group, the target data page being the target physical block in the target physical block Physical data page.
  • the method further includes: updating the preset period of the target group to an average value of the update periods of all logical addresses corresponding to the target group.
  • the method further includes: judging whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups; if so, closing the group with the least number of data pages in all groups, and splitting the target group For two groups, and establish the corresponding relationship between the two groups and the target physical block.
  • the present application provides a data storage device, including: a determination module, configured to determine a logical address according to the Trim operation instruction if a Trim operation instruction is received; a first update module, configured to change the update cycle of the logical address
  • the update is the difference between the instruction timestamp of the Trim operation instruction and the record I/O timestamp of the logical address; the update cycle indicates the activity of the data stored through the logical address; the second update module is used to change the record I/O of the logical address
  • the O time stamp is updated to the initial time stamp; the storage module is used to store the I/O data according to the update cycle and the recorded I/O time stamp if the I/O data corresponding to the logical address is obtained.
  • this application provides a data processing method, including: receiving a garbage collection instruction; determining the physical data page corresponding to the garbage collection instruction; querying the logical address corresponding to the physical data page; increasing the update cycle of the logical address to obtain the target Update cycle; the update cycle represents the activity of the data in the physical data page; calculate the difference between the target update cycle and the preset cycle of each group; migrate the data in the physical data page to the group corresponding to the smallest difference Physical block.
  • increasing the update period of the logical address to obtain the target update period includes: doubling the update period to obtain the target update period.
  • the method further includes: obtaining I/O data corresponding to the logical address; determining the operation I/O time corresponding to the I/O data Stamp; judge whether the record I/O timestamp is the initial timestamp; if not, update the logical address update cycle to the difference between the operation I/O timestamp and the record I/O timestamp; the I/O time will be recorded
  • the stamp update is the operation I/O timestamp; the difference degree between the update period and the preset period of each group is calculated separately; the I/O data is stored in the target physical block corresponding to the target group corresponding to the minimum difference degree.
  • the method further includes: if the recording I/O timestamp is the initial timestamp, judging whether the update period is the initial period; if so, updating the recording I/O timestamp to the operation I/O timestamp, and changing the update period Update to the minimum preset period; store the I/O data to the object physical block corresponding to the object group corresponding to the minimum preset period.
  • storing the I/O data in the target physical block corresponding to the target group corresponding to the smallest difference degree includes: writing the I/O data into the target data page corresponding to the target group, the target data page being the target physical block in the target physical block Physical data page.
  • the method further includes: updating the preset period of the target group to an average value of the update periods of all logical addresses corresponding to the target group.
  • the method further includes: judging whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups; if so, closing the group with the least number of data pages in all groups, and splitting the target group For two groups, and establish the corresponding relationship between the two groups and the target physical block.
  • the present application provides a data processing device, including: an acquisition module for acquiring a garbage collection instruction; a determination module for determining a physical data page corresponding to the garbage collection instruction; and a query module for querying the physical data page Corresponding logical address; increase module, used to increase the update cycle of the logical address, to obtain the target update cycle; update cycle indicates the activity of the data in the physical data page; calculation module, used to calculate the target update cycle and each group The difference degree of the preset period; the migration module is used to migrate the data in the physical data page to the physical block corresponding to the group corresponding to the smallest difference degree.
  • the present application provides a device including: a storage unit and a main controller, wherein: the storage unit includes a physical block, and the physical data page in the physical block is used to store I/O data; the main controller is used to execute the foregoing Open method.
  • the present application provides a readable storage medium for storing a computer program, where the computer program is executed by a processor to implement the method disclosed above.
  • the logical address corresponds to the record I/O timestamp and the update cycle. If there is I/O data to be written on the logical address, then judge whether the record I/O timestamp of the logical address is the initial timestamp; if not, update the record I/O timestamp and update cycle of the logical address, Furthermore, the degree of difference between the update period and the preset period of each group is determined, and the current I/O data is stored in the target physical block corresponding to the target group corresponding to the smallest degree of difference. It can be seen that there are multiple groups preset in this application, each group corresponds to a preset period, and each group has a corresponding relationship with a physical block.
  • the update cycle of the logical address represents the activity of the data written through the logical address.
  • Active data can be regarded as hot data, and inactive data can be regarded as cold data.
  • the preset period corresponding to each group indicates the activity of the data that has been written, so if the difference between the update period of the logical address and the preset period of the group is smaller, it means that the current I/O data that needs to be written and the written data are If the activity is similar, the current I/O data is stored in the target physical block corresponding to the target group corresponding to the smallest difference, so that the data with similar activity can be stored in the same physical block, which also realizes the hot and cold data Separate storage. In this way, if the storage space is released by erasing the block, the effective data pages stored in the physical block will be greatly reduced, so the amount of data written and the wear of the storage medium can be reduced, and the life and performance of the storage medium can be improved.
  • a data storage component ie, a device, a device, and a readable storage medium
  • a data storage component ie, a device, a device, and a readable storage medium
  • the logical address corresponds to the record I/O timestamp and the update cycle.
  • the I/O timestamp is updated to the initial timestamp; if the I/O data corresponding to the logical address is subsequently obtained, the I/O data is stored according to the update cycle and the recorded I/O timestamp.
  • the update cycle represents the activity of the data stored through the logical address. The shorter the update period, the more active the data; the longer the update period, the less active the data.
  • Active data can be regarded as hot data, and inactive data can be regarded as cold data. Therefore, storing data according to the update cycle and recording I/O timestamp can realize the separate storage of cold and hot data. In this way, if the storage space is released by erasing the block, the effective data pages stored in the physical block will be greatly reduced. Therefore, the amount of data written and the wear of the storage medium can be reduced, and the life and performance of the storage medium can be improved. It should be noted that after the separate storage of cold and hot data is implemented, if the Trim operation needs to be executed, the invalid data that needs to be processed will also be reduced. Therefore, the present application can also improve the execution efficiency of the Trim operation.
  • a data storage component ie, a device, a device, and a readable storage medium
  • a data storage component ie, a device, a device, and a readable storage medium
  • the logical address corresponds to an update cycle.
  • the update cycle represents the activity of the data in the physical data page corresponding to the current logical address. The shorter the update cycle, the more active the data; the longer the update cycle, the less active the data. .
  • the garbage collection operation is performed on the logical address (that is, the data in the physical data page corresponding to the logical address is erased)
  • the update period of the logical address is increased to obtain the target update period; the target update period and the preset of each group are calculated
  • the difference degree of the period; the data in the physical data page is migrated to the physical block corresponding to the group corresponding to the smallest difference degree.
  • the garbage collection operation only migrates a small amount of data.
  • a data processing component ie, a device, a device, and a readable storage medium
  • this application also has the above technical effects.
  • Figure 1 is a flow chart of a data storage method disclosed in this application.
  • Figure 2 is a flow chart of a data processing method disclosed in this application.
  • FIG. 3 is a flowchart of another data processing method disclosed in this application.
  • FIG. 4 is a schematic diagram of a data storage device disclosed in this application.
  • FIG. 5 is a schematic diagram of a data storage device disclosed in this application.
  • Fig. 6 is a schematic diagram of a data processing device disclosed in this application.
  • Fig. 7 is a schematic diagram of a device disclosed in this application.
  • the present application provides a data storage solution, which can reduce the wear of the storage medium and improve the life and performance of the storage medium.
  • an embodiment of the present application discloses a data storage method, including:
  • S105 Calculate the degree of difference between the update period and the preset period of each group respectively.
  • Step S103 updates the update period from A to B
  • step S105 calculates the degree of difference between B and the preset period of each group, so as to obtain multiple degrees of difference.
  • S106 Store the I/O data in the target physical block corresponding to the target group corresponding to the smallest difference degree.
  • multiple groups are preset, and each group corresponds to a preset period, and each group has a corresponding relationship with a physical block.
  • the number of groups is not greater than the parallelism of the solid state drive, which refers to the maximum number of physical blocks that can be written at the same time.
  • the update cycle of the logical address represents the activity of the data written through the logical address. The shorter the update cycle, the more active the data; the longer the update cycle, the less active the data. Active data can be regarded as hot data, and inactive data can be regarded as cold data.
  • the preset period corresponding to each group indicates the activity of the data that has been written, so if the difference between the update period of the logical address and the preset period of the group is smaller, it means that the current I/O data that needs to be written and the written data are Are similar in activity.
  • the parallelism of the solid state drive is 3
  • a maximum of 3 groups can be preset: the first group, the second group, and the third group.
  • the current preset period of the first group is 8 ms
  • the current preset period of the second group is 16 ms
  • the current preset period of the third group is 32 ms.
  • the first preset period of the grouping can be artificially determined according to experience or the law of the business supported by the current solid state drive.
  • the difference between the update period and the preset period of the second group is the smallest, so the I/O data corresponding to the logical address is stored in the physical block corresponding to the second group .
  • storing the I/O data in the target physical block corresponding to the target group corresponding to the smallest difference degree includes: writing the I/O data into the target data page corresponding to the target group, and the target data
  • the page is the physical data page in the target physical block.
  • the I/O data can be data corresponding to a host write operation, or data corresponding to a garbage collection operation (that is, data in a valid data page that needs to be migrated).
  • storing the I/O data in the target physical block corresponding to the target group corresponding to the minimum difference degree includes: determining the target group corresponding to the minimum difference degree; marking the current logical address so that the current logical address is consistent with the target group
  • the I/O data is written into the target data page corresponding to the target group.
  • the corresponding relationship between the logical address and the group changes with the update period and the preset period. Therefore, the corresponding relationship between the logical address and the group changes in real time.
  • the preset period corresponding to the group is updated according to the update period of the corresponding logical address.
  • the current preset period of a certain group is 8, and the update period of the logical address corresponding to the I/O data has the smallest difference from the preset period 8, then the current I/O data is written into the physical block corresponding to the group .
  • the preset period of the current group can be updated according to the update period of the current logical address.
  • the preset period can be updated to the average value of the update periods of all logical addresses corresponding to the current group.
  • the preset period of the target group may be updated to the average value of the update periods of all logical addresses corresponding to the target group.
  • a group splitting step is further included.
  • the group splitting step specifically includes: judging whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups; if so, closing the group with the least number of data pages in all groups, and splitting the target group Divide into two groups, and establish the corresponding relationship between the two groups and the target physical block.
  • the group splitting step before storing the I/O data to the target physical block corresponding to the target group corresponding to the minimum preset period, the group splitting step is further included.
  • the group splitting step specifically includes: judging whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups; if so, closing the group with the least number of data pages in all groups, and splitting the target group Divide into two groups, and establish the corresponding relationship between the two groups and the target physical block.
  • the target group corresponds to a large number of data pages, it is divided into two groups. If the number of current groups is equal to the parallelism of the solid state drive, in order to avoid that the number of groups is greater than the parallelism of the solid state drive, the group with the least number of data pages in all the groups is closed. It can be seen from the above that when the packet splitting condition is met, the splitting step of the packet can be executed before the I/O data is stored in the physical block, or after the I/O data is stored in the physical block.
  • the grouping and splitting step can include:
  • N is a real number and not less than 2; if so, all groups are sorted according to the number of corresponding data pages from small to large, Obtain the grouping sequence, delete the first N-1 groups in the grouping sequence; split the target group into N-1 sub-groups, and establish the corresponding relationship between the N-1 sub-groups and the target physical block.
  • S107 Determine whether the update period is the initial period; if yes, perform S108; if not, keep the update period and perform S104.
  • the update cycle of the current logical address and the record I/O timestamp are both initial values, it means that the logical address has never been written with data. In this case, it is impossible to accurately determine the current update cycle and which preset The cycle difference is the smallest, so the I/O data is directly stored in the object physical block corresponding to the object group corresponding to the minimum preset cycle.
  • the update period of the minimum preset period is the shortest, and the possibility of garbage collection in a short period of time is the greatest.
  • the I/O data can be garbage collected in advance to reveal whether the grouping is accurate as soon as possible.
  • the minimum preset period is the minimum value among all current preset periods. Since the preset period of each group will change in real time, the minimum preset period also changes in real time.
  • the object group and the target group may be the same group or two different groups. Therefore, the target physical block and the target physical block may be the same physical block, or may be two different physical blocks.
  • storing the I/O data in the object physical block corresponding to the object group corresponding to the minimum preset period includes: writing the I/O data to the object data page corresponding to the object group, and the object The data page is the physical data page in the target physical block.
  • the preset period of the object group may be updated to the average value of the update periods of all logical addresses corresponding to the object group.
  • the group splitting step is further included.
  • the grouping and splitting steps specifically include: judging whether the number of data pages corresponding to the object group is twice the number of data pages corresponding to other groups; if so, closing the group with the least number of data pages in all groups, and splitting the object group Divide into two groups, and establish the corresponding relationship between the two groups and the target physical block.
  • the group splitting step before storing the I/O data to the object physical block corresponding to the object group corresponding to the minimum preset period, the group splitting step is further included.
  • the grouping and splitting steps specifically include: judging whether the number of data pages corresponding to the object group is twice the number of data pages corresponding to other groups; if so, closing the group with the least number of data pages in all groups, and splitting the object group Divide into two groups, and establish the corresponding relationship between the two groups and the target physical block.
  • the splitting step of the packet can be executed before the I/O data is stored in the physical block, or after the I/O data is stored in the physical block.
  • the grouping and splitting step can include:
  • N is a real number and not less than 2; if so, all groups are sorted according to the number of data pages corresponding to them from small to large, Obtain the grouping sequence, delete the first N-1 groups in the grouping sequence; split the object group into N-1 subgroups, and establish the corresponding relationship between the N-1 subgroups and the object physical block.
  • determining whether the recorded I/O timestamp of the logical address is before the initial timestamp also includes: determining the address range to which the logical address belongs, and updating the recorded I/O timestamp of the address range The cycle is determined as the record I/O timestamp and update cycle of the logical address.
  • logical addresses there are many logical addresses. If each logical address corresponds to a record I/O timestamp and an update cycle, then there will be a lot of record I/O timestamps and update cycles that need to be maintained. Conducive to the implementation of the program, it will increase the computational overhead. For this reason, logical addresses can be segmented. After segmentation, multiple logical addresses belonging to the same address segment (ie, address range) will correspond to the same record I/O timestamp and the same update cycle, thereby reducing computational overhead.
  • the logical address corresponds to the record I/O timestamp and the update period.
  • the recorded I/O timestamp can be used to determine the update cycle. If there is I/O data to be written on the logical address, then judge whether the record I/O timestamp of the logical address is the initial timestamp; if not, update the record I/O timestamp and update cycle of the logical address, Then determine the degree of difference between the update period and the preset period of each group, and store the current I/O data in the target physical block corresponding to the target group corresponding to the smallest degree of difference, so that the data with similar activity is stored in the same physical block. In the block, the separate storage of hot and cold data is realized. In this way, if the storage space is released by erasing the block, the effective data pages stored in the physical block will be greatly reduced, so the amount of data written and the wear of the storage medium can be reduced, and the life and performance of the storage medium can be improved.
  • the data processing method shown in Figure 2 can be implemented, including:
  • S203 Query the logical address corresponding to the physical data page.
  • the garbage collection instruction will carry the physical address of the physical data page, so the physical address can be obtained from the garbage collection instruction, and then the logical address can be determined according to the mapping table between the physical address and the logical address.
  • the update cycle indicates the activity of the data in the physical data page.
  • the shorter the update period the more active the data; the longer the update period, the less active the data.
  • Active data can be regarded as hot data, and inactive data can be regarded as cold data.
  • S205 Calculate the degree of difference between the target update period and the preset period of each group.
  • increasing the update period of the logical address to obtain the target update period includes: doubling the update period to obtain the target update period.
  • the difference between the target update period and the preset period of each group can be calculated, and the data in the physical data page can be migrated to the physical block corresponding to the group corresponding to the smallest difference. Separate storage of hot data.
  • the effective physical data page to be migrated is determined by the garbage collection instruction, and then the logical address corresponding to the effective physical data page is queried through the physical address of the effective physical data page, and finally the logical address is updated by increasing the logical address. Penalty adjustment grouping is carried out periodically.
  • the logical address not only corresponds to an update cycle, but also corresponds to a record I/O time stamp.
  • the recorded I/O timestamp can be used to determine the update cycle.
  • the present application can also improve the execution efficiency of the garbage collection operation.
  • the I/O data of the logical address corresponding to the garbage collection operation is obtained after the garbage collection operation is performed, the I/O data can be stored according to FIG. 1.
  • the logical address corresponds to an update cycle. If the garbage collection operation is performed on the logical address (that is, the data in the physical data page corresponding to the logical address is erased), the update cycle of the logical address is increased, thereby reducing the activity of the currently migrated data and making it compatible with other data ( Data that has similar activity with the currently migrated data) is stored in the same physical block to achieve separate storage of cold and hot data. In this way, if the storage space is released by erasing the block, the effective data pages stored in the physical block will be greatly reduced, so the amount of data written and the wear of the storage medium can be reduced, and the life and performance of the storage medium can be improved.
  • the data processing method shown in Figure 3 (specifically a data storage method) can be implemented, including:
  • the Trim operation instruction will carry the logical address, so the logical address can be obtained from the Trim operation instruction to determine the logical address.
  • the update cycle represents the activity of the data stored through the logical address. The shorter the update period, the more active the data; the longer the update period, the less active the data.
  • the logical address corresponds to the record I/O time stamp and the update cycle.
  • the recorded I/O timestamp can be used to determine the update cycle.
  • the I/O data on the logical address can be stored according to the update period and record I/O timestamp.
  • the shorter the update period the more active the data; the longer the update period, the less active the data.
  • Active data can be regarded as hot data, and inactive data can be regarded as cold data. Therefore, storing data according to the update cycle and recording I/O timestamp can realize the separate storage of cold and hot data.
  • S304 can refer to FIG. 1.
  • the logical address corresponds to the record I/O timestamp and the update period.
  • determine the logical address according to the Trim operation instruction After receiving the Trim operation instruction, determine the logical address according to the Trim operation instruction; update the update cycle of the logical address to the difference between the instruction timestamp of the Trim operation instruction and the record I/O timestamp of the logical address; record the logical address
  • the I/O timestamp is updated to the initial timestamp; if the I/O data corresponding to the logical address is subsequently obtained, the I/O data is stored according to the update cycle and the recorded I/O timestamp.
  • the specific implementation process includes an initialization part and an update part.
  • the initialization part includes: initializing LBA (Logical Block Address) life cycle table and initializing grouping.
  • LBA Logical Block Address
  • Initializing the LBA life cycle table includes: establishing the LBA life cycle table inside the solid state drive.
  • the fields included in the LBA life cycle table are shown in Table 1.
  • the row number represents a certain address range, including multiple logical addresses; the record I/O timestamp and update period are the record I/O timestamp and update period corresponding to the current address range.
  • the operation I/O timestamp of any logical address closest to the current time is recorded as the recording I/O timestamp.
  • the average value of the operation I/O timestamps of all logical addresses included in the current line number may also be recorded as the recording I/O timestamp.
  • the initial timestamp corresponding to each row number is -1, and the initial period is 0. Since multiple logical addresses correspond to a row, if a write operation occurs on any logical address, the record I/O timestamp and update cycle of the row may change.
  • the time interval between two write operations on the same logical address is called the update cycle of the current logical address, which is represented by the difference between the I/O timestamps of the two operations, and the unit is generally microseconds.
  • the time interval of the most recent write operation of different logical addresses of the same row number also becomes the update cycle of the current logical address. It is expressed by the difference of I/O timestamp with two operations of two different logical addresses, and the unit is general.
  • the shorter the update period the more active the manipulated data (that is, the hotter the data); the longer the update period, the less active the manipulated data (that is, the colder the data).
  • the recording I/O timestamp can be calculated in units of microseconds using floating-point numbers, or can be calculated using integers through a custom timer (for example, several clock cycles as a timing cycle). If you use floating point numbers, you need 64 bits to record the I/O timestamp, and if you use integers, you need 32 bits to record the I/O timestamp.
  • Initializing the grouping specifically includes: establishing 8 groups inside the solid state disk, numbered from 0 to 7, and setting the preset period corresponding to each grouping, and the physical block corresponding to each grouping. Among them, different groups correspond to different physical blocks. 8 is the parallelism of current solid-state drives. Please refer to Table 2 for each group and preset period.
  • the update part includes: update the LBA life cycle table and update the preset cycle.
  • Updating the LBA life cycle table specifically includes: If a write operation occurs on any logical address (this write operation can be a host write operation, or a migration write operation to a valid data page during a garbage collection operation), then determine the current The operation I/O timestamp of the write operation; at the same time, it is judged whether the record I/O timestamp of the logical address is the initial timestamp; if not, the update cycle of the logical address is updated to the operation I/O timestamp and record I/O Time stamp difference; update the record I/O time stamp to the operation I/O time stamp; if the record I/O time stamp is the initial time stamp, judge whether the update cycle is the initial cycle; if so, the I/O time stamp will be recorded The O timestamp is updated to the operation I/O timestamp, and the update cycle is updated to the minimum preset cycle.
  • the update cycle is not the initial cycle, the update cycle is retained, and the record I/O timestamp is updated to the operation I/O timestamp. After the record I/O timestamp and the update cycle are updated, the data corresponding to the current write operation can be written according to the corresponding process to realize the separate storage of cold and hot data. The specific process can be seen in Fig. 2, which will not be repeated in this embodiment.
  • the logical address is determined according to the Trim operation instruction; the update cycle of the logical address is updated to the difference between the instruction time stamp of the Trim operation instruction and the record I/O time stamp of the logical address; the logical address is recorded
  • the I/O timestamp is updated to the initial timestamp; if the I/O data corresponding to the logical address is subsequently obtained, the I/O data is stored according to the update cycle and the recorded I/O timestamp, so as to realize the separate storage of cold and hot data.
  • the update period of the logical address is increased to obtain the target update period; the target update period and the preset of each group are calculated Cycle difference degree; the data in the physical data page is migrated to the physical block corresponding to the group corresponding to the smallest difference degree, so that data with similar activity levels are stored in the same physical block, realizing separate storage of hot and cold data.
  • Updating the preset period specifically includes: updating the preset period of the group corresponding to the current logical address according to the current update period corresponding to the current logical address. That is, the preset period of the current group is updated to the average value of the update periods of all logical addresses corresponding to the current group.
  • the solution provided by this implementation uses the idea of grouping to store hot and cold data, thereby reducing write amplification, thereby prolonging the life of the solid state drive, reducing costs, and improving the performance of the solid state drive at the same time.
  • the following describes a data storage device provided by an embodiment of the present application.
  • the data storage device described below and the data storage method described above can be cross-referenced.
  • an embodiment of the present application discloses a data storage device, including:
  • the obtaining module 401 is used to obtain the logical address corresponding to the I/O data and the operation I/O timestamp;
  • the judging module 402 is used to judge whether the recorded I/O time stamp of the logical address is the initial time stamp;
  • the first update module 403 is configured to update the update period of the logical address to the difference between the operation I/O timestamp and the recording I/O timestamp if the recording I/O timestamp is not the initial timestamp;
  • the second update module 404 is used to update the record I/O timestamp to the operation I/O timestamp;
  • the calculation module 405 is configured to calculate the difference between the update period and the preset period of each group respectively;
  • the storage module 406 is configured to store the I/O data in the target physical block corresponding to the target group corresponding to the minimum difference degree.
  • it further includes: an update cycle judging module, configured to determine whether the update cycle is the initial cycle if the recorded I/O timestamp is the initial time stamp; and a third update module is used to determine whether the update cycle is the initial cycle.
  • the period is the initial period.
  • the record I/O timestamp is updated to the operation I/O timestamp, and the update period is updated to the minimum preset period; the I/O data is stored to the object group corresponding to the minimum preset period Object physical block.
  • the method further includes: an execution module, configured to reserve the update period if the update period is not the initial period, and execute the steps in the second update module, the calculation module, and the storage module.
  • the storage module is specifically configured to: write I/O data into the target data page corresponding to the target group, the target data page being a physical data page in the target physical block.
  • it further includes: a fourth update module, configured to update the preset period of the target group to the average value of the update periods of all the logical addresses corresponding to the target group.
  • it further includes: a group split judgment module, configured to judge whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups;
  • Splitting module if the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups, close the group with the least number of data pages in all groups, and split the target group into two Group, and establish the correspondence between the two groups and the target physical block.
  • it further includes: a determining module, configured to determine the address range to which the logical address belongs, and determine the record I/O timestamp and update period of the address range as the record I/O timestamp of the logical address And update cycle.
  • a determining module configured to determine the address range to which the logical address belongs, and determine the record I/O timestamp and update period of the address range as the record I/O timestamp of the logical address And update cycle.
  • this embodiment provides a data storage device, which can store data with similar activity in the same physical block, which also realizes the separate storage of cold and hot data. In this way, if the storage space is released by erasing the block, the effective data pages stored in the physical block will be greatly reduced, so the amount of data written and the wear of the storage medium can be reduced, and the life and performance of the storage medium can be improved.
  • the following describes a data storage device provided by an embodiment of the present application.
  • the data storage device described below and the data storage method described above can be cross-referenced.
  • an embodiment of the present application discloses a data storage device, including:
  • the determining module 501 is configured to determine a logical address according to the Trim operation instruction if a Trim operation instruction is received;
  • the first update module 502 is configured to update the update cycle of the logical address to the difference between the instruction time stamp of the Trim operation instruction and the record I/O time stamp of the logical address; the update cycle represents the activity of the data stored through the logical address;
  • the second update module 503 is used to update the recorded I/O timestamp of the logical address to the initial timestamp;
  • the storage module 504 is configured to store the I/O data according to the update cycle and the recorded I/O time stamp if the I/O data corresponding to the logical address is acquired.
  • the storage module includes: an acquiring unit, configured to acquire I/O data corresponding to a logical address; a determining unit, configured to determine an operation I/O timestamp corresponding to the I/O data; first The judging unit is used to judge whether the record I/O time stamp is the initial time stamp; the first update unit is used to update the logical address update cycle to the operation I/O if the record I/O time stamp is not the initial time stamp The difference between the time stamp and the record I/O time stamp; the second update unit is used to update the record I/O time stamp to the operation I/O time stamp; the calculation unit is used to separately calculate the update period and each packet The difference degree of the preset period; the first storage unit is used to store the I/O data to the target physical block corresponding to the target group corresponding to the minimum difference degree.
  • the storage module further includes: a second judging unit, configured to judge whether the update period is the initial period if the recorded I/O time stamp is the initial time stamp; and the third update unit is used to If the update cycle is the initial cycle, the record I/O time stamp is updated to the operation I/O time stamp, and the update cycle is updated to the minimum preset cycle; the second storage unit is used to store the I/O data to the minimum The object physical block corresponding to the object group corresponding to the preset period.
  • the storage module further includes: an execution unit, configured to reserve the update period if the update period is not the initial period, and execute the steps in the second update unit, the calculation unit, and the first storage unit.
  • the first storage unit is specifically configured to: write I/O data into a target data page corresponding to the target group, the target data page being a physical data page in the target physical block.
  • the storage module further includes: a fourth update unit, configured to update the preset period of the target group to an average value of the update periods of all logical addresses corresponding to the target group.
  • the storage module further includes: a third judging unit for judging whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups; the splitting unit uses If the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups, close the group with the least number of data pages in all groups, split the target group into two groups, and create two groups. The correspondence between each group and the target physical block.
  • this embodiment provides a data storage device, which can store data with similar activity in the same physical block, which also realizes the separate storage of cold and hot data. In this way, if the storage space is released by erasing the block, the effective data pages stored in the physical block will be greatly reduced, so the amount of data written and the wear of the storage medium can be reduced, and the life and performance of the storage medium can be improved.
  • the following describes a data processing device provided by an embodiment of the present application.
  • the data processing device described below and the data processing method described above can be cross-referenced.
  • an embodiment of the present application discloses a data processing device, including:
  • the obtaining module 601 is used to obtain garbage collection instructions
  • the determining module 602 is used to determine the physical data page corresponding to the garbage collection instruction
  • the query module 603 is used to query the logical address corresponding to the physical data page
  • the increase module 604 is used to increase the update period of the logical address to obtain the target update period; the update period represents the activity of the data in the physical data page;
  • the calculation module 605 is used to calculate the degree of difference between the target update period and the preset period of each group
  • the migration module 606 is used to migrate the data in the physical data page to the physical block corresponding to the group corresponding to the smallest difference degree.
  • the enlargement module is specifically used for: doubling the update period to obtain the target update period.
  • the method further includes: an I/O data acquisition module for acquiring I/O data corresponding to the logical address; operating I/O O time stamp determining module, used to determine the operation I/O time stamp corresponding to the I/O data; judging module, used to determine whether the record I/O time stamp of the logical address is the initial time stamp; the first update module, used to If the record I/O timestamp is not the initial timestamp, the update cycle of the logical address is updated to the difference between the operation I/O timestamp and the record I/O timestamp; the second update module is used to record the I/O time
  • the stamp update is the operation I/O time stamp;
  • the difference degree calculation module is used to calculate the difference degree between the update period and the preset period of each group;
  • the storage module is used to store the I/O data to the minimum difference degree corresponding The target physical block corresponding to the target group.
  • it further includes: an update cycle judging module, configured to determine whether the update cycle is the initial cycle if the recorded I/O timestamp is the initial time stamp; and a third update module is used to determine whether the update cycle is the initial cycle.
  • the period is the initial period.
  • the record I/O timestamp is updated to the operation I/O timestamp, and the update period is updated to the minimum preset period; the I/O data is stored to the object group corresponding to the minimum preset period Object physical block.
  • it further includes: an execution module, configured to reserve the update period if the update period is not the initial period, and execute the steps in the second update module, the difference degree calculation module, and the storage module.
  • the storage module is specifically configured to: write I/O data into the target data page corresponding to the target group, the target data page being a physical data page in the target physical block.
  • it further includes: a fourth update module, configured to update the preset period of the target group to the average value of the update periods of all the logical addresses corresponding to the target group.
  • it further includes: a group splitting judging module for judging whether the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups; a splitting module for If the number of data pages corresponding to the target group is twice the number of data pages corresponding to other groups, close the group with the least number of data pages in all groups, split the target group into two groups, and create two The correspondence between the grouping and the target physical block.
  • it further includes: an address range determination module, configured to determine the address range to which the logical address belongs, and determine the record I/O timestamp and update cycle of the address range as the record I/O of the logical address Timestamp and update cycle.
  • an address range determination module configured to determine the address range to which the logical address belongs, and determine the record I/O timestamp and update cycle of the address range as the record I/O of the logical address Timestamp and update cycle.
  • this embodiment provides a data processing device, which can reduce write amplification, thereby prolonging the life of the solid state drive, reducing the cost, and improving the performance of the solid state drive.
  • an embodiment of the present application discloses a device including: a storage unit 701 and a main controller 702, where the storage unit includes a physical block, and the physical data pages in the physical block are used to store I/O data;
  • the main controller is used to execute the method disclosed in any of the foregoing embodiments.
  • the following introduces a readable storage medium provided by an embodiment of the present application.
  • the readable storage medium described below and any of the methods, devices, and devices described above can refer to each other.
  • a readable storage medium for storing a computer program, where the computer program is executed by a processor to implement the method disclosed in the foregoing embodiment.
  • the computer program is executed by a processor to implement the method disclosed in the foregoing embodiment.
  • the specific steps of the method reference may be made to the corresponding content disclosed in the foregoing embodiment, and details are not described herein again.
  • the steps of the method or algorithm described in the embodiments disclosed in this document can be directly implemented by hardware, a software module executed by a processor, or a combination of the two.
  • the software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other form of well-known readable storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

一种数据存储方法及组件,数据处理方法及组件。所述方法包括:获取I/O数据对应的逻辑地址和操作I/O时间戳(S101);判断逻辑地址的记录I/O时间戳是否为初始时间戳(S102);若否,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值(S103);将记录I/O时间戳更新为操作I/O时间戳(S104);分别计算更新周期与每个分组的预设周期的差异度(S105);将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块(S106)。所述方法可使具有相近活跃度的数据存储在同一物理块中,实现冷热数据的分开存储,因此可以提高存储介质的寿命和性能。

Description

数据存储方法及组件,数据处理方法及组件
本申请要求于2019年12月18日提交至中国专利局、申请号为201911310513.1、发明名称为“一种数据存储方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请要求于2019年12月18日提交至中国专利局、申请号为201911312256.5、发明名称为“一种数据存储方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请要求于2019年12月18日提交至中国专利局、申请号为201911310534.3、发明名称为“一种数据处理方法、装置、设备及可读存储介质”的中国专利申请的优先权;其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据存储技术领域,特别涉及一种数据存储方法及组件,数据处理方法及组件。
背景技术
在固态硬盘及Nand Flash存储介质中,可以通过擦除块来释放无效数据页占用的空间,以实现可用空间的回收。其中,擦除块会带来有效数据页的迁移,当有效数据页较多时,会导致数据写入量增大(即写放大),而数据写入量增大会加剧存储介质的磨损,降低存储介质的寿命和性能。
以固态硬盘为例,固态硬盘中包括多个物理块,每个物理块包括多个数据页。若通过擦除块来释放存储空间,则需要将当前物理块中的有效数据页中的数据迁移至其他物理块中,以便释放当前物理块的存储空间。若当前物理块中的有效数据页较多,那么数据迁移量和写入量会比较大,因此会直接影响固态硬盘的性能。
因此,如何降低存储介质的磨损,提高存储介质的寿命和性能,是本领域技术人员需要解决的问题。
发明内容
有鉴于此,本申请的目的在于提供一种数据存储方法及组件,数据处理方法及组件,以降低存储介质的磨损,提高存储介质的寿命和性能。其具体方案如下:
第一方面,本申请提供了一种数据存储方法,包括:获取I/O数据对应的逻辑地址和操作I/O时间戳;判断逻辑地址的记录I/O时间戳是否为 初始时间戳;若否,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值;将记录I/O时间戳更新为操作I/O时间戳;分别计算更新周期与每个分组的预设周期的差异度;将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
优选地,还包括:若记录I/O时间戳为初始时间戳,则判断更新周期是否为初始周期;若是,则将记录I/O时间戳更新为操作I/O时间戳,并将更新周期更新为最小预设周期;将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。
优选地,还包括:若更新周期不是初始周期,则保留更新周期,并执行将记录I/O时间戳更新为操作I/O时间戳;分别计算更新周期与每个分组的预设周期的差异度;将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块的步骤。
优选地,将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:将I/O数据写入目标分组对应的目标数据页,目标数据页为目标物理块中的物理数据页。
优选地,还包括:将目标分组的预设周期更新为目标分组对应的所有逻辑地址的更新周期的平均值。
优选地,还包括:判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;若是,则关闭所有分组中的数据页个数最少的分组,将目标分组拆分为两个分组,并建立两个分组与目标物理块的对应关系。
优选地,判断逻辑地址的记录I/O时间戳是否为初始时间戳之前,还包括:确定逻辑地址所属的地址范围,将地址范围的记录I/O时间戳和更新周期确定为逻辑地址的记录I/O时间戳和更新周期。
第二方面,本申请提供了一种数据存储装置,包括:获取模块,用于获取I/O数据对应的逻辑地址和操作I/O时间戳;判断模块,用于判断逻辑地址的记录I/O时间戳是否为初始时间戳;第一更新模块,用于若记录I/O时间戳不是初始时间戳,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值;第二更新模块,用于将记录I/O时间戳更新为操作I/O时间戳;计算模块,用于分别计算更新周期与每个分组的预设周期的差异度;存储模块,用于将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
第三方面,本申请提供了一种数据存储方法,包括:若接收到Trim操作指令,则根据Trim操作指令确定逻辑地址;将逻辑地址的更新周期更新 为Trim操作指令的指令时间戳与逻辑地址的记录I/O时间戳的差值;更新周期表示通过逻辑地址存储的数据的活跃度;将逻辑地址的记录I/O时间戳更新为初始时间戳;若获取到逻辑地址对应的I/O数据,则根据更新周期和记录I/O时间戳存储I/O数据。
优选地,若获取到逻辑地址对应的I/O数据,则根据更新周期和记录I/O时间戳存储I/O数据,包括:获取逻辑地址对应的I/O数据;确定I/O数据对应的操作I/O时间戳;判断记录I/O时间戳是否为初始时间戳;若否,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值;将记录I/O时间戳更新为操作I/O时间戳;分别计算更新周期与每个分组的预设周期的差异度;将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
优选地,还包括:若记录I/O时间戳为初始时间戳,则判断更新周期是否为初始周期;若是,则将记录I/O时间戳更新为操作I/O时间戳,并将更新周期更新为最小预设周期;将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。
优选地,还包括:若更新周期不是初始周期,则保留更新周期,并执行将记录I/O时间戳更新为操作I/O时间戳;分别计算更新周期与每个分组的预设周期的差异度;将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块的步骤。
优选地,将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:将I/O数据写入目标分组对应的目标数据页,目标数据页为目标物理块中的物理数据页。
优选地,还包括:将目标分组的预设周期更新为目标分组对应的所有逻辑地址的更新周期的平均值。
优选地,还包括:判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;若是,则关闭所有分组中的数据页个数最少的分组,将目标分组拆分为两个分组,并建立两个分组与目标物理块的对应关系。
第四方面,本申请提供了一种数据存储装置,包括:确定模块,用于若接收到Trim操作指令,则根据Trim操作指令确定逻辑地址;第一更新模块,用于将逻辑地址的更新周期更新为Trim操作指令的指令时间戳与逻辑地址的记录I/O时间戳的差值;更新周期表示通过逻辑地址存储的数据的活跃度;第二更新模块,用于将逻辑地址的记录I/O时间戳更新为初始时间戳;存储模块,用于若获取到逻辑地址对应的I/O数据,则根据更新 周期和记录I/O时间戳存储I/O数据。
第五方面,本申请提供了一种数据处理方法,包括:接收垃圾回收指令;确定垃圾回收指令对应的物理数据页;查询物理数据页对应的逻辑地址;增大逻辑地址的更新周期,获得目标更新周期;更新周期表示物理数据页中的数据的活跃度;计算目标更新周期与每个分组的预设周期的差异度;将物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块。
优选地,增大逻辑地址的更新周期,获得目标更新周期,包括:将更新周期加倍,获得目标更新周期。
优选地,将物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块之后,还包括:获取逻辑地址对应的I/O数据;确定I/O数据对应的操作I/O时间戳;判断记录I/O时间戳是否为初始时间戳;若否,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值;将记录I/O时间戳更新为操作I/O时间戳;分别计算更新周期与每个分组的预设周期的差异度;将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
优选地,还包括:若记录I/O时间戳为初始时间戳,则判断更新周期是否为初始周期;若是,则将记录I/O时间戳更新为操作I/O时间戳,并将更新周期更新为最小预设周期;将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。
优选地,将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:将I/O数据写入目标分组对应的目标数据页,目标数据页为目标物理块中的物理数据页。
优选地,还包括:将目标分组的预设周期更新为目标分组对应的所有逻辑地址的更新周期的平均值。
优选地,还包括:判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;若是,则关闭所有分组中的数据页个数最少的分组,将目标分组拆分为两个分组,并建立两个分组与目标物理块的对应关系。
第六方面,本申请提供了一种数据处理装置,包括:获取模块,用于获取垃圾回收指令;确定模块,用于确定垃圾回收指令对应的物理数据页;查询模块,用于查询物理数据页对应的逻辑地址;增大模块,用于增大逻辑地址的更新周期,获得目标更新周期;更新周期表示物理数据页中的数据的活跃度;计算模块,用于计算目标更新周期与每个分组的预设周期的差异度;迁移模块,用于将物理数据页中的数据迁移至最小差异度对应的 分组所对应的物理块。
第七方面,本申请提供了一种设备,包括:存储单元和主控制器,其中:存储单元包括物理块,物理块中的物理数据页用于存储I/O数据;主控制器用于执行前述公开的方法。
第八方面,本申请提供了一种可读存储介质,用于保存计算机程序,其中,计算机程序被处理器执行时实现前述公开的方法。
在本申请中,逻辑地址对应有记录I/O时间戳和更新周期。若该逻辑地址上有I/O数据需要写入,那么判断逻辑地址的记录I/O时间戳是否为初始时间戳;若否,则更新该逻辑地址的记录I/O时间戳和更新周期,进而确定更新周期与各个分组的预设周期的差异度,并将当前I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。可见,本申请预设有多个分组,每个分组对应有预设周期,且各个分组与物理块具有对应关系。其中,逻辑地址的更新周期表示通过该逻辑地址写入的数据的活跃度,更新周期越短,表示数据越活跃;更新周期越长,表示数据越不活跃。活跃数据可看作热数据,不活跃的数据可看作冷数据。各个分组对应的预设周期表示已写入数据的活跃度,因此若逻辑地址的更新周期与分组的预设周期的差异度越小,说明当前需要写入的I/O数据与已写入数据的活跃度相近,那么将当前I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,可以使具有相近活跃度的数据存储在同一物理块中,也就实现了冷热数据的分开存储。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数据写入量和存储介质的磨损,提高存储介质的寿命和性能。
相应地,本申请提供的一种数据存储组件(即装置、设备及可读存储介质),也同样具有上述技术效果。
在本申请中,逻辑地址对应有记录I/O时间戳和更新周期。若接收到Trim操作指令后,根据Trim操作指令确定逻辑地址;将逻辑地址的更新周期更新为Trim操作指令的指令时间戳与逻辑地址的记录I/O时间戳的差值;将逻辑地址的记录I/O时间戳更新为初始时间戳;后续若获取到逻辑地址对应的I/O数据,则根据更新周期和记录I/O时间戳存储I/O数据。其中,更新周期表示通过逻辑地址存储的数据的活跃度。更新周期越短,表示数据越活跃;更新周期越长,表示数据越不活跃。活跃数据可看作热数据,不活跃的数据可看作冷数据。因此根据更新周期和记录I/O时间戳存储数据,可以实现冷热数据的分开存储。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数 据写入量和存储介质的磨损,提高存储介质的寿命和性能。需要说明的是,实现冷热数据的分开存储后,若需要执行Trim操作,则需要处理的无效数据也会减少,因此本申请还可以提高Trim操作的执行效率。
相应地,本申请提供的一种数据存储组件(即装置、设备及可读存储介质),也同样具有上述技术效果。
在本申请中,逻辑地址对应有更新周期,更新周期表示当前逻辑地址对应的物理数据页中的数据的活跃度,更新周期越短,表示数据越活跃;更新周期越长,表示数据越不活跃。若对逻辑地址执行垃圾回收操作(即擦除该逻辑地址对应的物理数据页中的数据),那么增大逻辑地址的更新周期,获得目标更新周期;计算目标更新周期与每个分组的预设周期的差异度;将物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块。理想情况下,垃圾回收操作仅迁移少量数据,因此在执行垃圾回收操作时,增大逻辑地址的更新周期,可降低当前迁移的数据的活跃度,使其与其他数据(与当前迁移的数据具有相近活跃度的数据)存储在同一物理块中,实现冷热数据的分开存储。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数据写入量和存储介质的磨损,提高存储介质的寿命和性能。需要说明的是,实现冷热数据的分开存储后,若再次执行垃圾回收操作,则需要迁移的数据量会大大减少,因此本申请还可以提高垃圾回收操作的执行效率。
相应地,本申请提供的一种数据处理组件(即装置、设备及可读存储介质),也同样具有上述技术效果。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请公开的一种数据存储方法流程图;
图2为本申请公开的一种数据处理方法流程图;
图3为本申请公开的另一种数据处理方法流程图;
图4为本申请公开的一种数据存储装置示意图;
图5为本申请公开的一种数据存储装置示意图;
图6为本申请公开的一种数据处理装置示意图;
图7为本申请公开的一种设备示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
目前,现有技术在通过擦除块来释放存储空间时,数据迁移量和写入量比较大,会加剧存储介质的磨损,降低存储介质的寿命和性能。为此,本申请提供了一种数据存储方案,能够降低存储介质的磨损,提高存储介质的寿命和性能。
参见图1所示,本申请实施例公开了一种数据存储方法,包括:
S101、获取I/O数据对应的逻辑地址和操作I/O时间戳。
S102、判断逻辑地址的记录I/O时间戳是否为初始时间戳;若是,则执行S107;若否,则执行S103。
S103、将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值。
S104、将记录I/O时间戳更新为操作I/O时间戳。
S105、分别计算更新周期与每个分组的预设周期的差异度。
其中,计算更新周期与预设周期的差异度时,使用的更新后的更新周期。例如:S103步骤将更新周期更新为由A更新为B,那么S105步骤计算的是B与每个分组的预设周期的差异度,从而获得多个差异度。
S106、将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
需要说明的是,本实施例预设有多个分组,每个分组对应有预设周期,且各个分组与物理块具有对应关系。其中,若当前存储介质为固态硬盘,那么分组的数量不大于固态硬盘的并行度,并行度是指可以同时写的最大物理块数目。其中,逻辑地址的更新周期表示通过该逻辑地址写入的数据的活跃度,更新周期越短,表示数据越活跃;更新周期越长,表示数据越不活跃。活跃数据可看作热数据,不活跃的数据可看作冷数据。各个分组对应的预设周期表示已写入数据的活跃度,因此若逻辑地址的更新周期与分组的预设周期的差异度越小,说明当前需要写入的I/O数据与已写入数据的活跃度相近。
例如:固态硬盘的并行度为3,则最多可预设3个分组:第一分组、第二分组、第三分组。假设第一分组的当前预设周期为8ms、第二分组的 当前预设周期为16ms、第三分组的当前预设周期为32ms。固态硬盘初始化后,分组的第一个预设周期可以根据经验或当前固态硬盘支持的业务的规律人为确定。假设逻辑地址对应的更新后的更新周期为16ms,那么该更新周期与第二分组的预设周期的差异度最小,因此将该逻辑地址对应的I/O数据存储至第二分组对应的物理块。
在一种优选地具体实施方式中,将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:将I/O数据写入目标分组对应的目标数据页,目标数据页为目标物理块中的物理数据页。其中,I/O数据可以是主机写操作对应的数据,也可以是垃圾回收操作对应的数据(即需要迁移的有效数据页中的数据)。
具体的,将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:确定最小差异度对应的目标分组;对当前逻辑地址进行标记,以便当前逻辑地址与目标分组相对应,进而将I/O数据写入目标分组对应的目标数据页。其中,逻辑地址与分组的对应关系随更新周期和预设周期的变化而变化,因此逻辑地址与分组的对应关系是实时变化的。
需要说明的是,分组对应的预设周期根据其对应的逻辑地址的更新周期的更新而更新。例如:某一分组的当前预设周期为8,且I/O数据对应的逻辑地址的更新周期与预设周期8的差异度最小,则当前I/O数据写入该分组对应的物理块后,可根据当前逻辑地址的更新周期更新当前分组的预设周期。在一种优选地具体实施方式中,可以将预设周期更新为当前分组对应的所有逻辑地址的更新周期的平均值。
在本实施例中,可以将目标分组的预设周期更新为目标分组对应的所有逻辑地址的更新周期的平均值。
在一种优选地具体实施方式中,将I/O数据存储至最小预设周期对应的目标分组所对应的目标物理块之后,还包括分组拆分步骤。分组拆分步骤具体包括:判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;若是,则关闭所有分组中的数据页个数最少的分组,将目标分组拆分为两个分组,并建立两个分组与目标物理块的对应关系。
在一种优选地具体实施方式中,将I/O数据存储至最小预设周期对应的目标分组所对应的目标物理块之前,还包括分组拆分步骤。分组拆分步骤具体包括:判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;若是,则关闭所有分组中的数据页个数最少的分组,将目标分组拆分为两个分组,并建立两个分组与目标物理块的对应关系。
也就是说,当目标分组对应的数据页个数较多时,将其拆分为2个分 组。若当前分组的数量等于固态硬盘的并行度,为避免分组的数量大于固态硬盘的并行度,因此将所有分组中的数据页个数最少的分组关闭。由上述可知:当满足分组拆分条件时,分组的拆分步骤可在I/O数据存储至物理块之前执行,也可在I/O数据存储至物理块之后执行。
按照上述拆分步骤的核心思想,分组拆分步骤可以包括:
判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的N倍;N为实数且不小于2;若是,则将所有分组按照其对应的数据页个数从小到大排序,获得分组序列,删除分组序列中的前N-1个分组;将目标分组拆分为N-1个子分组,并建立N-1个子分组和目标物理块的对应关系。
S107、判断更新周期是否为初始周期;若是,则执行S108;若否,则保留更新周期,并执行S104。
S108、将记录I/O时间戳更新为操作I/O时间戳,并将更新周期更新为最小预设周期。
S109、将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。
需要说明的是,若当前逻辑地址的更新周期和记录I/O时间戳均为初始值,表示该逻辑地址从未被写过数据,此种情况下,无法准确确定当前更新周期与哪个预设周期差异度最小,因此直接将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。最小预设周期的更新周期最短,短时间内发生垃圾回收的可能性最大,可通过提前让这些I/O数据发生垃圾回收,以尽早暴露出分组是否准确,如果不准确,及时做分组调整(即更新逻辑地址的更新周期,以使下次该逻辑地址上有数据写入时,将数据存储至与其热度更接近的物理块)。其中,最小预设周期为当前所有预设周期中的最小值。由于各个分组的预设周期会实时变化,所以最小预设周期也是实时变化的。
其中,对象分组和目标分组可能是同一个分组,也可能是两个不同的分组。因此对象物理块和目标物理块可能是同一个物理块,也可能是两个不同的物理块。
在一种优选地具体实施方式中,将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块,包括:将I/O数据写入对象分组对应的对象数据页,对象数据页为对象物理块中的物理数据页。
在本实施例中,可以将对象分组的预设周期更新为对象分组对应的所有逻辑地址的更新周期的平均值。
在一种优选地具体实施方式中,将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块之后,还包括分组拆分步骤。分组拆分步骤具体包括:判断对象分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;若是,则关闭所有分组中的数据页个数最少的分组,将对象分组拆分为两个分组,并建立两个分组与对象物理块的对应关系。
在一种优选地具体实施方式中,将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块之前,还包括分组拆分步骤。分组拆分步骤具体包括:判断对象分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;若是,则关闭所有分组中的数据页个数最少的分组,将对象分组拆分为两个分组,并建立两个分组与对象物理块的对应关系。
也就是说,当对象分组对应的数据页个数较多时,将其拆分为2个分组。若当前分组的数量等于固态硬盘的并行度,为避免分组的数量大于固态硬盘的并行度,因此将所有分组中的数据页个数最少的分组关闭。由上述可知:当满足分组拆分条件时,分组的拆分步骤可在I/O数据存储至物理块之前执行,也可在I/O数据存储至物理块之后执行。
按照上述拆分步骤的核心思想,分组拆分步骤可以包括:
判断对象分组对应的数据页个数是否为其他分组对应的数据页个数的N倍;N为实数且不小于2;若是,则将所有分组按照其对应的数据页个数从小到大排序,获得分组序列,删除分组序列中的前N-1个分组;将对象分组拆分为N-1个子分组,并建立N-1个子分组和对象物理块的对应关系。
在一种优选地具体实施方式中,判断逻辑地址的记录I/O时间戳是否为初始时间戳之前,还包括:确定逻辑地址所属的地址范围,将地址范围的记录I/O时间戳和更新周期确定为逻辑地址的记录I/O时间戳和更新周期。
需要说明的是,逻辑地址的数量较多,若每个逻辑地址都对应一个记录I/O时间戳和一个更新周期,那么需要维护的记录I/O时间戳和更新周期将非常多,如此不利于方案实施,会增加计算开销。为此,可以将逻辑地址进行分段,分段后,属于同一地址段(即地址范围)的多个逻辑地址将对应同一个记录I/O时间戳和同一个更新周期,从而降低计算开销。
可见,在本申请实施例中,逻辑地址对应有记录I/O时间戳和更新周期。记录I/O时间戳可以用于确定更新周期。若该逻辑地址上有I/O数据需要写入,那么判断逻辑地址的记录I/O时间戳是否为初始时间戳;若否,则更新该逻辑地址的记录I/O时间戳和更新周期,进而确定更新周期与各 个分组的预设周期的差异度,并将当前I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,从而使具有相近活跃度的数据存储在同一物理块中,也就实现了冷热数据的分开存储。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数据写入量和存储介质的磨损,提高存储介质的寿命和性能。
基于图1所示的数据存储方法,若接收到垃圾回收指令,可实现如图2所示的数据处理方法,包括:
S201、接收垃圾回收指令。
S202、确定垃圾回收指令对应的物理数据页。
S203、查询物理数据页对应的逻辑地址。
具体的,垃圾回收指令会携带有物理数据页的物理地址,因此可从垃圾回收指令中获取物理地址,进而依据物理地址与逻辑地址的映射表,确定逻辑地址。
S204、增大逻辑地址的更新周期,获得目标更新周期。
其中,更新周期表示物理数据页中的数据的活跃度。更新周期越短,表示数据越活跃;更新周期越长,表示数据越不活跃。活跃数据可看作热数据,不活跃的数据可看作冷数据。
S205、计算目标更新周期与每个分组的预设周期的差异度。
S206、将物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块。
在一种优选地具体实施方式中,增大逻辑地址的更新周期,获得目标更新周期,包括:将更新周期加倍,获得目标更新周期。例如:原更新周期为3,将更新周期加倍后,获得的目标更新周期为3+3=6。在获得目标更新周期后,可计算目标更新周期与每个分组的预设周期的差异度,并将物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块,如此可以实现冷热数据的分开存储。
需要说明的是,若某个物理块中存在有效物理数据页,则做垃圾回收时需要迁移出有效物理数据页;如果一个物理块做垃圾回收时需要迁移的有效物理数据页多,表明分组不准确。因此,一旦垃圾回收时需要搬移有效物理数据页,表明该有效物理数据页的分组是不准确的,需要对其进行惩罚重新调整分组。因此,本实施例中,通过垃圾回收指令确定需要迁移的有效物理数据页,再通过该有效物理数据页的物理地址查询该有效物理数据页对应的逻辑地址,最后通过增大该逻辑地址的更新周期进行惩罚调整分组。
在本实施例中,逻辑地址不仅对应有更新周期,还对应有记录I/O时间戳。记录I/O时间戳可以用于确定更新周期。
需要说明的是,实现冷热数据的分开存储后,若再次执行垃圾回收操作,则需要迁移的数据量会大大减少,因此本申请还可以提高垃圾回收操作的执行效率。
基于本实施例,需要说明的是,若执行完垃圾回收操作后,获取到垃圾回收操作所对应的逻辑地址的I/O数据,则可按照图1存储该I/O数据。
可见,在本申请实施例中,逻辑地址对应有更新周期。若对逻辑地址执行垃圾回收操作(即擦除该逻辑地址对应的物理数据页中的数据),那么增大逻辑地址的更新周期,从而降低当前迁移的数据的活跃度,使其与其他数据(与当前迁移的数据具有相近活跃度的数据)存储在同一物理块中,实现冷热数据的分开存储。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数据写入量和存储介质的磨损,提高存储介质的寿命和性能。
基于图1所示的数据存储方法,若接收到Trim操作指令,可实现如图3所示的数据处理方法(具体为数据存储方法),包括:
S301、若接收到Trim操作指令,则根据Trim操作指令确定逻辑地址。
具体的,Trim操作指令中会携带逻辑地址,因此可从Trim操作指令中获取逻辑地址,以便确定逻辑地址。
S302、将逻辑地址的更新周期更新为Trim操作指令的指令时间戳与逻辑地址的记录I/O时间戳的差值。
其中,更新周期表示通过逻辑地址存储的数据的活跃度。更新周期越短,表示数据越活跃;更新周期越长,表示数据越不活跃。
S303、将逻辑地址的记录I/O时间戳更新为初始时间戳。
S304、若获取到逻辑地址对应的I/O数据,则根据更新周期和记录I/O时间戳存储I/O数据。
在本实施例中,逻辑地址对应有记录I/O时间戳和更新周期。记录I/O时间戳可以用于确定更新周期。
在更新Trim操作对应的逻辑地址的记录I/O时间戳和更新周期后,可根据更新周期和记录I/O时间戳存储该逻辑地址上的I/O数据。更新周期越短,表示数据越活跃;更新周期越长,表示数据越不活跃。活跃数据可看作热数据,不活跃的数据可看作冷数据。因此根据更新周期和记录I/O时间戳存储数据,可以实现冷热数据的分开存储。
需要说明的是,实现冷热数据的分开存储后,若需要执行Trim操作, 则需要处理的无效数据也会减少,因此本申请还可以提高Trim操作的执行效率。
在一种具体实施方式中,S304的具体实现可参照图1。
可见,在本申请实施例中,逻辑地址对应有记录I/O时间戳和更新周期。若接收到Trim操作指令后,根据Trim操作指令确定逻辑地址;将逻辑地址的更新周期更新为Trim操作指令的指令时间戳与逻辑地址的记录I/O时间戳的差值;将逻辑地址的记录I/O时间戳更新为初始时间戳;后续若获取到逻辑地址对应的I/O数据,则根据更新周期和记录I/O时间戳存储I/O数据。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数据写入量和存储介质的磨损,提高存储介质的寿命和性能。
参照图1、图2和图3所示的方法流程,可实现如下方案,具体实现过程包括:初始化部分以及更新部分。
一、初始化部分包括:初始化LBA(Logical Block Address,逻辑地址)生命周期表和初始化分组。
(1)初始化LBA生命周期表包括:在固态硬盘内部建立LBA生命周期表,LBA生命周期表包括的字段如表1所示。
表1
行号(r) 记录I/O时间戳 更新周期
1 1.244542359 2.35969464
在表1中,行号表示某一地址范围,包括多个逻辑地址;记录I/O时间戳和更新周期即当前地址范围对应的记录I/O时间戳和更新周期。在本实施例中,将距离当前时间最近的任意一个逻辑地址的操作I/O时间戳记录为记录I/O时间戳。当然,还可以将当前行号包括的所有逻辑地址的操作I/O时间戳的平均值记录为记录I/O时间戳。
各个行号对应的初始时间戳为-1,初始周期为0。由于多个逻辑地址对应一行,因此任何一个逻辑地址上有写操作发生,该行的记录I/O时间戳和更新周期就可能发生改变。
其中,同一个逻辑地址上有两次写操作的时间间隔,称为当前逻辑地址的更新周期,用两次操作I/O时间戳的差来表示,单位一般为微妙。当然,同一行号的不同逻辑地址的最近一次写操作的时间间隔,也成为当前逻辑地址的更新周期,用两个不同逻辑地址的两次操作,I/O时间戳的差来表示,单位一般为微妙。更新周期越短,表示被操作数据越活跃(即数据越热);更新周期越长,表示被操作数据越不活跃(即数据越冷)。
其中,记录I/O时间戳可以采用浮点数微妙为单位进行计算,也可以通过自定义定时器(比如若干时钟周期为一个定时周期)利用整数进行计算。如果利用浮点数,则需要64位来记录I/O时间戳,如果利用整数,则需要32位来记录I/O时间戳。
(2)初始化分组具体包括:在固态硬盘内部建立8个分组,从0到7编号,并设置每个分组对应的预设周期,每个分组对应的物理块。其中,不同分组对应不同物理块。8为当前固态硬盘的并行度。各个分组与预设周期请参见表2。
表2
分组编号 0 1 2 3 4 5 6 7
预设周期/ms 8 6 2 4 28 56 12 1024
二、更新部分包括:更新LBA生命周期表和更新预设周期。
(1)更新LBA生命周期表具体包括:若任一个逻辑地址上发生写操作(此写操作可以是主机写操作,也可以是垃圾回收操作时对有效数据页的迁移写操作),则确定当前写操作的操作I/O时间戳;同时判断逻辑地址的记录I/O时间戳是否为初始时间戳;若否,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值;将记录I/O时间戳更新为操作I/O时间戳;若记录I/O时间戳为初始时间戳,则判断更新周期是否为初始周期;若是,则将记录I/O时间戳更新为操作I/O时间戳,并将更新周期更新为最小预设周期。若更新周期不是初始周期,则保留更新周期,并将记录I/O时间戳更新为操作I/O时间戳。记录I/O时间戳和更新周期完成更新后,可按照相应流程写入当前写操作对应的数据,以实现冷热数据的分开存储。具体过程可参见图2,本实施例不再赘述。
若接收到Trim操作指令,则根据Trim操作指令确定逻辑地址;将逻辑地址的更新周期更新为Trim操作指令的指令时间戳与逻辑地址的记录I/O时间戳的差值;将逻辑地址的记录I/O时间戳更新为初始时间戳;后续若获取到逻辑地址对应的I/O数据,则根据更新周期和记录I/O时间戳存储I/O数据,从而实现冷热数据的分开存储。
若对逻辑地址执行垃圾回收操作(即擦除该逻辑地址对应的物理数据页中的数据),那么增大逻辑地址的更新周期,获得目标更新周期;计算目标更新周期与每个分组的预设周期的差异度;将物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块,从而使具有相近活跃度的数据存储在同一物理块中,实现冷热数据的分开存储。
(2)更新预设周期具体包括:根据当前逻辑地址对应的当前更新周期 更新当前逻辑地址对应的分组的预设周期。即:将当前分组的预设周期更新为当前分组对应的所有逻辑地址的更新周期的平均值。
可见,本实施提供的方案以分组的思想来存储冷热数据,从而可降低写放大,从而延长固态硬盘的寿命,降低成本,同时提高固态硬盘的性能。
下面对本申请实施例提供的一种数据存储装置进行介绍,下文描述的一种数据存储装置与上文描述的一种数据存储方法可以相互参照。
参见图4所示,本申请实施例公开了一种数据存储装置,包括:
获取模块401,用于获取I/O数据对应的逻辑地址和操作I/O时间戳;
判断模块402,用于判断逻辑地址的记录I/O时间戳是否为初始时间戳;
第一更新模块403,用于若记录I/O时间戳不是初始时间戳,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值;
第二更新模块404,用于将记录I/O时间戳更新为操作I/O时间戳;
计算模块405,用于分别计算更新周期与每个分组的预设周期的差异度;
存储模块406,用于将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
在一种优选地具体实施方式中,还包括:更新周期判断模块,用于若记录I/O时间戳为初始时间戳,则判断更新周期是否为初始周期;第三更新模块,用于若更新周期为初始周期,将记录I/O时间戳更新为操作I/O时间戳,并将更新周期更新为最小预设周期;将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。
在一种优选地具体实施方式中,还包括:执行模块,用于若更新周期不是初始周期,则保留更新周期,并执行第二更新模块、计算模块以及存储模块中的步骤。
在一种优选地具体实施方式中,存储模块具体用于:将I/O数据写入目标分组对应的目标数据页,目标数据页为目标物理块中的物理数据页。
在一种优选地具体实施方式中,还包括:第四更新模块,用于将目标分组的预设周期更新为目标分组对应的所有逻辑地址的更新周期的平均值。
在一种优选地具体实施方式中,还包括:分组拆分判断模块,用于判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;
拆分模块,用于若目标分组对应的数据页个数为其他分组对应的数据页个数的两倍,则关闭所有分组中的数据页个数最少的分组,将目标分组 拆分为两个分组,并建立两个分组与目标物理块的对应关系。
在一种优选地具体实施方式中,还包括:确定模块,用于确定逻辑地址所属的地址范围,将地址范围的记录I/O时间戳和更新周期确定为逻辑地址的记录I/O时间戳和更新周期。
其中,关于本实施例中各个模块、单元更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。
可见,本实施例提供了一种数据存储装置,该装置可使具有相近活跃度的数据存储在同一物理块中,也就实现了冷热数据的分开存储。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数据写入量和存储介质的磨损,提高存储介质的寿命和性能。
下面对本申请实施例提供的一种数据存储装置进行介绍,下文描述的一种数据存储装置与上文描述的一种数据存储方法可以相互参照。
参见图5所示,本申请实施例公开了一种数据存储装置,包括:
确定模块501,用于若接收到Trim操作指令,则根据Trim操作指令确定逻辑地址;
第一更新模块502,用于将逻辑地址的更新周期更新为Trim操作指令的指令时间戳与逻辑地址的记录I/O时间戳的差值;更新周期表示通过逻辑地址存储的数据的活跃度;
第二更新模块503,用于将逻辑地址的记录I/O时间戳更新为初始时间戳;
存储模块504,用于若获取到逻辑地址对应的I/O数据,则根据更新周期和记录I/O时间戳存储I/O数据。
在一种优选地具体实施方式中,存储模块包括:获取单元,用于获取逻辑地址对应的I/O数据;确定单元,用于确定I/O数据对应的操作I/O时间戳;第一判断单元,用于判断记录I/O时间戳是否为初始时间戳;第一更新单元,用于若记录I/O时间戳不是初始时间戳,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差值;第二更新单元,用于将记录I/O时间戳更新为操作I/O时间戳;计算单元,用于分别计算更新周期与每个分组的预设周期的差异度;第一存储单元,用于将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
在一种优选地具体实施方式中,存储模块还包括:第二判断单元,用于若记录I/O时间戳为初始时间戳,则判断更新周期是否为初始周期;第三更新单元,用于若更新周期是初始周期,则将记录I/O时间戳更新为操 作I/O时间戳,并将更新周期更新为最小预设周期;第二存储单元,用于将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。
在一种优选地具体实施方式中,存储模块还包括:执行单元,用于若更新周期不是初始周期,则保留更新周期,并执行第二更新单元、计算单元和第一存储单元中的步骤。
在一种优选地具体实施方式中,第一存储单元具体用于:将I/O数据写入目标分组对应的目标数据页,目标数据页为目标物理块中的物理数据页。
在一种优选地具体实施方式中,存储模块还包括:第四更新单元,用于将目标分组的预设周期更新为目标分组对应的所有逻辑地址的更新周期的平均值。
在一种优选地具体实施方式中,存储模块还包括:第三判断单元,用于判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;拆分单元,用于若目标分组对应的数据页个数是其他分组对应的数据页个数的两倍,则关闭所有分组中的数据页个数最少的分组,将目标分组拆分为两个分组,并建立两个分组与目标物理块的对应关系。
其中,关于本实施例中各个模块、单元更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。
可见,本实施例提供了一种数据存储装置,该装置可使具有相近活跃度的数据存储在同一物理块中,也就实现了冷热数据的分开存储。如此一来,若通过擦除块来释放存储空间,那么物理块中存留的有效数据页将大大减少,因此可以降低数据写入量和存储介质的磨损,提高存储介质的寿命和性能。
下面对本申请实施例提供的一种数据处理装置进行介绍,下文描述的一种数据处理装置与上文描述的一种数据处理方法可以相互参照。
参见图6所示,本申请实施例公开了一种数据处理装置,包括:
获取模块601,用于获取垃圾回收指令;
确定模块602,用于确定垃圾回收指令对应的物理数据页;
查询模块603,用于查询物理数据页对应的逻辑地址;
增大模块604,用于增大逻辑地址的更新周期,获得目标更新周期;更新周期表示物理数据页中的数据的活跃度;
计算模块605,用于计算目标更新周期与每个分组的预设周期的差异度;
迁移模块606,用于将物理数据页中的数据迁移至最小差异度对应的 分组所对应的物理块。
优选地,增大模块具体用于:将更新周期加倍,获得目标更新周期。
优选地,将物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块之后,还包括:I/O数据获取模块,用于获取逻辑地址对应的I/O数据;操作I/O时间戳确定模块,用于确定I/O数据对应的操作I/O时间戳;判断模块,用于判断逻辑地址的记录I/O时间戳是否为初始时间戳;第一更新模块,用于若记录I/O时间戳不是初始时间戳,则将逻辑地址的更新周期更新为操作I/O时间戳与记录I/O时间戳的差;第二更新模块,用于将记录I/O时间戳更新为操作I/O时间戳;差异度计算模块,用于分别计算更新周期与每个分组的预设周期的差异度;存储模块,用于将I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
在一种优选地具体实施方式中,还包括:更新周期判断模块,用于若记录I/O时间戳为初始时间戳,则判断更新周期是否为初始周期;第三更新模块,用于若更新周期为初始周期,将记录I/O时间戳更新为操作I/O时间戳,并将更新周期更新为最小预设周期;将I/O数据存储至最小预设周期对应的对象分组所对应的对象物理块。
在一种优选地具体实施方式中,还包括:执行模块,用于若更新周期不是初始周期,则保留更新周期,并执行第二更新模块、差异度计算模块以及存储模块中的步骤。
在一种优选地具体实施方式中,存储模块具体用于:将I/O数据写入目标分组对应的目标数据页,目标数据页为目标物理块中的物理数据页。
在一种优选地具体实施方式中,还包括:第四更新模块,用于将目标分组的预设周期更新为目标分组对应的所有逻辑地址的更新周期的平均值。
在一种优选地具体实施方式中,还包括:分组拆分判断模块,用于判断目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;拆分模块,用于若目标分组对应的数据页个数为其他分组对应的数据页个数的两倍,则关闭所有分组中的数据页个数最少的分组,将目标分组拆分为两个分组,并建立两个分组与目标物理块的对应关系。
在一种优选地具体实施方式中,还包括:地址范围确定模块,用于确定逻辑地址所属的地址范围,将地址范围的记录I/O时间戳和更新周期确定为逻辑地址的记录I/O时间戳和更新周期。
其中,关于本实施例中各个模块、单元更加具体的工作过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。
可见,本实施例提供了一种数据处理装置,该装置可降低写放大,从而延长固态硬盘的寿命,降低成本,同时提高固态硬盘的性能。
下面对本申请实施例提供的一种设备进行介绍,下文描述的一种设备与上文描述的任意方法及装置可以相互参照。
参见图7所示,本申请实施例公开了一种设备,包括:存储单元701和主控制器702,其中:存储单元包括物理块,物理块中的物理数据页用于存储I/O数据;主控制器用于执行前述任意实施例公开的方法。
下面对本申请实施例提供的一种可读存储介质进行介绍,下文描述的一种可读存储介质与上文描述的任意方法、装置及设备可以相互参照。
一种可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现前述实施例公开的方法。关于该方法的具体步骤可以参考前述实施例中公开的相应内容,在此不再进行赘述。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的可读存储介质中。
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (26)

  1. 一种数据存储方法,其特征在于,包括:
    获取I/O数据对应的逻辑地址和操作I/O时间戳;
    判断所述逻辑地址的记录I/O时间戳是否为初始时间戳;
    若否,则将所述逻辑地址的更新周期更新为所述操作I/O时间戳与所述记录I/O时间戳的差值;
    将所述记录I/O时间戳更新为所述操作I/O时间戳;
    分别计算所述更新周期与每个分组的预设周期的差异度;
    将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
  2. 根据权利要求1所述的数据存储方法,其特征在于,还包括:
    若所述记录I/O时间戳为所述初始时间戳,则判断所述更新周期是否为初始周期;
    若是,则将所述记录I/O时间戳更新为所述操作I/O时间戳,并将所述更新周期更新为最小预设周期;
    将所述I/O数据存储至所述最小预设周期对应的对象分组所对应的对象物理块。
  3. 根据权利要求2所述的数据存储方法,其特征在于,还包括:
    若所述更新周期不是所述初始周期,则保留所述更新周期,并执行所述将所述记录I/O时间戳更新为所述操作I/O时间戳;分别计算所述更新周期与每个分组的预设周期的差异度;将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块的步骤。
  4. 根据权利要求1所述的数据存储方法,其特征在于,所述将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:
    将所述I/O数据写入所述目标分组对应的目标数据页,所述目标数据页为所述目标物理块中的物理数据页。
  5. 根据权利要求4所述的数据存储方法,其特征在于,还包括:
    将所述目标分组的预设周期更新为所述目标分组对应的所有逻辑地址的更新周期的平均值。
  6. 根据权利要求4所述的数据存储方法,其特征在于,还包括:
    判断所述目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;
    若是,则关闭所有分组中的数据页个数最少的分组,将所述目标分组拆分为两个分组,并建立所述两个分组与所述目标物理块的对应关系。
  7. 根据权利要求1至6任一项所述的数据存储方法,其特征在于,所述判断所述逻辑地址的记录I/O时间戳是否为初始时间戳之前,还包括:
    确定所述逻辑地址所属的地址范围,将所述地址范围的记录I/O时间戳和更新周期确定为所述逻辑地址的记录I/O时间戳和更新周期。
  8. 一种数据存储装置,其特征在于,包括:
    获取模块,用于获取I/O数据对应的逻辑地址和操作I/O时间戳;
    判断模块,用于判断所述逻辑地址的记录I/O时间戳是否为初始时间戳;
    第一更新模块,用于若所述记录I/O时间戳不是初始时间戳,则将所述逻辑地址的更新周期更新为所述操作I/O时间戳与所述记录I/O时间戳的差值;
    第二更新模块,用于将所述记录I/O时间戳更新为所述操作I/O时间戳;
    计算模块,用于分别计算所述更新周期与每个分组的预设周期的差异度;
    存储模块,用于将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
  9. 一种数据存储方法,其特征在于,包括:
    若接收到Trim操作指令,则根据所述Trim操作指令确定逻辑地址;
    将所述逻辑地址的更新周期更新为所述Trim操作指令的指令时间戳与所述逻辑地址的记录I/O时间戳的差值;所述更新周期表示通过所述逻辑地址存储的数据的活跃度;
    将所述逻辑地址的记录I/O时间戳更新为初始时间戳;
    若获取到所述逻辑地址对应的I/O数据,则根据所述更新周期和所述记录I/O时间戳存储所述I/O数据。
  10. 根据权利要求9所述的数据存储方法,其特征在于,所述若获取到所述逻辑地址对应的I/O数据,则根据所述更新周期和所述记录I/O时间戳存储所述I/O数据,包括:
    获取所述逻辑地址对应的I/O数据;
    确定所述I/O数据对应的操作I/O时间戳;
    判断所述记录I/O时间戳是否为初始时间戳;
    若否,则将所述逻辑地址的更新周期更新为所述操作I/O时间戳与所述记录I/O时间戳的差值;
    将所述记录I/O时间戳更新为所述操作I/O时间戳;
    分别计算所述更新周期与每个分组的预设周期的差异度;
    将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
  11. 根据权利要求10所述的数据存储方法,其特征在于,还包括:
    若所述记录I/O时间戳为所述初始时间戳,则判断所述更新周期是否为初始周期;
    若是,则将所述记录I/O时间戳更新为所述操作I/O时间戳,并将所述更新周期更新为最小预设周期;
    将所述I/O数据存储至所述最小预设周期对应的对象分组所对应的对象物理块。
  12. 根据权利要求10所述的数据存储方法,其特征在于,还包括:
    若所述更新周期不是所述初始周期,则保留所述更新周期,并执行所述将所述记录I/O时间戳更新为所述操作I/O时间戳;分别计算所述更新周期与每个分组的预设周期的差异度;将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块的步骤。
  13. 根据权利要求10所述的数据存储方法,其特征在于,所述将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:
    将所述I/O数据写入所述目标分组对应的目标数据页,所述目标数据页为所述目标物理块中的物理数据页。
  14. 根据权利要求13所述的数据存储方法,其特征在于,还包括:
    将所述目标分组的预设周期更新为所述目标分组对应的所有逻辑地址的更新周期的平均值。
  15. 根据权利要求13所述的数据存储方法,其特征在于,还包括:
    判断所述目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;
    若是,则关闭所有分组中的数据页个数最少的分组,将所述目标分组拆分为两个分组,并建立所述两个分组与所述目标物理块的对应关系。
  16. 一种数据存储装置,其特征在于,包括:
    确定模块,用于若接收到Trim操作指令,则根据所述Trim操作指令确定逻辑地址;
    第一更新模块,用于将所述逻辑地址的更新周期更新为所述Trim操作指令的指令时间戳与所述逻辑地址的记录I/O时间戳的差值;所述更新周期表示通过所述逻辑地址存储的数据的活跃度;
    第二更新模块,用于将所述逻辑地址的记录I/O时间戳更新为初始时 间戳;
    存储模块,用于若获取到所述逻辑地址对应的I/O数据,则根据所述更新周期和所述记录I/O时间戳存储所述I/O数据。
  17. 一种数据处理方法,其特征在于,包括:
    接收垃圾回收指令;
    确定所述垃圾回收指令对应的物理数据页;
    查询所述物理数据页对应的逻辑地址;
    增大所述逻辑地址的更新周期,获得目标更新周期;所述更新周期表示所述物理数据页中的数据的活跃度;
    计算所述目标更新周期与每个分组的预设周期的差异度;
    将所述物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块。
  18. 根据权利要求17所述的数据处理方法,其特征在于,所述增大所述逻辑地址的更新周期,获得目标更新周期,包括:
    将所述更新周期加倍,获得所述目标更新周期。
  19. 根据权利要求17或18所述的数据处理方法,其特征在于,所述将所述物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块之后,还包括:
    获取所述逻辑地址对应的I/O数据;
    确定所述I/O数据对应的操作I/O时间戳;
    判断所述记录I/O时间戳是否为初始时间戳;
    若否,则将所述逻辑地址的更新周期更新为所述操作I/O时间戳与所述记录I/O时间戳的差值;
    将所述记录I/O时间戳更新为所述操作I/O时间戳;
    分别计算所述更新周期与每个分组的预设周期的差异度;
    将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块。
  20. 根据权利要求19所述的数据处理方法,其特征在于,还包括:
    若所述记录I/O时间戳为所述初始时间戳,则判断所述更新周期是否为初始周期;
    若是,则将所述记录I/O时间戳更新为所述操作I/O时间戳,并将所述更新周期更新为最小预设周期;
    将所述I/O数据存储至所述最小预设周期对应的对象分组所对应的对象物理块。
  21. 根据权利要求19所述的数据处理方法,其特征在于,所述将所述I/O数据存储至最小差异度对应的目标分组所对应的目标物理块,包括:
    将所述I/O数据写入所述目标分组对应的目标数据页,所述目标数据页为所述目标物理块中的物理数据页。
  22. 根据权利要求21所述的数据处理方法,其特征在于,还包括:
    将所述目标分组的预设周期更新为所述目标分组对应的所有逻辑地址的更新周期的平均值。
  23. 根据权利要求21所述的数据处理方法,其特征在于,还包括:
    判断所述目标分组对应的数据页个数是否为其他分组对应的数据页个数的两倍;
    若是,则关闭所有分组中的数据页个数最少的分组,将所述目标分组拆分为两个分组,并建立所述两个分组与所述目标物理块的对应关系。
  24. 一种数据处理装置,其特征在于,包括:
    获取模块,用于获取垃圾回收指令;
    确定模块,用于确定所述垃圾回收指令对应的物理数据页;
    查询模块,用于查询所述物理数据页对应的逻辑地址;
    增大模块,用于增大所述逻辑地址的更新周期,获得目标更新周期;所述更新周期表示所述物理数据页中的数据的活跃度;
    计算模块,用于计算所述目标更新周期与每个分组的预设周期的差异度;
    迁移模块,用于将所述物理数据页中的数据迁移至最小差异度对应的分组所对应的物理块。
  25. 一种设备,其特征在于,包括:存储单元和主控制器,其中:
    所述存储单元包括物理块,所述物理块中的物理数据页用于存储I/O数据;
    所述主控制器用于执行如权利要求1至7任一项,和/或9至15任一项,和/或17至23任一项所述的方法。
  26. 一种可读存储介质,其特征在于,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至7任一项,和/或9至15任一项,和/或17至23任一项所述的方法。
PCT/CN2020/115543 2019-12-18 2020-09-16 数据存储方法及组件,数据处理方法及组件 WO2021120731A1 (zh)

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN201911310534.3A CN112988612B (zh) 2019-12-18 2019-12-18 一种数据处理方法、装置、设备及可读存储介质
CN201911312256.5 2019-12-18
CN201911310534.3 2019-12-18
CN201911310513.1 2019-12-18
CN201911312256.5A CN112988042B (zh) 2019-12-18 2019-12-18 一种数据存储方法、装置、设备及可读存储介质
CN201911310513.1A CN112988040B (zh) 2019-12-18 2019-12-18 一种数据存储方法、装置、设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2021120731A1 true WO2021120731A1 (zh) 2021-06-24

Family

ID=76477073

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/115543 WO2021120731A1 (zh) 2019-12-18 2020-09-16 数据存储方法及组件,数据处理方法及组件

Country Status (1)

Country Link
WO (1) WO2021120731A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080059718A1 (en) * 2006-09-01 2008-03-06 Sachie Tajima Storage system, data relocation method thereof, and recording medium that records data relocation program
CN106227471A (zh) * 2016-08-19 2016-12-14 深圳大普微电子科技有限公司 固态硬盘和应用于固态硬盘的数据存取方法
CN106354667A (zh) * 2016-08-30 2017-01-25 浪潮(北京)电子信息产业有限公司 一种固态硬盘的缓存控制方法及装置
CN107102819A (zh) * 2014-12-12 2017-08-29 西安三星电子研究有限公司 向固态硬盘写入数据的方法及设备
CN109471875A (zh) * 2018-09-25 2019-03-15 网宿科技股份有限公司 基于缓存数据的热度管理方法、服务器及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080059718A1 (en) * 2006-09-01 2008-03-06 Sachie Tajima Storage system, data relocation method thereof, and recording medium that records data relocation program
CN107102819A (zh) * 2014-12-12 2017-08-29 西安三星电子研究有限公司 向固态硬盘写入数据的方法及设备
CN106227471A (zh) * 2016-08-19 2016-12-14 深圳大普微电子科技有限公司 固态硬盘和应用于固态硬盘的数据存取方法
CN106354667A (zh) * 2016-08-30 2017-01-25 浪潮(北京)电子信息产业有限公司 一种固态硬盘的缓存控制方法及装置
CN109471875A (zh) * 2018-09-25 2019-03-15 网宿科技股份有限公司 基于缓存数据的热度管理方法、服务器及存储介质

Similar Documents

Publication Publication Date Title
WO2015185002A1 (zh) 一种数据写入方法及装置
WO2018033036A1 (zh) 固态硬盘和应用于固态硬盘的数据存取方法
WO2021218038A1 (zh) 一种存储系统、内存管理方法和管理节点
US8572321B2 (en) Apparatus and method for segmented cache utilization
CN105095116A (zh) 缓存替换的方法、缓存控制器和处理器
CN109542354B (zh) 一种基于擦除上限的磨损均衡方法、装置及设备
WO2017041570A1 (zh) 向缓存写入数据的方法及装置
WO2011072538A1 (zh) Nandflash擦除均衡的方法及装置
CN110377233B (zh) Ssd读性能优化方法、装置、计算机设备及存储介质
WO2021027340A1 (zh) 一种键值kv的存储方法、装置及存储设备
TW202042068A (zh) 資料儲存裝置與資料處理方法
CN102981971A (zh) 一种快速响应的相变存储器损耗均衡方法
TW201915743A (zh) 快閃記憶體的資料內部搬移方法以及使用該方法的裝置
WO2023241160A1 (zh) 基于模拟eeprom的数据写入及管理方法
TW202101230A (zh) 資料儲存裝置與資料處理方法
CN104298615B (zh) 一种存储器交换分区损耗的均衡方法
CN108563586B (zh) 一种分离固态盘中垃圾回收数据与用户数据的方法
CN104714898B (zh) 一种Cache的分配方法和装置
WO2020237637A1 (zh) 一种数据读取方法、存储控制器及电子设备
WO2021120731A1 (zh) 数据存储方法及组件,数据处理方法及组件
Huang et al. A garbage collection aware stripping method for solid-state drives
CN113467713A (zh) 数据分离方法及固态硬盘
TW201435586A (zh) 快閃記憶體儲存設備及其資料管理之方法與裝置
Chen et al. Refinery swap: An efficient swap mechanism for hybrid DRAM–NVM systems
CN102779017A (zh) 一种固态盘中数据缓存区的控制方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20902978

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20902978

Country of ref document: EP

Kind code of ref document: A1