Search

CN-122018785-A - Memory management method and memory device

CN122018785ACN 122018785 ACN122018785 ACN 122018785ACN-122018785-A

Abstract

The invention provides a memory management method and a memory device. The method comprises the steps of obtaining at least one reference index, wherein the at least one reference index comprises a heat index, the heat index reflects the heat distribution state of data to be backed up, adjusting a backup rule for the data to be backed up according to the at least one reference index, and executing backup operation on the data to be backed up in a memory module according to the backup rule. Therefore, the backup and/or restore efficiency in the storage device can be effectively improved.

Inventors

  • QIN PENGPENG
  • ZHANG YU
  • WANG ZHI
  • ZHANG XIAOYANG

Assignees

  • 合肥开梦科技有限责任公司

Dates

Publication Date
20260512
Application Date
20251223

Claims (10)

  1. 1. A memory management method for a storage device, wherein the storage device comprises a memory module, and the memory management method comprises: Obtaining at least one reference index, wherein the at least one reference index comprises a heat index, and the heat index reflects the heat distribution state of data to be backed up; according to the at least one reference index, adjusting a backup rule for the data to be backed up, and And executing backup operation on the data to be backed up in the memory module according to the backup rule.
  2. 2. The memory management method of claim 1, wherein adjusting the backup rules for the data to be backed up according to the at least one reference indicator comprises: And determining the backup frequency of the first target data in the data to be backed up according to the at least one reference index.
  3. 3. The memory management method of claim 1, wherein adjusting the backup rules for the data to be backed up according to the at least one reference indicator comprises: And adjusting the proportion of the first type data and the second type data which are backed up in the target time window during the backup operation according to the at least one reference index.
  4. 4. The memory management method of claim 1, wherein adjusting the backup rules for the data to be backed up according to the at least one reference indicator comprises: and adjusting the window length of a target time window for executing the backup operation according to the at least one reference index.
  5. 5. The memory management method of claim 1, wherein the at least one reference indicator further comprises a load indicator, and the load indicator reflects a degree of load of the storage device.
  6. 6. The memory management method of claim 1, further comprising: establishing a bit mapping table which records a plurality of bits and the plurality of bits respectively correspond to a plurality of data in the data to be backed up, and And updating a first bit corresponding to the first data in the plurality of bits in response to the first data in the data to be backed up having been backed up in the backup operation.
  7. 7. The memory management method of claim 1, further comprising: obtaining at least one evaluation index reflecting the validity of the backed-up data, and And determining whether to delete the backed-up data according to the at least one evaluation index.
  8. 8. The memory management method according to claim 7, wherein the at least one evaluation index comprises at least one of an age index, a data change index, a storage cost index, and a restoration success index, The age indicator reflects a length of time the backed up data is stored, The data change indicator reflects a data change status of the backed up data, The storage cost index reflects the storage cost of the backed up data, and The restore success indicator reflects whether the backed up data was used to successfully perform a restore operation.
  9. 9. The memory management method of claim 1, further comprising: recording a trigger factor for triggering the backup operation, and Determining second target data from the plurality of candidate backed-up data according to the trigger factor, and And executing a restoring operation based on the second target data.
  10. 10. A memory device, comprising: A connection interface for connecting to a host system; Memory module, and A memory controller connected to the connection interface and the memory module, Wherein the memory controller is configured to perform the memory management method of any of claims 1-9.

Description

Memory management method and memory device Technical Field The present invention relates to the field of memory technologies, and in particular, to a memory management method and a memory device. Background In general, to improve the operation stability of a storage device, a memory controller may back up data currently stored in the storage device before the device leaves the factory, after the device leaves the factory, or before a system update is performed. Thereafter, when a system failure occurs, the memory controller may use the backup data to restore the system to an original state (i.e., a factory state). Or the user can manually trigger or set the system to periodically execute backup. However, common data backup and restore mechanisms often only support backup and restore such as full disk or partition (e.g., D-slot) backups and restore, which is not operationally flexible. In addition, taking the system to periodically perform the backup operation as an example, if the time window for performing the backup operation is too short during the period of performing the backup operation, the backup operation may be accidentally suspended, resulting in a backup failure. In addition, if the time window left for the backup operation is too long, system resources are wasted instead. Disclosure of Invention The invention provides a memory management method and a memory device, which can improve the problems, thereby effectively improving the backup and/or restore efficiency in the memory device. The embodiment of the invention provides a memory management method for a memory device, which is used for a memory device, wherein the memory device comprises a memory module, and the memory management method comprises the steps of obtaining at least one reference index, wherein the at least one reference index comprises a heat index, the heat index reflects the heat distribution state of data to be backed up, adjusting a backup rule aiming at the data to be backed up according to the at least one reference index, and executing backup operation on the data to be backed up in the memory module according to the backup rule. The embodiment of the invention further provides a storage device, which comprises a connection interface, a memory module and a memory controller. The connection interface is used for connecting to a host system. The memory controller is connected to the connection interface and the memory module. The memory controller is used for executing the memory management method. Based on the above, after obtaining at least one reference index including the heat index, the backup rule for the data to be backed up may be dynamically adjusted according to the at least one reference index. In particular, the heat index may reflect a heat distribution state of the data to be backed up. Thereafter, according to the backup rules, a backup operation may be automatically performed on the data to be backed up in the memory module. Therefore, the backup and/or restore efficiency in the storage device can be effectively improved. Drawings FIG. 1 is a schematic diagram of a data storage system shown in accordance with an embodiment of the present invention; FIG. 2 is a schematic diagram of a memory controller shown according to an embodiment of the present invention; FIG. 3 is a schematic diagram of a managed memory module shown in accordance with an embodiment of the present invention; FIG. 4 is a schematic diagram illustrating performing a backup operation according to a backup rule, according to an embodiment of the present invention; FIG. 5 is a schematic diagram illustrating performing a backup operation according to a backup rule, according to an embodiment of the present invention; FIG. 6 is a schematic diagram illustrating performing a backup operation according to a backup rule, according to an embodiment of the present invention; FIG. 7 is a schematic diagram illustrating performing a backup operation and managing a backup state of an entity unit through a bit map according to an embodiment of the present invention; FIG. 8 is a schematic diagram illustrating performing a restore operation and managing a backup state of an entity unit through a bit map according to an embodiment of the present invention; Fig. 9 is a flow chart of a memory management method according to an embodiment of the present invention. Detailed Description Reference will now be made in detail to the exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings and the description to refer to the same or like parts. FIG. 1 is a schematic diagram of a data storage system shown in accordance with an embodiment of the present invention. Referring to fig. 1, a data storage system 10 includes a host system 11 and a storage device 12. The storage device 12 may be connected to the host system 11 and may be used t