A real-time data management system to reduce Flash wear

By designing a real-time data management system, monitoring and sorting the number of writes of Flash memory blocks, balancing wear methods and optimized detection are achieved, and the problem of unbalanced writes in the Flash storage management system is solved and the service life of the device is extended.

CN118885128BActive Publication Date: 2025-02-07GUANGZHOU FELICITY SOLAR TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411191009.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-02-07
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

During the use of the existing Flash storage management system, some memory blocks are written too often, which makes it easier for the entire Flash device to reach its service life and uneven writing.

Method used

A real-time data management system is designed, including a data storage supervision module, a data cache processing module, a data storage analysis module and a data writing execution module. The system monitors and sorts the number of writes of memory blocks, balances wear and tear, and performs optimization detection during the write process to reduce repeated writes.

Benefits of technology

Effectively maintain the balanced state of the number of writes of all memory blocks, improve the service life of Flash storage devices, and consider the span when selecting memory blocks, and improve write convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885128B_ABST
    Figure CN118885128B_ABST
Patent Text Reader

Abstract

The present invention provides a real-time data management system for reducing Flash wear, which relates to the field of electrical digital data processing, and includes a data storage supervision module, a data cache processing module, a data storage analysis module, and a data write execution module, wherein the data storage supervision module is used to monitor the write status of a Flash storage block and manage the monitoring result, the data cache processing module is used to temporarily store data information that needs to be written into the Flash and perform merging processing, the data storage analysis module is used to analyze the storage location of the data and generate a storage instruction, and the data write execution module is used to execute the storage instruction to write the data in the cache into the Flash. The system performs balanced management on the data storage of the Flash, can effectively reduce the number of writes, and improve the service life of the Flash.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of electrical digital data processing, and in particular to a real-time data management system for reducing Flash wear. Background Art

[0002] Flash storage is a non-volatile storage technology that is widely used in various electronic devices, such as solid-state drives, USB flash drives, embedded systems, and memory cards. Compared with traditional mechanical hard drives, Flash storage has no moving parts, so it has higher shock resistance, speed, and durability. In addition, the life of Flash storage is limited by the write / erase cycle. Frequent write operations will cause wear of the storage unit, which will eventually affect the reliability of the device. Therefore, how to improve the durability of Flash storage is a problem that needs to be solved at present.

[0003] The foregoing discussion of the background art is intended only to facilitate an understanding of the present invention. This discussion does not acknowledge or admit that any of the material referred to is part of the common general knowledge.

[0004] Now many flash storage management systems have been developed. After a lot of searching and reference, it is found that the existing management system is such as the system disclosed in the publication number CN111258498B. These system methods generally include: initializing the FLASH memory; updating the read logical address when writing data; prompting the read status when reading data. S101: Starting from the defined FLASH storage area logical address 0, search backward in sequence whether there is a storage unit with the STATUS mark as empty. If so, proceed to S102, if not, proceed to S103; S102: Search forward in sequence from the current logical address whether there is a storage unit that passes the CRC16 check, if so, proceed to S104, if not, proceed to S103; S103: erase the storage area of ​​the entire FLASH memory, set the maximum logical address of the storage area defined in the FLASH memory as the read logical address, and the initialization ends; S104: set the current storage unit logical address as the read logical address, and the initialization ends. However, during the use of this system, there will be problems such as too many writes to some storage blocks and fewer writes to other storage blocks, which will make the entire flash reach the end of its service life more easily. Summary of the invention

[0005] The purpose of the present invention is to propose a real-time data management system for reducing Flash wear in view of the existing deficiencies.

[0006] The present invention adopts the following technical solution:

[0007] A real-time data management system for reducing Flash wear, comprising a data storage supervision module, a data cache processing module, a data storage analysis module and a data write execution module;

[0008] The data storage supervision module is used to monitor the write status of the Flash storage block and manage the monitoring results, the data cache processing module is used to temporarily store the data information that needs to be written to the Flash and merge it, the data storage analysis module is used to analyze the storage location of the data and generate a storage instruction, and the data write execution module is used to execute the storage instruction to write the data in the cache into the Flash;

[0009] The data storage supervision module includes a feedback statistics unit, a sorting and arranging unit and a demand output unit. The feedback statistics unit is used to receive the write information fed back by the data write execution module and update the number of writes to the storage block. The sorting and arranging unit sorts the addresses of the storage blocks based on the number of writes. The demand output unit outputs the address information of the corresponding storage block based on the sorting information and the storage demand.

[0010] The data cache processing module includes a queue cache unit, a data merging unit and a queue monitoring unit. The queue cache unit is used to receive and temporarily store data, the data merging unit is used to merge the stored data, and the queue monitoring unit is used to monitor the storage status of the cache queue;

[0011] The data analysis and storage module includes an information interaction unit and a storage decision unit. The information interaction unit interacts with the storage supervision module based on the storage operation type to obtain the address information of the storage block. The storage decision unit is used to determine the final data storage address and generate a storage instruction.

[0012] The data writing execution module includes an optimization detection unit and a data writing unit, wherein the optimization detection unit is used to detect the writing process and perform optimization processing, and the data writing unit is used to execute the storage instruction to write the data into the storage block;

[0013] Further, the sorting and arranging unit includes a storage state identification processor and an address sorting processor, wherein the storage state identification processor is used to identify the storage state of each storage block, and the address sorting processor sorts the addresses of the storage blocks that do not store content from small to large according to the statistical value;

[0014] The demand output unit includes a storage application processor and an address output processor, wherein the storage application processor is used to receive the storage application sent by the data analysis storage module and filter the storage block address according to the application content, and the address output processor is used to send the filtered storage block address to the data analysis storage module;

[0015] Further, the storage decision unit includes an address span sorting processor and a decision selection processor, the address span processor is used to obtain the span of two adjacent addresses in the optional address register and sort them into a series, and the decision selection processor is used to formulate multiple screening schemes and calculate the execution index of each screening scheme;

[0016] Furthermore, the decision selection processor calculates the execution index P of each screening scheme according to the following formula:

[0017]

[0018] Among them, a i Represents the statistical value of the i-th storage block in the screening scheme, a j represents the statistical value of the jth storage block in the screening scheme, d ij It represents the span between the i-th storage block and the j-th storage block, and d0 is the span base;

[0019] The decision selection processor selects the screening scheme with the smallest execution index as the decision scheme;

[0020] Further, the optimization detection unit includes a comparison processor and a detection control processor, the comparison processor is used to compare the written data with the original data, and the detection control processor is used to control the comparison process;

[0021] The control process of the detection control processor on the comparison process includes the following steps:

[0022] S1, receiving the optimization detection request of the data writing unit and initializing the comparison sequence number;

[0023] S2, intercepting the comparison byte data in the optimization detection request according to the comparison sequence number;

[0024] S3, sending the comparison byte data and comparison sequence number to the comparison processor;

[0025] S4, receiving the comparison result of the comparison processor, if they are consistent, then the comparison number is accumulated by 1 and does not exceed the upper limit, and the process returns to step S2; if the comparison number exceeds the upper limit, the process jumps to step S6; if they are inconsistent, the process goes to step S5;

[0026] S5, feedback to the data writing unit does not need to be optimized;

[0027] S6. Feedback to the data writing unit needs to be optimized.

[0028] The beneficial effects achieved by the present invention are:

[0029] This system adopts a balanced wear method to monitor the number of writes to each storage block and select storage blocks for storage based on the monitoring results. It can effectively keep the number of writes of all storage blocks in a balanced state. At the same time, when selecting storage blocks, the span between storage blocks is also considered to improve the convenience of writing while maintaining a balanced state. In the specific writing process, optimized detection is added to reduce repeated writing and further improve the service life.

[0030] To further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are only for reference and description and are not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the overall structural framework of the present invention;

[0032] Figure 2 This is a schematic diagram of the data storage and supervision module of the present invention;

[0033] Figure 3 This is a schematic diagram of the data cache processing module of the present invention;

[0034] Figure 4 This is a schematic diagram of the storage decision unit of the present invention;

[0035] Figure 5 This is a schematic diagram of the optimized detection unit structure of the present invention. DETAILED DESCRIPTION

[0036] The following is an explanation of the embodiments of the present invention through specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the contents disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. In addition, the drawings of the present invention are only simple schematic illustrations and are not depicted according to actual sizes. It is stated in advance. The following embodiments will further explain the relevant technical contents of the present invention in detail, but the disclosed contents are not intended to limit the scope of protection of the present invention.

[0037] Embodiment 1.

[0038] This embodiment provides a real-time data management system that reduces Flash wear and tear. Figure 1 , including a data storage supervision module, a data cache processing module, a data storage analysis module and a data writing execution module;

[0039] The data storage supervision module is used to monitor the write status of the Flash storage block and manage the monitoring results, the data cache processing module is used to temporarily store the data information that needs to be written to the Flash and merge it, the data storage analysis module is used to analyze the storage location of the data and generate a storage instruction, and the data write execution module is used to execute the storage instruction to write the data in the cache into the Flash;

[0040] The data storage supervision module includes a feedback statistics unit, a sorting and arranging unit and a demand output unit. The feedback statistics unit is used to receive the write information fed back by the data write execution module and update the number of writes to the storage block. The sorting and arranging unit sorts the addresses of the storage blocks based on the number of writes. The demand output unit outputs the address information of the corresponding storage block based on the sorting information and the storage demand.

[0041] The data cache processing module includes a queue cache unit, a data merging unit and a queue monitoring unit. The queue cache unit is used to receive and temporarily store data, the data merging unit is used to merge the stored data, and the queue monitoring unit is used to monitor the storage status of the cache queue;

[0042] The data analysis and storage module includes an information interaction unit and a storage decision unit. The information interaction unit interacts with the storage supervision module based on the storage operation type to obtain the address information of the storage block. The storage decision unit is used to determine the final data storage address and generate a storage instruction.

[0043] The data writing execution module includes an optimization detection unit and a data writing unit, wherein the optimization detection unit is used to detect the writing process and perform optimization processing, and the data writing unit is used to execute the storage instruction to write the data into the storage block;

[0044] The sorting and arranging unit includes a storage state recognition processor and an address sorting processor, wherein the storage state recognition processor is used to recognize the storage state of each storage block, and the address sorting processor sorts the addresses of the storage blocks that do not store content from small to large according to the statistical value;

[0045] The demand output unit includes a storage application processor and an address output processor, wherein the storage application processor is used to receive the storage application sent by the data analysis storage module and filter the storage block address according to the application content, and the address output processor is used to send the filtered storage block address to the data analysis storage module;

[0046] The storage decision unit includes an address span sorting processor and a decision selection processor, wherein the address span processor is used to obtain the span of two adjacent addresses in the optional address register and sort them into a series, and the decision selection processor is used to formulate multiple screening schemes and calculate the execution index of each screening scheme;

[0047] The decision selection processor calculates the execution index P of each screening solution according to the following formula:

[0048]

[0049] Among them, a i Represents the statistical value of the i-th storage block in the screening scheme, a j represents the statistical value of the jth storage block in the screening scheme, d ij It represents the span between the i-th storage block and the j-th storage block, and d0 is the span base;

[0050] The decision selection processor selects the screening scheme with the smallest execution index as the decision scheme;

[0051] The optimization detection unit includes a comparison processor and a detection control processor, wherein the comparison processor is used to compare the written data with the original data, and the detection control processor is used to control the comparison process;

[0052] The control process of the detection control processor on the comparison process includes the following steps:

[0053] S1, receiving the optimization detection request of the data writing unit and initializing the comparison sequence number;

[0054] S2, intercepting the comparison byte data in the optimization detection request according to the comparison sequence number;

[0055] S3, sending the comparison byte data and comparison sequence number to the comparison processor;

[0056] S4, receiving the comparison result of the comparison processor, if they are consistent, then the comparison number is accumulated by 1 and does not exceed the upper limit, and the process returns to step S2; if the comparison number exceeds the upper limit, the process jumps to step S6; if they are inconsistent, the process goes to step S5;

[0057] S5, feedback to the data writing unit does not need to be optimized;

[0058] S6. Feedback to the data writing unit needs to be optimized.

[0059] Embodiment 2.

[0060] This embodiment includes all the contents of the first embodiment, and provides a real-time data management system for reducing Flash wear, including a data storage supervision module, a data cache processing module, a data storage analysis module, and a data write execution module;

[0061] The data storage supervision module is used to monitor the write status of the Flash storage block and manage the monitoring results, the data cache processing module is used to temporarily store the data information that needs to be written to the Flash and merge it, the data storage analysis module is used to analyze the storage location of the data and generate a storage instruction, and the data write execution module is used to execute the storage instruction to write the data in the cache into the Flash;

[0062] Combination Figure 2 The data storage supervision module includes a feedback statistics unit, a sorting and arranging unit and a demand output unit. The feedback statistics unit is used to receive the write information fed back by the data write execution module and update the number of writes to the storage block. The sorting and arranging unit sorts the addresses of the storage blocks based on the number of writes. The demand output unit outputs the address information of the corresponding storage block based on the sorting information and the storage demand;

[0063] Combination Figure 3 The data cache processing module includes a queue cache unit, a data merging unit and a queue monitoring unit. The queue cache unit is used to receive and temporarily store data, the data merging unit is used to merge the stored data, and the queue monitoring unit is used to monitor the storage status of the cache queue;

[0064] The data analysis and storage module includes an information interaction unit and a storage decision unit. The information interaction unit interacts with the storage supervision module based on the storage operation type to obtain the address information of the storage block. The storage decision unit is used to determine the final data storage address and generate a storage instruction.

[0065] The data writing execution module includes an optimization detection unit and a data writing unit, wherein the optimization detection unit is used to detect the writing process and perform optimization processing, and the data writing unit is used to execute the storage instruction to write the data into the storage block;

[0066] The storage blocks mentioned in this article refer to Flash storage blocks;

[0067] The feedback statistics unit includes a statistics result register, a feedback receiving processor and a statistics mapping processor. The statistics result register is used to store the write statistics of each storage block to form a counting table. The feedback receiving processor is used to receive the storage block address fed back by the data write execution module. The statistics mapping processor maps the storage block address to the table sequence code in the counting table and updates the statistics therein.

[0068] The sorting and arranging unit includes a storage state recognition processor and an address sorting processor, wherein the storage state recognition processor is used to recognize the storage state of each storage block, and the address sorting processor sorts the addresses of the storage blocks that do not store content from small to large according to the statistical value;

[0069] The demand output unit includes a storage application processor and an address output processor, wherein the storage application processor is used to receive the storage application sent by the data analysis storage module and filter the storage block address according to the application content, and the address output processor is used to send the filtered storage block address to the data analysis storage module;

[0070] The queue buffer unit includes a queue register and a comment register, wherein the queue register is used to store specific data content of the storage item, and the comment register is used to store description information of the storage item and a boundary mark in the queue register;

[0071] The boundary marker is used to distinguish the data contents of two different consecutive storage items in the queue register;

[0072] The data merging unit includes a merging judgment processor and a merging execution processor, wherein the merging judgment processor is used to judge whether two adjacent data contents in the column register need to be merged and written, and the merging execution processor performs a merging mark on the boundary marks between the data contents that need to be merged;

[0073] The queue monitoring unit includes a storage activation processor and a content output processor, wherein the storage activation processor is used to monitor the remaining space in the queue register and send an activation signal to the content output processor when the remaining space reaches the requirement, and the content output processor obtains the data content in the queue register and synthesizes the storage operation in combination with the annotation information and sends it to the data analysis storage module;

[0074] The content output processor acquires data content by detecting boundary markers and merge markers. Starting from the head of the queue, when a boundary marker is detected and there is no merge marker for the boundary marker, the data content before the boundary marker is the acquired data content.

[0075] The storage operation types are classified into overwrite storage and new storage. Overwrite storage means storing by overwriting the original information, and new storage means storing in an idle storage block.

[0076] The information interaction unit includes a storage application processor and an optional address register. The storage application processor generates a storage application based on the storage operation type and sends it to the demand output unit. The optional address register is used to store the storage block address information fed back by the demand output unit.

[0077] For a storage application for overlay storage, the demand output unit directly outputs the storage block addresses of the corresponding quantity and position, and the storage decision unit directly generates storage instructions according to these storage block addresses;

[0078] For a storage application of a completely new storage, the demand output unit outputs storage block addresses exceeding the required number, and the storage decision unit selects some addresses from these storage block addresses to generate storage instructions;

[0079] Combination Figure 4 , the storage decision unit includes an address span sorting processor and a decision selection processor, the address span processor is used to obtain the span of two adjacent addresses in the optional address register and sort them into a series, and the decision selection processor is used to formulate multiple screening schemes and calculate the execution index of each screening scheme;

[0080] For a storage application of a new storage, the storage application processor selects m storage addresses in order from the address sorting processor, and the specific value of m is calculated according to the following formula:

[0081]

[0082] Where n is the number of storage blocks actually required in the storage application;

[0083] The decision selection processor calculates the execution index P of each screening solution according to the following formula:

[0084]

[0085] Among them, a i Represents the statistical value of the i-th storage block in the screening scheme, a j represents the statistical value of the jth storage block in the screening scheme, d ij It represents the span between the i-th storage block and the j-th storage block, and d0 is the span base;

[0086] In the screening scheme, the storage blocks are naturally sorted according to their positions in the storage space, d ij It is obtained by accumulating the element values ​​according to the span sequence. For example, the first and fourth storage blocks in the m storage blocks are used as the first and second storage blocks in the screening scheme, then d 12 Obtained by summing the values ​​of the first three elements in the span sequence;

[0087] The screening scheme is to obtain n storage blocks arbitrarily from m storage blocks. The number of screening schemes is ! is the factorial symbol;

[0088] The decision selection processor selects the screening scheme with the smallest execution index as the decision scheme;

[0089] Combination Figure 5 , the optimization detection unit includes a comparison processor and a detection control processor, the comparison processor is used to compare the written data with the original data, and the detection control processor is used to control the comparison process;

[0090] The control process of the detection control processor on the comparison process includes the following steps:

[0091] S1, receiving the optimization detection request of the data writing unit and initializing the comparison sequence number;

[0092] S2, intercepting the comparison byte data in the optimization detection request according to the comparison sequence number;

[0093] S3, sending the comparison byte data and comparison sequence number to the comparison processor;

[0094] S4, receiving the comparison result of the comparison processor, if they are consistent, then the comparison number is accumulated by 1 and does not exceed the upper limit, and the process returns to step S2; if the comparison number exceeds the upper limit, the process jumps to step S6; if they are inconsistent, the process goes to step S5;

[0095] S5, feedback to the data writing unit does not need to be optimized;

[0096] S6. Feedback to the data writing unit needs to be optimized;

[0097] For example, if a storage block has 10 bytes and the size of the comparison byte data is 2 bytes, the upper limit of the comparison sequence number is 5. When optimization is required, it means that the storage block does not need to actually update the data, but only needs to change the storage state;

[0098] The i and j appearing in the above text are ordinal numbers used to indicate sequence numbers.

[0099] The contents disclosed above are only preferred feasible embodiments of the present invention, and do not limit the protection scope of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention specification and drawings are included in the protection scope of the present invention. In addition, the elements therein can be updated as technology develops.

Claims

1. A real-time data management system for reducing Flash wear, characterized in that: It includes a data storage supervision module, a data cache processing module, a data storage analysis module and a data writing execution module; The data storage supervision module is used to monitor the write status of the Flash storage block and manage the monitoring results, the data cache processing module is used to temporarily store the data information that needs to be written to the Flash and merge it, the data storage analysis module is used to analyze the storage location of the data and generate a storage instruction, and the data write execution module is used to execute the storage instruction to write the data in the cache into the Flash; The data storage supervision module includes a feedback statistics unit, a sorting and arranging unit and a demand output unit. The feedback statistics unit is used to receive the write information fed back by the data write execution module and update the number of writes to the storage block. The sorting and arranging unit sorts the addresses of the storage blocks based on the number of writes. The demand output unit outputs the address information of the corresponding storage block based on the sorting information and the storage demand. The data cache processing module includes a queue cache unit, a data merging unit and a queue monitoring unit. The queue cache unit is used to receive and temporarily store data, the data merging unit is used to merge the stored data, and the queue monitoring unit is used to monitor the storage status of the cache queue; The data storage analysis module includes an information interaction unit and a storage decision unit. The information interaction unit interacts with the storage supervision module based on the storage operation type to obtain the address information of the storage block. The storage decision unit is used to determine the final data storage address and generate a storage instruction. The data writing execution module includes an optimization detection unit and a data writing unit, wherein the optimization detection unit is used to detect the writing process and perform optimization processing, and the data writing unit is used to execute the storage instruction to write the data into the storage block; The storage decision unit includes an address span sorting processor and a decision selection processor, wherein the address span sorting processor is used to obtain the span of two adjacent addresses in the optional address register and sort them into a series, and the decision selection processor is used to formulate multiple screening schemes and calculate the execution index of each screening scheme; The decision selection processor calculates the execution index P of each screening solution according to the following formula: ; Among them, a i represents the statistical value of the i-th storage block in the screening scheme, a j represents the statistical value of the jth storage block in the screening scheme, d ij represents the span between the i-th storage block and the j-th storage block, and d0 is the span base; The decision selection processor selects a screening solution with the smallest execution index as a decision solution.

2. A real-time data management system for reducing Flash wear as claimed in claim 1, characterized in that: The sorting and arranging unit includes a storage state recognition processor and an address sorting processor, wherein the storage state recognition processor is used to recognize the storage state of each storage block, and the address sorting processor sorts the addresses of the storage blocks that do not store content from small to large according to the statistical value; The demand output unit includes a storage application processor and an address output processor. The storage application processor is used to receive the storage application sent by the data analysis storage module and filter the storage block address according to the application content. The address output processor is used to send the filtered storage block address to the data analysis storage module.

3. A real-time data management system for reducing Flash wear as claimed in claim 2, characterized in that: The optimization detection unit includes a comparison processor and a detection control processor, wherein the comparison processor is used to compare the written data with the original data, and the detection control processor is used to control the comparison process; The control process of the detection control processor on the comparison process includes the following steps: S1, receiving the optimization detection request of the data writing unit and initializing the comparison sequence number; S2, intercepting the comparison byte data in the optimization detection request according to the comparison sequence number; S3, sending the comparison byte data and comparison sequence number to the comparison processor; S4, receiving the comparison result of the comparison processor, if they are consistent, then the comparison number is accumulated by 1 and does not exceed the upper limit, and the process returns to step S2; if the comparison number exceeds the upper limit, the process jumps to step S6; if they are inconsistent, the process goes to step S5; S5, feedback to the data writing unit does not need to be optimized; S6. Feedback to the data writing unit needs to be optimized.

Citation Information

Patent Citations

  • A FLASH memory management method

    CN111258498B

  • Memory system

    CN101681311A

  • Wiping and writing management method and system for non-volatile flash memory

    CN104156317A