Data storage method, device and storage medium thereof

By recording the timestamps of data in static random access memory and migrating data that meets the conditions to a flash memory mapping table, the problem of high SRAM storage pressure is solved, data real-time performance and integrity are achieved, and storage costs are reduced.

CN120406862BActive Publication Date: 2025-11-18合肥康芯威存储技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510912762.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-11-18
Estimated Expiration
2045-07-03

AI Technical Summary

Technical Problem

Existing static random access memory (SRAM) suffers from increased storage pressure due to the large amount of storage space occupied by the physical-virtual mapping table.

Method used

By recording the timestamps of data in the first mapping table and storing the target data in the second mapping table of flash memory when the trigger condition is met, while deleting the corresponding target data from the first mapping table, the storage pressure on SRAM is reduced.

Benefits of technology

This ensures the real-time performance and integrity of data in SRAM, reduces the storage pressure on static random access memory, and lowers costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406862B_ABST
    Figure CN120406862B_ABST
Patent Text Reader

Abstract

The application provides a data storage method and device and a storage medium thereof. The method comprises the following steps: determining respective time stamps corresponding to data in a first mapping table in a static random memory; if it is determined that the data in the first mapping table meets a trigger condition, determining target data according to the time stamps; storing the target data in a second mapping table in a flash memory, and deleting the target data in the first mapping table. The scheme can guarantee the real-time performance of the data in the first mapping table in the static random memory, store the target data in the second mapping table in the flash memory to guarantee the integrity of the data, delete the target data in the first mapping table to save the space of the static random memory, reduce the storage pressure of the static random memory, and reduce the cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage technology, and more specifically to a data storage method, apparatus, and storage medium. Background Technology

[0002] Currently, in the field of non-volatile data storage technology, some products employ a physical address-to-virtual address mapping table to improve garbage collection efficiency. This table is used to compare with the virtual address-to-physical address mapping table to determine the effective data usage for garbage collection. However, because the physical-to-virtual mapping table consumes a significant amount of storage space in static random access memory (SRAM), it increases the storage pressure on SRAM. Therefore, reducing the storage pressure on SRAM has become an urgent problem to be solved. Summary of the Invention

[0003] The main technical problem that this invention solves is the high storage pressure of existing static random access memories.

[0004] According to a first aspect, a data storage method is provided, the method comprising: determining the timestamps corresponding to data in a first mapping table in a static random access memory; if it is determined that data in the first mapping table meets a triggering condition, determining target data based on the timestamps; storing the target data in a second mapping table in a flash memory, and deleting the target data from the first mapping table.

[0005] According to a second aspect, a data storage device is provided, the device comprising: a timestamp determination module, configured to determine the timestamps corresponding to data in a first mapping table in a static random access memory; a target data determination module, configured to determine target data based on the timestamps if data in the first mapping table satisfies a triggering condition; and a processing module, configured to store the target data in a second mapping table in a flash memory and delete the target data from the first mapping table.

[0006] According to a third aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a processor, implement the data storage method described above.

[0007] According to a fourth aspect of the present application, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, the data storage method described above is implemented.

[0008] According to the data storage method / apparatus of the above embodiments, the timestamps of the data in the first mapping table are first recorded. When it is determined that the data in the first mapping table meets the triggering conditions, the target data is determined according to the timestamps. Then, the target data is stored in the second mapping table of the flash memory. At the same time, the corresponding target data is deleted from the first mapping table. This ensures the real-time performance of the data in the first mapping table of the static random access memory. Storing the target data in the second mapping table of the flash memory ensures the integrity of the data. Meanwhile, deleting the target data from the first mapping table saves space in the static random access memory, reduces the storage pressure on the static random access memory, and lowers the cost. Attached Figure Description

[0009] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0010] Figure 1 This is a flowchart illustrating a data storage method according to an embodiment of this application.

[0011] Figure 2 This is a flowchart illustrating a data storage method according to another embodiment of this application.

[0012] Figure 3 This is a flowchart illustrating a data storage method according to another embodiment of this application.

[0013] Figure 4 This is a flowchart illustrating a data storage method according to another embodiment of this application.

[0014] Figure 5 This is a block diagram of a data storage device according to an embodiment of this application.

[0015] Figure 6 This is a hardware structure diagram of an electronic device according to an embodiment of this application.

[0016] The accompanying drawings above have illustrated specific embodiments of the present invention, which will be described in more detail below.

[0017] The accompanying drawings and text description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate the concept of the invention to those skilled in the art through specific embodiments. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of this application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to this application are not shown or described in the specification. This is to avoid obscuring the core parts of this application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0019] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.

[0020] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).

[0021] Currently, in existing technologies, when writing data sequentially to each storage block via write operations, the virtual address of the stored data is recorded using the actual location of the storage block as an index. For example, if a storage block has 8 * 1024 data storage units, generally, the virtual address of one data storage unit occupies 4 bytes. Therefore, this storage block requires 4 * 8 * 1024 bytes = 32 KB of Static Random Access Memory (SRAM) to store the actual-virtual mapping table indicating the storage location of the data. When the data write operation of this storage block is completed, the actual-virtual mapping table in SRAM is stored in NAND flash memory. However, the actual-virtual mapping table occupies a large amount of SRAM, leading to increased storage pressure on the SRAM.

[0022] In this embodiment of the invention, the timestamps of the data in the first mapping table are first recorded. When it is determined that the data in the first mapping table meets the triggering conditions, the target data is determined based on the timestamps. Then, the target data is stored in the second mapping table of the flash memory, and the corresponding target data is deleted from the first mapping table. This ensures the real-time performance of the data in the first mapping table of the static random access memory (SRAM). Storing the target data in the second mapping table of the flash memory ensures data integrity. At the same time, deleting the target data from the first mapping table saves space in the SRAM, reduces the storage pressure on the SRAM, and lowers costs.

[0023] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices. The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be decomposed, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0024] Please see Figure 1 , Figure 1 This application illustrates a data storage method according to an embodiment of the present application. In a specific embodiment, this data storage method can be applied to, for example... Figure 5 The data storage device 500 and the electronic device 600 configured with the data storage device 500 are shown. Figure 6 The specific process of this embodiment will be described below. Of course, it is understood that this method can be executed by a computer terminal with computing capabilities, or by other processors, or even a memory chip. The following will focus on... Figure 1 The process shown will be described in detail, and the data storage method may specifically include the following steps:

[0025] Step 110: Determine the timestamps corresponding to the data in the first mapping table of the static random access memory.

[0026] One approach is to include a time recording module within the internal chip of the static random access memory (SRAM) to record the timestamp of data written to the SRAM. This allows the timestamps corresponding to the data in the first mapping table of the SRAM to be determined directly within the time recording module.

[0027] Optionally, the first mapping table is used to represent the mapping relationship between the virtual address corresponding to the data written to the storage block and the physical location of the actual memory or device corresponding to the data, so as to facilitate reading operations on the data in memory.

[0028] Step 120: If it is determined that the data in the first mapping table meets the triggering condition, then the target data is determined according to the timestamp.

[0029] As one approach, since the storage space of static random access memory is limited, in order to ensure the real-time performance of the data in the first mapping table, the duration or size of the data stored in the first mapping table can be set as a trigger condition to determine whether to store some data in the first mapping table elsewhere, thereby reducing the storage pressure on the static random access memory.

[0030] Optionally, the triggering condition can be that the data size in the first mapping table is greater than a certain threshold, or that there is data in the first mapping table for a certain duration. This can be determined by detecting the data size in the first mapping table or the time interval between the timestamp of the data stored in the first mapping table and the current time. Optionally, the target data can be data in the first mapping table that meets the triggering condition, or data determined based on the triggering condition. The target data that meets the triggering condition can be determined based on the specific triggering condition.

[0031] In some embodiments, step 120 includes: if it is determined that the first actual data volume in the first mapping table is greater than the first data volume threshold, then it is determined that the data in the first mapping table meets the triggering condition.

[0032] One approach is to pre-set a storage threshold for the first mapping table to obtain a first data threshold. When the actual data volume in the first mapping table exceeds the first data volume threshold, it can be determined that continuing to store the corresponding data in the first mapping table would lead to data overflow, causing some data to be unable to be stored in the first mapping table. In this case, by storing some data from the first mapping table in a second mapping table on flash memory, the data overflow in the first mapping table can be avoided, thus confirming that the data in the first mapping table meets the triggering condition. For example, setting the first mapping table to have 8*1024 data storage units allows for the storage of data in 8*1024 data storage units. If the data in the first mapping table exceeds the data in 8*1024 data storage units, the triggering condition can be confirmed. Optionally, to avoid excessive data in the first mapping table, a value less than 8*1024 data storage units can be set as the first data volume threshold, which can be set according to actual needs.

[0033] Step 130: Store the target data in a second mapping table in the flash memory, and delete the target data from the first mapping table.

[0034] As one approach, in order to reduce the storage pressure on static random access memory (SRAM), the determined target data can be stored in a second mapping table of flash memory, thereby facilitating the lookup of target data in flash memory.

[0035] Optionally, the second mapping table is used to represent the mapping relationship between the physical address corresponding to the data written to the flash memory storage block and the virtual address of the actual memory or device corresponding to the data, so as to facilitate reading operations on the data in the flash memory.

[0036] Optionally, in order to ensure the real-time performance of the data in the first mapping table in static random access storage, the target data is stored in the second mapping table in flash memory, and the target data is deleted from the first mapping table, so that new data can be successfully stored in the first mapping table when it exists.

[0037] In some embodiments, the first mapping table is a virtual-to-real mapping table, and the second mapping table is a real-to-virtual mapping table.

[0038] In one approach, in a virtual-to-real-object mapping table or a real-to-virtual mapping table, the real-object is used to indicate the physical address corresponding to the data, that is, the actual hardware address of the data on the memory chip, while the virtual-object is used to indicate the address corresponding to the process that generates or manages the data.

[0039] Optionally, since the corresponding read operation cannot be performed using the virtual machine address of the data, the actual physical address of the data is required to perform the read operation. Therefore, to facilitate knowing the virtual address and actual physical address of each piece of data, modules for storing the first mapping table can be set up in the static random access memory (SRAM), thus ensuring that the virtual address and actual physical address of each piece of data are preferentially stored in the first mapping table. Similarly, modules for storing the second mapping table can be set up in the flash memory, thus ensuring that the virtual address and actual physical address of the target data are preferentially stored in the second mapping table.

[0040] In the embodiments of this application, the timestamps of the data in the first mapping table are first recorded. When it is determined that the data in the first mapping table meets the triggering conditions, the target data is determined based on the timestamps. Then, the target data is stored in the second mapping table of the flash memory, and the corresponding target data is deleted from the first mapping table. This ensures the real-time performance of the data in the first mapping table of the static random access memory (SRAM), and storing the target data in the second mapping table of the flash memory ensures the integrity of the data. At the same time, deleting the target data from the first mapping table saves space in the SRAM, reduces the storage pressure on the SRAM, and lowers the cost.

[0041] Please see Figure 2 , Figure 2 This application illustrates a data storage method provided by an embodiment of the present application. The following will focus on... Figure 2 The process shown will be described in detail, and the data storage method may specifically include the following steps:

[0042] Step 210: Determine the timestamps corresponding to the data in the first mapping table of the static random access memory.

[0043] Step 220: Determine the second actual data volume in the first mapping table within a preset time period.

[0044] As one approach, to ensure the real-time nature of the data in the first mapping table, the second actual data volume in the first mapping table can be determined within a certain time period to ensure that the time difference between the data in the first mapping table is not too large. Optionally, a corresponding preset time period can be set according to the frequency of writing data to the first mapping table to avoid data overflow due to excessive time period.

[0045] Step 230: If the second actual data volume is greater than the second data volume threshold, then it is determined that the data in the first mapping table meets the triggering condition.

[0046] In one approach, if it is determined that the second actual data volume within a preset time period is greater than the second data volume threshold, it can be determined that the amount of data stored within the preset time period is large, which may result in subsequent data not being able to be stored in the first mapping table or the first mapping table not being able to store other data. Therefore, it can be determined that the data in the first mapping table meets the triggering conditions.

[0047] Optionally, the second data volume threshold is less than the first data volume threshold, so as to avoid the situation where the first mapping table has already overflowed due to the second data volume threshold being too large.

[0048] Step 240: Store the target data in a second mapping table in the flash memory, and delete the target data from the first mapping table.

[0049] For a detailed description of steps 210 and 240, please refer to steps 110 and 130, which will not be repeated here.

[0050] In this embodiment, the second actual data volume in the first mapping table is determined within a preset time period. This ensures that the data in the first mapping table meets the triggering conditions when the second actual data volume is greater than the second data volume threshold during a mining event, thereby guaranteeing the accuracy of the timing of the target data determination.

[0051] Please see Figure 3 , Figure 3 This application illustrates a data storage method provided by an embodiment of the present application. The following will focus on... Figure 3 The process shown will be described in detail, and the data storage method may specifically include the following steps:

[0052] Step 310: Determine the timestamps corresponding to the data in the first mapping table of the static random access memory.

[0053] Step 320: If it is determined that the data in the first mapping table meets the triggering condition, then the time order of each data in the first mapping table is determined according to the timestamp.

[0054] As one approach, when it is determined that the data in the first mapping table meets the triggering conditions, in order to reduce the storage pressure on the static random access memory, the target data stored in the flash memory can be determined first in the first mapping table. In order to determine the target data, the timestamps corresponding to each data in the first mapping table can be used to determine the time order in which each data is stored in the first mapping table, so that the target data can be determined based on the time order.

[0055] Step 330: Based on the time sequence, filter the first mapping table to determine the target data.

[0056] One approach is to filter the data in the first mapping table based on the established time sequence, thereby identifying target data that meets the corresponding conditions. Optionally, the target data can be a set of data from the earliest or the latest time period, and the filtering conditions for the target data can be set according to actual needs.

[0057] In some embodiments, step 330 includes: determining a preset number of reference data following the time series in the first mapping table according to the time order; filtering the reference data in the first mapping table to obtain the target data.

[0058] As one approach, after determining the time order of each data item in the first mapping table, the data in the first mapping table can be arranged according to the time order to obtain data sorted based on the time series. This time series can be in the order of timestamps from earliest to latest or from latest to earliest.

[0059] Optionally, to ensure that the data in the first mapping table is the latest data, a preset number of reference data that are sorted later, i.e. the latest timestamp, can be determined based on the time series. These reference data are the data that were most recently stored in the first mapping table. By filtering these reference data at intervals in the first mapping table, the target data can be obtained.

[0060] Optionally, a certain number of data with earlier timestamps can be selected directly from the first mapping as target data according to the time order, ensuring the real-time nature of the data in the first mapping table.

[0061] Step 340: Store the target data in a second mapping table in the flash memory, and delete the target data from the first mapping table.

[0062] For a detailed description of steps 310 and 340, please refer to steps 110 and 130, which will not be repeated here.

[0063] In this embodiment, the time order of data in the first mapping table is determined by the timestamps corresponding to each data in the first mapping table. This allows for data filtering based on the time order in the first mapping table to obtain the target data, thus ensuring the accuracy of the target data.

[0064] Please see Figure 4 , Figure 4 This application illustrates a data storage method provided by an embodiment of the present application. The following will focus on... Figure 4 The process shown will be described in detail, and the data storage method may specifically include the following steps:

[0065] Step 410: Match the first mapping table and the second mapping table to determine the matching data.

[0066] As one approach, in order to ensure the normal operation of electronic devices while reducing the storage pressure on their memory, data in memory occupied by objects no longer used by the corresponding program of the electronic device can be deleted. Data that is still in use can still be reused by matching data in the first mapping table and the second mapping table to determine the matching data.

[0067] Step 420: Data recycling is performed based on the matching data.

[0068] As a method, matching data refers to data that exists in both the first and second mapping tables. Since data may generate corresponding data to indicate storage when stored in different storage locations, and this stored data is not the critical data needed by the electronic device, this data does not need to be recycled. In this way, matching data can be recycled, and non-matching data can be deleted, thereby reducing storage pressure.

[0069] In this embodiment, matching data is obtained by matching the first mapping table and the second mapping ratio, and then data recycling can be performed based on the matching data, which improves the ease of data use and the processing efficiency of electronic devices.

[0070] Figure 5 This is a block diagram of a data storage device according to an embodiment of this application, such as... Figure 5 As shown, the data storage device 500 includes: a timestamp determination module 510, a target data determination module 520, and a processing module 530.

[0071] The timestamp determination module 510 is used to determine the timestamps corresponding to the data in the first mapping table in the static random access memory; the target data determination module 520 is used to determine the target data based on the timestamps if the data in the first mapping table meets the triggering conditions; the processing module 530 is used to store the target data in the second mapping table of the flash memory and delete the target data in the first mapping table.

[0072] In some embodiments, the target data determination module 520 includes: a first determination unit, configured to determine that the data in the first mapping table satisfies the triggering condition if it is determined that the first actual data volume in the first mapping table is greater than the first data volume threshold.

[0073] In some embodiments, the step of determining that the data in the first mapping table meets the triggering condition includes: a second actual data volume determination unit, configured to determine a second actual data volume in the first mapping table within a preset time period; and a second judgment unit, configured to determine that the data in the first mapping table meets the triggering condition if the second actual data volume is greater than a second data volume threshold.

[0074] In some embodiments, the target data determination module 520 includes: a time order determination unit, configured to determine the time order of each data in the first mapping table based on the timestamp; and a target data determination unit, configured to filter the first mapping table based on the time order to determine the target data.

[0075] In some embodiments, the target data determining unit is further configured to: determine a preset number of reference data following the time series in the first mapping table according to the time order; filter the reference data in the first mapping table to obtain the target data.

[0076] In some embodiments, the data storage device 500 further includes: a matching data determination module, configured to match the first mapping table and the second mapping table to determine matching data; and a data recycling module, configured to recycle data based on the matching data.

[0077] In some embodiments, the first mapping table is a virtual-to-real mapping table, and the second mapping table is a real-to-virtual mapping table.

[0078] According to one aspect of the embodiments of this application, an electronic device is also provided, such as... Figure 6 As shown, the electronic device 600 includes a processor 610 and one or more memories 620. The one or more memories 620 are used to store program instructions executed by the processor 610. When the processor 610 executes the program instructions, it implements the above-described data storage method.

[0079] Furthermore, the processor 610 may include one or more processing cores. The processor 610 runs or executes instructions, programs, code sets, or instruction sets stored in the memory 620, and retrieves data stored in the memory 620. Optionally, the processor 610 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 610 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor and may be implemented using a separate communication chip.

[0080] According to one aspect of this application, a computer-readable storage medium is also provided, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable storage medium carries computer-readable instructions that, when executed by a processor, implement the methods in any of the above embodiments.

[0081] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0082] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0083] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. A method for storing data, characterized in that, The method includes: Determine the timestamps corresponding to the data in the first mapping table of the static random access memory; If it is determined that the data in the first mapping table meets the triggering condition, then the target data is determined based on the timestamp; The target data is stored in a second mapping table in the flash memory, and the target data is deleted from the first mapping table; The first mapping table and the second mapping table are matched to determine the matching data, wherein the matching data is data that exists in both the first mapping table and the second mapping table; Data recycling is performed based on the matching data.

2. The method according to claim 1, characterized in that, The step of determining if the data in the first mapping table meets the triggering condition includes: If it is determined that the first actual data volume in the first mapping table is greater than the first data volume threshold, then it is determined that the data in the first mapping table meets the triggering condition.

3. The method according to claim 1, characterized in that, The step of determining if the data in the first mapping table meets the triggering condition includes: Determine the second actual data volume in the first mapping table within a preset time period; If the second actual data volume is greater than the second data volume threshold, then it is determined that the data in the first mapping table meets the triggering condition.

4. The method according to claim 1, characterized in that, The step of determining the target data based on the timestamp includes: The time order of each data in the first mapping table is determined based on the timestamp; The target data is determined by filtering the data in the first mapping table based on the time sequence.

5. The method according to claim 4, characterized in that, The step of filtering the target data in the first mapping table based on the time order includes: Based on the time sequence, a preset number of reference data following the time series are determined in the first mapping table; The reference data is filtered in the first mapping table to obtain the target data.

6. The method according to any one of claims 1-5, characterized in that, The first mapping table is a virtual-to-real mapping table, and the second mapping table is a real-to-virtual mapping table.

7. A data storage device, characterized in that, The device includes: The timestamp determination module is used to determine the timestamps corresponding to the data in the first mapping table of the static random access memory. The target data determination module is used to determine the target data based on the timestamp if the data in the first mapping table meets the triggering condition. The processing module is used to store the target data in a second mapping table in flash memory and delete the target data in the first mapping table; The matching data determination module is used to match the first mapping table and the second mapping table to determine the matching data, wherein the matching data is data that exists in both the first mapping table and the second mapping table; The data recycling module is used to recycle data based on the matched data.

8. An electronic device, characterized in that, The electronic device includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Storage device controller and operating method of controller

    CN111796761A

  • Mapping table management method and memory

    CN116737613A