A method and device for adaptive partitioning cyclic storage of flash memory

Through the adaptive partition cyclic storage method, combined with the parameters of flash memory device and the characteristics of write data, the partitioning strategy is dynamically adjusted, which solves the problem of low storage space utilization in the existing technology, and achieves more efficient storage management and equipment life extension.

CN119473930BActive Publication Date: 2025-04-18SHENZHEN YIBANG SUNSHINE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510063123.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-18
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

The existing flash memory storage management method adopts a static partitioning strategy, and cannot effectively manage the dynamic storage requirements of different types of data, resulting in low storage space utilization and affecting the overall performance and service life of flash memory devices.

Method used

It provides an adaptive partition cyclic storage method, which can perform logical partition division by obtaining device parameters and partition rule information of flash memory devices; combines the type of written data and physical block erase data, performs dynamic partition adjustment and storage planning analysis, and uses a preset Dynamic-FTL algorithm for global storage optimization.

Benefits of technology

It improves the rational allocation of storage space, realizes refined management of different types of data, extends the service life of flash memory devices, improves overall performance, and adapts to diverse storage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473930B_ABST
    Figure CN119473930B_ABST
Patent Text Reader

Abstract

The present invention relates to an adaptive partitioning cyclic storage method and device suitable for flash memory, the method comprising: obtaining a device parameter set and partitioning rule information of a flash memory device, performing logical partitioning on the device parameter set based on the partitioning rule information, and obtaining corresponding initial partition configuration information; obtaining a type identifier and cache mapping data of write data, and associating the type identifier with the cache mapping data to obtain a corresponding target storage partition; performing storage planning analysis on the target storage partition and the target write block position according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment scheme; performing comprehensive processing on the initial partition adjustment scheme and the dynamic partition information according to a preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy. The present invention can flexibly adjust the storage management strategy according to the characteristics of different data and changes in demand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flash memory partition cyclic storage, and in particular to an adaptive partition cyclic storage method and device suitable for flash memory. Background Art

[0002] Flash storage technology, as a high-speed, low-power data storage solution, has been widely used in modern electronic devices. With the rapid growth of data volume and the increasing complexity of storage requirements, how to effectively manage the storage space of flash memory devices to achieve efficient operation of the system and extend the life of flash memory has become one of the research focuses. Existing flash storage management methods often adopt static partitioning strategies, which only consider the basic parameters of the device and simple partitioning rules, while ignoring the diversity of data types and the impact of flash memory physical characteristics on storage efficiency. This fixed management method may lead to low storage space utilization and cannot adapt to the dynamic storage requirements of different types of data, thus affecting the overall performance and service life of flash memory devices. Summary of the invention

[0003] The main purpose of the present invention is to provide an adaptive partition cyclic storage method and device suitable for flash memory, which can flexibly adjust the storage management strategy according to the characteristics and demand changes of different data.

[0004] To achieve the above object, the present invention provides an adaptive partition cyclic storage method applicable to flash memory, comprising:

[0005] Acquire a device parameter set and partition rule information of a flash memory device, and divide the device parameter set into logical partitions based on the partition rule information to obtain corresponding initial partition configuration information;

[0006] Acquire a type identifier and cache mapping data of the write data, associate the type identifier with the cache mapping data, and obtain a corresponding target storage partition;

[0007] Acquire physical block erase data of the flash memory device, and perform a balanced analysis on the initial partition configuration information according to the physical block erase data to obtain a corresponding target write block position;

[0008] Performing storage planning analysis on the target storage partition and the target write block position according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment plan;

[0009] Performing access frequency analysis on the write data to obtain corresponding data importance information, and performing priority evaluation on the data importance information based on the physical block erase data to obtain corresponding dynamic partition information;

[0010] The initial partition adjustment scheme and the dynamic partition information are comprehensively processed according to a preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy.

[0011] Further, the acquiring of the device parameter set and partition rule information of the flash memory device, and the logical partitioning of the device parameter set based on the partition rule information to obtain the corresponding initial partition configuration information includes:

[0012] Collecting physical characteristic parameters of the flash memory device to obtain the device parameter set including total storage capacity, block size and page size;

[0013] Calculating available space of the flash memory device according to the device parameter set to obtain effective storage capacity data;

[0014] Accessing a preset partition rule library to extract partition rule information matching the effective storage capacity data;

[0015] According to the partition rule information, the effective storage capacity data is divided and calculated to obtain an initial logical partition scheme;

[0016] Initializing an address mapping table for each partition in the initial logical partitioning scheme to obtain corresponding address mapping data;

[0017] The initial logical partition scheme is associated with the address mapping data to generate initial partition configuration information.

[0018] Further, the acquiring of the type identifier and cache mapping data of the write data, associating the type identifier with the cache mapping data to obtain a corresponding target storage partition, includes:

[0019] Performing type identification on the written data to obtain the type identifier;

[0020] Classify the written data according to the type identifier to obtain corresponding data category information;

[0021] Performing feature distribution analysis on the data category information to obtain corresponding data distribution features;

[0022] Perform query processing on the cache mapping table according to the data distribution characteristics to obtain corresponding cache mapping data;

[0023] Mapping and matching the type identifier and the cache mapping data to obtain a corresponding initial mapping relationship;

[0024] Performing available block traversal processing on the flash memory device according to the initial mapping relationship to obtain a corresponding available block list;

[0025] Performing space allocation analysis on the available block list to obtain a corresponding block combination scheme;

[0026] Optimize the initial mapping relationship according to the block combination scheme to obtain a corresponding target mapping relationship;

[0027] The target mapping relationship is divided into storage areas to obtain corresponding target storage partitions.

[0028] Further, the obtaining of physical block erase data of the flash memory device, and performing a balanced analysis on the initial partition configuration information according to the physical block erase data to obtain a corresponding target write block position, includes:

[0029] Performing statistics on the number of physical block erasures and writes on the flash memory device to obtain the physical block erasure data of each physical block;

[0030] Classify and sort the physical blocks according to the erase data of the physical blocks to obtain an erase times distribution diagram;

[0031] Performing data analysis on the erase / write times distribution graph to obtain an erase / write times threshold;

[0032] The physical blocks are grouped according to the erasure number threshold to obtain a high-frequency erasure group and a low-frequency erasure group;

[0033] Performing address mapping on the physical blocks in the high-frequency erasing group and the low-frequency erasing group to obtain a physical address mapping table;

[0034] Evenly divide the initial partition configuration information according to the physical address mapping table to obtain an even partition configuration scheme;

[0035] Calculating the available space for each partition in the balanced partition configuration scheme to obtain a partition available space list;

[0036] According to the partition available space list, the space utilization of the physical blocks is sorted and analyzed to obtain a target partition list;

[0037] Perform a cross comparison based on the target partition list and the physical address mapping table to obtain a candidate write block set;

[0038] The candidate write block set is screened by the number of times of erasure to obtain the target write block position.

[0039] Furthermore, the storage planning analysis is performed on the target storage partition and the target write block position according to the preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment scheme, including:

[0040] Dividing the target storage partition into parallel units according to the one-time programming-aware data allocation algorithm to obtain a plurality of flash memory parallel units;

[0041] Performing a one-time programming characteristic analysis on a plurality of the flash memory parallel units to obtain programming state information of each of the flash memory parallel units;

[0042] Performing availability evaluation on the plurality of flash memory parallel units according to the programming state information to obtain an available parallel unit list;

[0043] Dividing the written data into logical pages to obtain a plurality of logical data pages;

[0044] Performing data correlation analysis on the multiple logical data pages to obtain a data correlation matrix;

[0045] Allocate the plurality of the logical data pages according to the data relevance matrix and the available parallel unit list to obtain a preliminary data allocation plan;

[0046] Performing a one-time programming capacity evaluation on the target write block position to obtain a block capacity indicator;

[0047] Adjusting the preliminary data allocation plan according to the block capacity indicator to obtain an optimized data allocation plan;

[0048] Performing a read parallelism analysis on the optimized data allocation scheme to obtain a parallel read index;

[0049] The optimized data allocation scheme is partitioned and adjusted according to the parallel reading index to obtain the initial partition adjustment scheme.

[0050] Further, the access frequency analysis of the write data is performed to obtain corresponding data importance information, and the priority evaluation of the data importance information is performed based on the physical block erase data to obtain corresponding dynamic partition information, including:

[0051] Dividing the written data into time windows to obtain a plurality of time window units;

[0052] Counting the number of accesses to the written data in each of the time window units to obtain corresponding access frequency data;

[0053] Sort the written data by importance according to the access frequency data to obtain a preliminary data importance list;

[0054] Performing data block mapping on the preliminary data importance list according to the physical block erase data to obtain a data block importance mapping table;

[0055] The flash memory device is divided into virtual partitions according to the data block importance mapping table to obtain the dynamic partition information.

[0056] Furthermore, the initial partition adjustment scheme and the dynamic partition information are comprehensively processed according to the preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy, including:

[0057] Access frequency data of the dynamic partition information, identify hot data, and obtain corresponding hot data distribution information;

[0058] Extracting partition structure features from the initial partition adjustment scheme to obtain initial partition structure data;

[0059] Performing address mapping calculation on the initial partition structure data and the hot data distribution information according to a preset dynamic mapping algorithm to obtain an initial mapping table of corresponding logical block addresses to physical block addresses;

[0060] Performing page-level mapping and block-level mapping hybrid processing on the initial mapping table to obtain a corresponding hybrid mapping table;

[0061] Performing wear leveling processing on the hybrid mapping table according to the physical block erasure data to obtain a corresponding balanced write strategy;

[0062] Based on the balanced writing strategy, an intelligent garbage collection mechanism is generated to obtain a corresponding data sorting solution;

[0063] Performing virtual reorganization of physical blocks on the flash memory device according to the data arrangement scheme to generate a virtual partition mapping table;

[0064] Calculate the load balancing index according to the virtual partition mapping table to obtain the load distribution;

[0065] Performing iterative partition optimization on the virtual partition mapping table according to the load distribution to obtain a set of candidate partition schemes;

[0066] Performing performance screening on the candidate partitioning scheme set to obtain a final partitioning configuration scheme;

[0067] Update the FTL mapping table according to the final partition configuration scheme, and generate a corresponding data migration plan;

[0068] Performing write amplification analysis on the data migration plan to obtain a corresponding write optimization strategy;

[0069] Based on the write optimization strategy, the hybrid mapping table is updated to obtain a corresponding dynamic adjustment mapping table;

[0070] A global storage state optimization analysis is performed based on the write optimization strategy and the dynamic adjustment mapping table to obtain the global storage optimization strategy.

[0071] Further, the address mapping calculation is performed on the initial partition structure data and the hot data distribution information according to a preset dynamic mapping algorithm to obtain an initial mapping table of corresponding logical block addresses to physical block addresses, including:

[0072] Performing heat weight calculation on the heat data distribution information to obtain a heat data weight matrix;

[0073] Performing hot zone division on the initial partition structure data according to the hot data weight matrix to obtain a hot zone distribution map;

[0074] Performing logical address space division on the hot zone distribution map to obtain a logical address space distribution table;

[0075] Grouping physical block addresses according to the logical address space distribution table to obtain physical block address groups;

[0076] Perform dynamic mapping calculation on the physical block address group to obtain a dynamic mapping relationship table, wherein the dynamic mapping calculation includes:

[0077] Identifying and prioritizing free blocks of the physical block address group to obtain a priority free block list;

[0078] Performing logical address heat sorting on the logical address space distribution table to obtain a heat sorted logical address list;

[0079] Perform one-to-one mapping according to the priority free block list and the heat sorted logical address list to obtain a preliminary mapping relationship;

[0080] Performing load balancing calculation adjustment on the preliminary mapping relationship to obtain a dynamic mapping relationship table;

[0081] Generate a mapping rule from a logical block address to a physical block address according to the dynamic mapping relationship table to obtain a mapping rule set;

[0082] Performing conflict detection optimization on the mapping rule set to obtain an optimized mapping rule set;

[0083] The initial mapping table is generated according to the optimized mapping rule set.

[0084] The present invention also provides an adaptive partitioning cyclic storage device applicable to a flash memory, which is applied to any one of the above-mentioned adaptive partitioning cyclic storage methods applicable to a flash memory, comprising:

[0085] A collection module, the collection module is used to obtain a device parameter set and partition rule information of a flash memory device, and to divide the device parameter set into logical partitions based on the partition rule information to obtain corresponding initial partition configuration information;

[0086] An analysis module, the analysis module is used to obtain a type identifier and cache mapping data of the write data, associate the type identifier with the cache mapping data, and obtain a corresponding target storage partition;

[0087] An association module, the association module is used to obtain physical block erase data of the flash memory device, and perform a balanced analysis on the initial partition configuration information according to the physical block erase data to obtain a corresponding target write block position;

[0088] A processing module, the processing module is used to perform storage planning analysis on the target storage partition and the target write block position according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment plan;

[0089] A control module, the control module is used to perform access frequency analysis on the write data to obtain corresponding data importance information, and perform priority evaluation on the data importance information based on the physical block erase data to obtain corresponding dynamic partition information;

[0090] An execution module is used to perform comprehensive processing on the initial partition adjustment scheme and the dynamic partition information according to a preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy.

[0091] The present invention provides an adaptive partition cyclic storage method and device applicable to flash memory, which has the following beneficial effects:

[0092] By comprehensively analyzing the flash device parameters and partition rules, combined with data type information, the storage requirements of different types of data can be more accurately evaluated, thereby improving the rationality of storage space allocation and providing a more reliable basis for flash management. By associating the write data with the cache mapping data, the refined management of different types of data is achieved, which helps to allocate storage space on demand and avoid space waste. The balanced analysis of the partition configuration based on the physical block erase data can ensure that the flash device can operate efficiently under different write intensities, reduce unnecessary erase operations, and extend the life of the flash memory. By comprehensively analyzing the data access frequency and physical block erase conditions, a more reasonable dynamic partition strategy is formulated, and the optimized operation of the entire system is achieved through the global storage optimization strategy, thereby effectively utilizing storage resources and improving the overall performance of the flash device. At the same time, by considering the impact of data importance on the storage strategy, the storage management strategy can be flexibly adjusted according to the characteristics of different data and demand changes, making the system more adaptable to diverse storage scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 It is a flow chart of an adaptive partition cyclic storage method applicable to flash memory provided by the present invention;

[0094] Figure 2 It is a structural diagram of an adaptive partitioned cyclic storage device suitable for flash memory provided by the present invention.

[0095] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0096] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0097] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods.

[0098] Reference Figure 1 As shown, the present invention provides an adaptive partition cyclic storage method applicable to flash memory, comprising:

[0099] Step S1: obtaining a device parameter set and partition rule information of a flash memory device, and dividing the device parameter set into logical partitions based on the partition rule information to obtain corresponding initial partition configuration information;

[0100] Step S2: obtaining the type identifier and cache mapping data of the write data, associating the type identifier with the cache mapping data to obtain the corresponding target storage partition;

[0101] Step S3: obtaining physical block erase data of the flash memory device, performing a balanced analysis on the initial partition configuration information according to the physical block erase data, and obtaining a corresponding target write block position;

[0102] Step S4: Perform storage planning analysis on the target storage partition and the target write block location according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment plan;

[0103] Step S5: Analyze the access frequency of the written data to obtain the corresponding data importance information, and evaluate the priority of the data importance information based on the physical block erase data to obtain the corresponding dynamic partition information;

[0104] Step S6: Comprehensively process the initial partition adjustment plan and the dynamic partition information according to the preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy.

[0105] Based on the above steps, the detailed steps are as follows:

[0106] Step S1: Obtain a device parameter set of the flash memory device, including but not limited to: total capacity, block size, page size, erase count limit, etc. Obtain preset partition rule information, such as the proportional allocation rules of the hot data area, cold data area, and system area. According to the partition rule information, the total capacity of the flash memory device is logically partitioned to obtain the size and starting address of each partition. Generate initial partition configuration information, including the size, starting address, and purpose of each partition.

[0107] Step S2: Obtain the type identifier of the data to be written, such as system data, user data, temporary data, etc. Obtain the cache mapping data of the flash memory device, including the mapping relationship between the logical address and the physical address. According to the data type identifier, determine the logical partition where the data should be stored. Use the cache mapping data to convert the logical partition into the corresponding physical partition. Determine the target storage partition, that is, the physical partition where the data is actually written.

[0108] Step S3: Obtain the erase count data of each physical block of the flash memory device. Calculate the average erase count of the physical blocks in each partition. Compare the average erase count of each partition to evaluate the erase balance between partitions. 3.4 In the target storage partition, select the physical blocks with lower erase counts as candidate write blocks. 3.5 Considering the principle of data locality, select the most suitable block from the candidate write blocks as the target write block location.

[0109] Obtain physical block erase data of the flash memory device, perform a balanced analysis on the initial partition configuration information according to the physical block erase data, and obtain a corresponding target write block position;

[0110] Step S4: Analyze the current state of the target write block, including the remaining space and the type of stored data. If the target write block has enough space, write the new data directly.

[0111] If there is insufficient space, initiate the data migration process: Identify data in the target write block that can be migrated, such as expired data or infrequently accessed data. Select a suitable target block for data migration, which may be another block in the same partition, or another suitable partition. Perform data migration to move the selected data to the new location. Update the mapping table to reflect the new location of the data.

[0112] Make room for the new data in the target write block. Record the details of the migration operation, including the amount of data migrated, the source location, and the target location. Evaluate the effectiveness of the migration operation, including improvements in space utilization and impact on overall performance.

[0113] Step S5: Analyze the migration processing results, identify the invalid data and fragments generated, and set the garbage collection trigger threshold, such as the invalid data ratio or the free space ratio.

[0114] When the trigger threshold is reached, the garbage collection process is started: select the target block for garbage collection, giving priority to blocks with a high proportion of invalid data. Read the valid data in the target block. Rewrite the valid data to other clean blocks. Erase the original target block to make it available.

[0115] Update the mapping table to reflect the new location of the data. Record detailed information about the garbage collection operation, including the size of the space reclaimed and the time taken for the operation. Evaluate the effect of garbage collection, including the improvement in space utilization and the impact on write performance. Based on the evaluation results, dynamically adjust the garbage collection policy, such as the trigger threshold or collection frequency.

[0116] Step S6: Analyze the data storage results and collect key performance indicators: space utilization of each partition, data access frequency distribution, response time of write and read operations, garbage collection frequency and efficiency.

[0117] Evaluate the effectiveness of the current partition configuration: Compare the actual usage of each partition with the initial configuration to identify possible performance bottlenecks or resource waste.

[0118] Develop dynamic adjustment strategies: Set thresholds that trigger adjustments, such as when the space utilization of a partition is too high or too low. Determine adjustable parameters, such as partition size, number of partitions, and partition usage.

[0119] Perform dynamic partition adjustment: Calculate new partition configuration based on the evaluation results. Implement partition adjustment gradually, which may involve data migration and remapping. Update partition configuration information in the system.

[0120] Monitor the adjustment process to ensure system stability: monitor changes in key performance indicators in real time. If abnormalities are found, roll back or make fine adjustments in a timely manner.

[0121] Evaluate the effect of the adjustment: Compare the performance indicators before and after the adjustment. Analyze the impact of the adjustment on the overall system performance. Record the adjustment process and results to provide a reference for subsequent optimization.

[0122] The present invention provides an adaptive partition cyclic storage method and device applicable to flash memory, which has the following beneficial effects:

[0123] By comprehensively analyzing the flash device parameters and partition rules, combined with data type information, the storage requirements of different types of data can be more accurately evaluated, thereby improving the rationality of storage space allocation and providing a more reliable basis for flash management. By associating the write data with the cache mapping data, the refined management of different types of data is achieved, which helps to allocate storage space on demand and avoid space waste. The balanced analysis of the partition configuration based on the physical block erase data can ensure that the flash device can operate efficiently under different write intensities, reduce unnecessary erase operations, and extend the life of the flash memory. By comprehensively analyzing the data access frequency and physical block erase conditions, a more reasonable dynamic partition strategy is formulated, and the optimized operation of the entire system is achieved through the global storage optimization strategy, thereby effectively utilizing storage resources and improving the overall performance of the flash device. At the same time, by considering the impact of data importance on the storage strategy, the storage management strategy can be flexibly adjusted according to the characteristics of different data and demand changes, making the system more adaptable to diverse storage scenarios.

[0124] In one embodiment, a device parameter set and partition rule information of a flash memory device are obtained, and the device parameter set is logically partitioned based on the partition rule information to obtain corresponding initial partition configuration information, including:

[0125] The physical characteristic parameters of the flash memory device are collected to obtain a device parameter set including total storage capacity, block size and page size. These parameters reflect the basic physical characteristics of the flash memory device and are the basis for subsequent partitioning and management.

[0126] The available space of the flash device is calculated according to the device parameter set to obtain the effective storage capacity data. This step takes into account the physical characteristics and system overhead of the flash device to ensure that subsequent partitioning is based on the actual available storage space.

[0127] Access the preset partition rule library and extract the partition rule information that matches the effective storage capacity data. The partition rule library stores the optimal partition strategies for different capacity ranges, and ensures the rationality and efficiency of the partition scheme through matching.

[0128] The effective storage capacity data is divided and calculated according to the partition rule information to obtain the initial logical partition scheme. This process converts the abstract rule information into a specific partition scheme, including the size, number and purpose of each partition.

[0129] The address mapping table of each partition in the initial logical partitioning scheme is initialized to obtain the corresponding address mapping data. The address mapping table is the key to realize the conversion from logical address to physical address, and the initialization ensures the correctness of subsequent data access operations.

[0130] The initial logical partition scheme is associated with the address mapping data to generate initial partition configuration information. This step integrates the logical partition information and the physical address mapping information to form a complete partition configuration, which provides a basis for the use and management of the flash memory device.

[0131] This embodiment ensures the rationality and effectiveness of the partitioning scheme by accurately collecting the physical characteristic parameters of the flash memory device and accurately calculating the available space, avoiding the waste of storage space or partition conflicts caused by parameter errors. Based on the matching mechanism of the preset partitioning rule library, the flexible adaptation of the partitioning strategy is realized, and the optimal partitioning scheme can be automatically selected according to the flash memory devices of different capacities, thereby improving the versatility and adaptability of the system. By initializing the address mapping table for each partition, an accurate correspondence between the logical address and the physical address is established, providing reliable protection for subsequent data read and write operations. The logical partitioning scheme is associated with the address mapping data to generate complete initial partition configuration information, laying the foundation for the efficient management and use of the flash memory device. The whole process realizes the adaptive partitioning of the flash memory device, which not only takes into account the device characteristics, but also complies with the preset rules, thereby improving the storage space utilization and system performance.

[0132] In one embodiment, obtaining a type identifier and cache mapping data of the write data, associating the type identifier with the cache mapping data, and obtaining a corresponding target storage partition includes:

[0133] The written data is identified and the type is obtained. During the type identification process, the format, structure and content characteristics of the data are analyzed, and the data is matched according to the preset data type rule library to determine the specific type of the data. This step lays the foundation for subsequent data processing and storage optimization.

[0134] The written data is classified according to the type identifier to obtain the corresponding data category information. During the classification process, the data will be divided into different categories according to the identified type identifier. This classification helps to improve the subsequent data management and access efficiency.

[0135] Perform feature distribution analysis on data category information to obtain corresponding data distribution features. Feature distribution analysis involves statistics and analysis of multiple dimensions such as data size, access frequency, and update rate.

[0136] The cache mapping table is queried based on the data distribution characteristics to obtain the corresponding cache mapping data. The cache mapping table stores the correspondence between different data characteristics and storage locations. The query processing process will find the most suitable storage strategy in the cache mapping table based on the data distribution characteristics.

[0137] Map and match the type identifier and cache mapping data to obtain the corresponding initial mapping relationship. The mapping matching process combines the data type with the storage strategy to form a preliminary data storage solution. This step provides a basic framework for subsequent storage optimization.

[0138] According to the initial mapping relationship, the flash memory device is traversed for available blocks to obtain the corresponding available block list. The available block traversal process checks the free blocks in the flash memory device and selects suitable storage blocks according to the requirements of the initial mapping relationship. This step ensures the feasibility of data storage.

[0139] Perform space allocation analysis on the available block list to obtain the corresponding block combination plan. Space allocation analysis considers data size, access mode, and flash characteristics to develop the optimal block combination plan. This step aims to maximize storage efficiency and performance.

[0140] The initial mapping relationship is optimized according to the block combination scheme to obtain the corresponding target mapping relationship. The target optimization process adjusts and optimizes the initial mapping relationship according to the actual block combination to adapt to the physical characteristics of the flash memory device and data access requirements.

[0141] The target mapping relationship is divided into storage areas to obtain the corresponding target storage partitions. Storage area division is the last step, which converts the optimized mapping relationship into a specific storage partitioning scheme.

[0142] This embodiment realizes refined data management and improves the flexibility and adaptability of the storage system by performing type recognition and classification processing on the written data. The characteristic distribution analysis of data category information enables the system to better understand and predict the usage pattern of data, thereby optimizing the storage strategy. In combination with the cache mapping table for query processing, the intelligent matching of storage location and data characteristics is realized, and the data access efficiency is improved. By traversing the available blocks and analyzing the space allocation of the flash memory device, the efficient use of storage resources is ensured. The process of target optimization and storage area division takes into account many factors, so that the final storage solution can fully adapt to the physical characteristics of the flash memory device and the data access requirements. This adaptive partitioned circular storage method not only improves the storage efficiency, but also enhances the reliability and performance of the system, and provides the best storage solution for different types of data.

[0143] In one embodiment, physical block erase data of a flash memory device is obtained, and initial partition configuration information is balanced analyzed according to the physical block erase data to obtain a corresponding target write block position, including:

[0144] The physical block erase count of the flash memory device is counted to obtain the physical block erase data of each physical block. The physical block erase data contains the physical block identifier and the corresponding erase count. The statistical process is implemented by reading the erase counter in the flash memory controller or by software recording to ensure the accuracy and integrity of the data.

[0145] The physical blocks are classified and sorted according to the physical block erase data to obtain the erase count distribution diagram. The sorting uses the quick sort algorithm to sort the erase count in descending order, and divides the sorting results into multiple intervals. The number of physical blocks in each interval is counted to form an intuitive erase count distribution diagram.

[0146] Data analysis is performed on the erase count distribution graph to obtain the erase count threshold. The threshold is determined using the distribution graph inflection point method, and the obvious inflection point of the erase count distribution curve is selected as the threshold. This method can effectively distinguish between high-frequency erased and low-frequency erased physical blocks, providing a basis for subsequent grouping.

[0147] Physical blocks are grouped according to the erase count threshold to obtain high-frequency erase groups and low-frequency erase groups. The grouping process traverses the erase count data of all physical blocks, and blocks with erase counts higher than the threshold are grouped into high-frequency erase groups, and blocks with erase counts lower than the threshold are grouped into low-frequency erase groups. This grouping method helps identify blocks with higher usage frequencies and provides a basis for balancing strategies.

[0148] The physical blocks in the high-frequency erasing group and the low-frequency erasing group are mapped to obtain a physical address mapping table. The address mapping process establishes the correspondence between the physical block and the logical address, and records the logical address currently mapped to each physical block. The physical address mapping table contains the physical block identifier, the logical address, and the group information to which it belongs.

[0149] The initial partition configuration information is evenly divided according to the physical address mapping table to obtain a balanced partition configuration scheme. The balanced division process takes into account the distribution of high-frequency erase groups and low-frequency erase groups, and evenly distributes high-frequency erase blocks to each partition to ensure that each partition contains a similar number of high-frequency erase blocks and low-frequency erase blocks. The balanced partition configuration scheme includes the number of partitions and the starting and ending physical block addresses of each partition.

[0150] The free space calculation is performed for each partition in the balanced partition configuration scheme to obtain the partition free space list. The free space calculation considers the total number of physical blocks, the number of used blocks, and the number of bad blocks in each partition to obtain the actual free space size of each partition. The partition free space list contains the partition identifier and the corresponding free space size.

[0151] According to the partition free space list, the physical blocks are sorted and analyzed for space utilization to obtain the target partition list. The space utilization sorting analysis calculates the space utilization of each partition and sorts them from low to high according to the utilization to form the target partition list. The target partition list contains the partition identifier and the corresponding space utilization.

[0152] A cross comparison is performed based on the target partition list and the physical address mapping table to obtain a candidate write block set. The cross comparison process is performed based on the target partition list and the physical address mapping table to obtain a candidate write block set. The cross comparison process selects the partition with the lowest space utilization, and filters out the available physical blocks from the physical address mapping table of the partition to form a candidate write block set. The candidate write block set contains the physical block identifier, the partition to which it belongs, and the current erase and write count information.

[0153] The candidate write block set is screened by the number of erases and writes to obtain the target write block position. The erase number screening process selects the physical block with the lowest erase number from the candidate write block set as the target write block according to the preset upper limit of the erase number. If there are multiple physical blocks with the same lowest erase number, one of them can be randomly selected as the target write block position. The target write block position contains the physical block identifier, the partition to which it belongs, and the specific physical address information.

[0154] This embodiment realizes adaptive partition cyclic storage by comprehensively analyzing and processing the physical block erase data of the flash memory device, and effectively balances the service life and storage performance of the flash memory device. The method takes into account multiple factors such as the erase and write times distribution of the physical block, partition balance and space utilization, and extends the overall life of the flash memory device by selecting the physical block with a low erase and write times as the write target. At the same time, the balanced partition configuration ensures the effective use of storage space and improves the overall performance of the device. This embodiment forms a complete data analysis and decision chain, and each step from the physical block erase data statistics to the determination of the target write block position is closely connected, ensuring the consistency and effectiveness of the method. This adaptive method can dynamically adjust the storage strategy according to the actual use of the flash memory device, and is suitable for various types of flash memory application scenarios, especially for applications with frequent writes and large data volumes.

[0155] In an embodiment, storage planning analysis is performed on the target storage partition and the target write block location according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment scheme, including:

[0156] The target storage partition is divided into parallel units to obtain multiple flash parallel units. The division process considers the physical structure, internal organization and controller capability of the flash chip and divides the storage partition into parallel units of equal size. Each parallel unit contains a certain number of erase blocks to facilitate subsequent parallel operations. The hardware characteristics of the flash chip, such as the number of channels and the number of chip selection lines, are fully considered during the division to ensure that the divided parallel units can maximize the use of the hardware parallel capability.

[0157] Perform one-time programming characteristic analysis on multiple flash parallel cells to obtain programming status information of each flash parallel cell. The analysis process includes writing test on each parallel cell, recording page writing speed and error rate, and evaluating data retention and erasure characteristics. Combining this information, generate programming status information for each parallel cell, including indicators such as writing speed, error rate, data stability and wear degree.

[0158] The availability of multiple flash parallel units is evaluated based on the programming status information to obtain a list of available parallel units. The evaluation process sets availability thresholds, including the maximum allowable error rate, the minimum write speed, and the maximum wear degree. The programming status information of each parallel unit is compared with these thresholds, and the parallel units that meet the requirements are marked as available, and some parallel units that do not meet the requirements are downgraded or marked as unavailable.

[0159] The written data is divided into logical pages to obtain multiple logical data pages. The division process determines the logical page size according to the physical page size of the flash memory chip, which is usually an integer multiple of the physical page size. Starting from the starting position of the data stream, the data is divided in sequence according to the determined logical page size to form multiple logical data pages. For the last data that may not be a complete logical page, fill it with padding data. Each logical data page is assigned a unique identifier for subsequent processing.

[0160] Perform data correlation analysis on multiple logical data pages to obtain a data correlation matrix. During the analysis process, select an appropriate correlation analysis algorithm, such as cosine similarity or Jaccard coefficient, and apply the selected algorithm to calculate the correlation for each pair of logical data pages. Organize the calculation results into an N×N matrix, where N is the number of logical data pages and the matrix elements represent the correlation between the corresponding two data pages. Normalize the matrix so that the correlation values ​​fall within a uniform range.

[0161] Multiple logical data pages are allocated according to the data correlation matrix and the list of available parallel units to obtain a preliminary data allocation plan. The allocation process first clusters the logical data pages according to the correlation matrix and groups the highly correlated data pages. The performance characteristics of each available parallel unit are evaluated, and the data page groups are allocated to the parallel units using a greedy algorithm or dynamic programming method, while considering load balancing and performance optimization. When allocating, try to allocate highly correlated data pages to the same parallel unit.

[0162] Finally, a preliminary data allocation plan is generated, which includes the target storage location of each logical data page.

[0163] Perform a one-time programming capacity assessment on the target write block location to obtain a block capacity index. The assessment process performs a write test on each target write block, recording the number of pages that were successfully written and the number of pages with errors. Analyze the distribution of bad pages within each block and calculate the proportion of valid pages. Consider the characteristics of one-time programming and assess the reliability of each page under different programming states. Based on this information, calculate a capacity index for each block to reflect the actual available capacity and write reliability of the block. Summarize these block capacity indicators to form a comprehensive report to guide subsequent data allocation optimization.

[0164] The preliminary data allocation plan is adjusted according to the block capacity index to obtain the optimized data allocation plan. The adjustment process first checks whether the actual available capacity of each block meets the data volume requirements allocated to it. If the capacity of a block is insufficient, the data on the block is reallocated. Considering the write reliability of the block, important or frequently accessed data is allocated to blocks with high reliability. According to the actual capacity and performance characteristics of the block, the data allocation plan is adjusted, which may involve regrouping of data pages or migration between parallel units. During the adjustment process, data relevance is still considered, and the physical proximity of related data is maintained as much as possible. Finally, an optimized data allocation plan is generated, which not only meets the data storage requirements, but also makes better use of the actual capacity and performance characteristics of each block.

[0165] Perform read parallelism analysis on the optimized data allocation scheme to obtain a parallel read index. The analysis process simulates typical read operation modes, including sequential read and random read, based on the data allocation scheme. Calculate the number of parallel units that can be activated simultaneously in each read mode to reflect the parallelism of the read operation. Consider data correlation and analyze whether the related data is distributed in units that can be accessed in parallel. Based on these analyses, calculate a comprehensive parallel read index that reflects the overall parallel performance of the data allocation scheme in read operations. Compare this index with the preset performance target to determine whether the current scheme meets the requirements.

[0166] The optimized data allocation scheme is partitioned and adjusted according to the parallel read index to obtain the initial partition adjustment scheme. The adjustment process first identifies areas with poor parallel read performance, which may be caused by the dispersion of related data in different parallel units. Try to reorganize the data allocation in these areas, which may involve the exchange or movement of data pages between parallel units. During the adjustment process, balance the read parallelism and write performance to ensure that the adjustment does not significantly reduce the write efficiency. Perform parallel read analysis on the adjusted scheme again to verify the performance improvement. If the performance improvement is not obvious or new bottlenecks appear, multiple iterative adjustments may be required. Finally, when satisfactory parallel read performance is achieved, the final initial partition adjustment scheme is generated.

[0167] In one embodiment, the access frequency of the written data is analyzed to obtain the corresponding data importance information, and the priority of the data importance information is evaluated based on the physical block erase data to obtain the corresponding dynamic partition information, including:

[0168] The written data is divided into time windows to obtain multiple time window units. During the time window division process, the appropriate time window size is preset according to the system characteristics and data access pattern. The selection of the time window size affects the granularity and accuracy of data analysis. Smaller windows can capture more subtle changes in access patterns, but will increase computing overhead; larger windows can reduce computing burden, but may ignore short-term access pattern fluctuations.

[0169] The access count of the written data in each time window unit is counted to obtain the corresponding access frequency data. The access count statistics process uses an efficient data structure to record the access status of each piece of data. For data spanning multiple time windows, a time decay factor is introduced so that the access records in the more recent time windows have a higher weight. This method not only takes into account the historical access pattern, but also can timely reflect the changing trend of data access frequency.

[0170] Sort the written data by importance according to the access frequency data to obtain a preliminary data importance list. In the importance sorting process, factors such as data access frequency, data size, and data type are comprehensively considered to design a reasonable importance scoring algorithm. The scoring algorithm needs to balance the influence of various factors to ensure that the importance sorting can accurately reflect the actual value of the data in the system.

[0171] The preliminary data importance list is mapped to data blocks according to the physical block erase data to obtain a data block importance mapping table. During the data block mapping process, the data items are associated with the physical blocks in which they are located, and the number of erases and writes of the physical blocks is considered. By comprehensively evaluating the data importance and the physical block life, the comprehensive importance score of each data block is calculated. This method considers both the logical importance of the data and the physical characteristics of the flash memory device, which helps to extend the life of the flash memory device.

[0172] The flash memory device is virtualized and partitioned according to the data block importance mapping table to obtain dynamic partition information. During the virtual partitioning process, the importance levels and their corresponding scoring ranges are defined, and the data blocks are divided into different importance levels according to their comprehensive importance scores. Based on the distribution of importance levels, a dynamic partitioning strategy is designed, such as allocating more storage space or better physical blocks to high-importance data. The dynamic partitioning strategy needs to strike a balance between storage efficiency and data protection, and can be adjusted in time as the importance of data changes.

[0173] This embodiment can accurately capture the actual usage pattern of data and realize the precise allocation of storage resources by dividing the write data into time windows and analyzing the access frequency. The data importance sorting mechanism based on access frequency ensures that high-frequency access data obtains better storage resources and improves the overall access efficiency of the system. Through the comprehensive evaluation of physical block erase data and data importance, while ensuring data access performance, the service life of each physical block of the flash memory device is effectively balanced, extending the overall service life of the device. The use of dynamic partitioning strategy enables the storage system to adjust the partition configuration in time according to the changes in data importance, which not only improves the utilization efficiency of storage space, but also enhances the system's adaptability to changes in data access patterns.

[0174] In one embodiment, the initial partition adjustment scheme and the dynamic partition information are comprehensively processed according to a preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy, including:

[0175] Establish a complex storage optimization framework to conduct in-depth analysis and precise control of the storage characteristics of flash memory devices through the Dynamic-FTL algorithm. In the data access frequency analysis stage, a multi-dimensional hot data identification strategy is adopted. By building a fine-grained access tracking model, the read and write frequency, access time interval and access mode of data blocks are continuously monitored, and hot data thresholds are set. When the access frequency of a data block exceeds the preset threshold, it is marked as hot data and a detailed hot data distribution information map is generated. The preset rules for hot data identification include: the access frequency is more than 2 times the average level, the access interval is less than the preset time threshold, and it is concentrated in a specific time period.

[0176] In the initial partition structure feature extraction stage, the internal microstructure of the partition is deeply analyzed. A multi-dimensional feature vector is established, including indicators such as the uniformity of data distribution between blocks, the difference in the number of erase and write times between blocks, and the degree of data type aggregation. The feature extraction algorithm is based on a machine learning model and adaptively captures the storage characteristics of flash memory devices. The preset structural feature extraction rules include: the variance between data blocks does not exceed the predetermined threshold, the standard deviation of the number of erase and write times is controlled within a specific range, and the aggregation coefficient of the same type of data meets the predetermined conditions.

[0177] As a key technical link, the dynamic mapping algorithm comprehensively considers the hot data distribution information and the initial partition structure data. The mapping model not only realizes the accurate mapping of logical block addresses to physical block addresses, but also introduces multi-layer mapping weights. The preset mapping calculation rules include: establishing a probability-based mapping weight model, setting a mapping conversion overhead threshold, and ensuring the minimum number of hops in the mapping path.

[0178] The hybrid mapping table generation stage integrates page-level and block-level mapping methods. Page-level mapping provides precise address positioning, and block-level mapping reduces the storage overhead of the mapping table. The hybrid mapping table adopts an adaptive weight allocation mechanism to dynamically adjust the page-level and block-level mapping ratios according to the real-time storage load. The preset rules include: the sum of the page-level mapping weight and the block-level mapping weight is 1, the weight allocation is dynamically adjusted according to the access frequency, and the overall storage overhead of the mapping table is ensured not to exceed the predetermined threshold.

[0179] Wear leveling is a key strategy to extend the life of flash memory devices. By dynamically monitoring the number of erases and writes to each physical block, a heat map of erase and write times is constructed. When the number of erases and writes to certain blocks is significantly higher than the average level, the inter-block data relocation mechanism is triggered. The preset wear leveling rules include: setting the maximum difference threshold of the number of erases and writes between blocks, defining the critical value of the number of erases and writes that triggers relocation, and formulating the optimal path algorithm for data relocation.

[0180] The intelligent garbage collection mechanism is based on data fragmentation and space utilization analysis. It evaluates the validity, expiration and migration cost of data blocks and formulates data sorting plans. The preset garbage collection rules include: defining the data block validity judgment criteria, setting the data migration cost calculation model, and determining the garbage collection trigger conditions.

[0181] Virtual reorganization of physical blocks is the core of storage performance optimization. Logical reorganization of physical blocks is achieved by building a virtual partition mapping table. The reorganization algorithm is based on multi-dimensional features such as data relevance, access frequency, and wear degree. The preset virtual reorganization rules include: defining data block relevance evaluation indicators, setting access frequency weight coefficients, and formulating wear degree compensation mechanisms.

[0182] Load balancing evaluates the load distribution of virtual partitions by calculating the load balancing index. The load balancing algorithm introduces entropy increase theory and information theory model to quantify the load difference between partitions. The preset rules include: defining the load balancing entropy value calculation method, setting the load difference threshold, and formulating the partition dynamic adjustment strategy.

[0183] Partitioning scheme optimization generates multiple sets of candidate schemes and conducts strict performance screening. The screening process adopts a multi-objective optimization model, which comprehensively considers dimensions such as read and write performance, energy consumption, and reliability. The preset rules include: establishing a multi-objective evaluation index system, setting performance screening thresholds, and determining the optimal scheme selection mechanism.

[0184] Based on the write optimization strategy and the dynamic adjustment mapping table, the global storage state is optimized. By establishing a multi-dimensional, dynamically adaptive optimization model, the overall optimization of the flash storage system performance, life and reliability is achieved. The preset rules include: defining the global optimization objective function, setting the minimum increment of performance improvement, and establishing a dynamic adjustment feedback mechanism.

[0185] This embodiment realizes intelligent optimization of the global storage state by using the Dynamic-FTL algorithm for adaptive partition cyclic storage of flash memory. The multi-dimensional hot data recognition model constructed by the system accurately captures data access characteristics and effectively improves the access efficiency of hot data. The feature extraction algorithm based on machine learning deeply analyzes the partition microstructure, so that the adaptability of the storage system to device characteristics is significantly enhanced. The dynamic mapping algorithm integrates multi-layer mapping weights, reduces address conversion overhead, and improves system response speed. The adaptive hybrid mapping mechanism balances positioning accuracy and storage overhead and optimizes system resource utilization. Intelligent wear leveling and garbage collection strategies effectively extend the life of flash memory and improve device reliability. Virtual reorganization and load balancing mechanisms significantly improve storage performance and achieve balanced allocation of system resources. Multi-objective optimization partition scheme screening ensures the overall improvement of system performance, so that the flash storage system can achieve overall optimization in terms of performance, life and reliability.

[0186] This embodiment realizes intelligent optimization of the global storage state by using the Dynamic-FTL algorithm for adaptive partition cyclic storage of flash memory. The multi-dimensional hot data recognition model constructed by the system accurately captures data access characteristics and effectively improves the access efficiency of hot data. The feature extraction algorithm based on machine learning deeply analyzes the partition microstructure, so that the adaptability of the storage system to device characteristics is significantly enhanced. The dynamic mapping algorithm integrates multi-layer mapping weights, reduces address conversion overhead, and improves system response speed. The adaptive hybrid mapping mechanism balances positioning accuracy and storage overhead and optimizes system resource utilization. Intelligent wear leveling and garbage collection strategies effectively extend the life of flash memory and improve device reliability. Virtual reorganization and load balancing mechanisms significantly improve storage performance and achieve balanced allocation of system resources. Multi-objective optimization partition scheme screening ensures the overall improvement of system performance, so that the flash storage system can achieve overall optimization in terms of performance, life and reliability.

[0187] In one embodiment, address mapping calculation is performed on the initial partition structure data and the hot data distribution information according to a preset dynamic mapping algorithm to obtain an initial mapping table of corresponding logical block addresses to physical block addresses, including:

[0188] The calculation of data heat weight is the basic part of the algorithm. Through in-depth analysis of data blocks, the weight calculation model comprehensively considers the access frequency, access time interval and spatial correlation of data blocks. Specifically, data blocks that have been frequently accessed recently will receive higher weights, while the weights of data blocks that have been idle for a long time will gradually decrease according to the exponential decay law. The weight calculation follows the principle of balance to ensure that the weight matrix can accurately reflect the actual access characteristics of the data blocks.

[0189] As a key step of the algorithm, hot zone partitioning intelligently partitions the initial partition structure data based on the hot data weight matrix. Multiple constraints are set in the partitioning process, including weight threshold, data block distribution density, and physical characteristics of the storage medium. High-weight data blocks will be gathered into specific areas to form a hot zone distribution map. Hot zone partitioning not only optimizes the data storage location, but also provides an important basis for subsequent address mapping, effectively reducing data access latency.

[0190] Logical address space partitioning further refines the storage management granularity. According to the hot zone distribution map, the logical address space is divided into multiple logical segments, each with different heat characteristics and access patterns. The partitioning algorithm sets complex evaluation indicators, including data block weight distribution, access pattern characteristics, and reserved performance margin. The refined logical address space distribution enables more accurate management and scheduling of data blocks.

[0191] Physical block address grouping is the core of the mapping algorithm. A comprehensive evaluation is performed on the available physical blocks, and grouping is performed based on multi-dimensional indicators such as the health of the blocks, the number of historical erases and writes, and the expected life span. The grouping algorithm follows the principles of balance and reliability to ensure that the performance and life span distribution of the physical block address group are consistent. Through intelligent physical block grouping, excessive wear of a single physical block can be effectively avoided, extending the overall service life of the storage medium.

[0192] Dynamic mapping calculation adopts a multi-level and multi-dimensional evaluation strategy. First, the free blocks of the physical block address group are identified, and a priority free block list is generated according to the preset health assessment model. The heat sorting of the logical address space distribution table is performed simultaneously to obtain a heat sorted logical address list. The mapping relationship is generated based on the one-to-one correspondence principle between the priority free block list and the heat sorted logical address list, and a preliminary mapping relationship is established through a complex matching algorithm.

[0193] To ensure a dynamic balance between storage performance and life, the algorithm introduces a load balancing calculation model. This model dynamically adjusts the initial mapping relationship in multiple rounds, taking into account the degree of wear of physical blocks, the access popularity of data blocks, and the overall load. Through iterative optimization, a mapping relationship table that can adapt to the dynamic storage environment is finally generated, effectively balancing storage performance and device life.

[0194] The generation of mapping rule sets is the final stage of the algorithm. Based on the dynamic mapping relationship table, the mapping rules from logical block addresses to physical block addresses are constructed. To improve the accuracy and storage efficiency of mapping, the algorithm performs a strict conflict detection and optimization process. By identifying and eliminating potential address conflicts and mapping anomalies, a highly reliable optimized mapping rule set is finally generated, and the initial mapping table is generated based on the optimized mapping rule set.

[0195] This embodiment realizes intelligent scheduling of storage resources by deeply analyzing the popularity of data blocks and finely dividing the logical address space. By evaluating the physical block address in multiple dimensions, the wear degree of the storage medium is effectively balanced, and the service life of the equipment is extended. The introduction of the load balancing calculation model enables the storage system to dynamically adapt to complex data access environments, significantly optimizing the performance and reliability of the storage medium while ensuring efficient access.

[0196] Reference Figure 2 As shown, the present invention also provides an adaptive partitioning cyclic storage device applicable to a flash memory, which is applied to any one of the above-mentioned adaptive partitioning cyclic storage methods applicable to a flash memory, comprising:

[0197] The acquisition module is used to obtain the device parameter set and partition rule information of the flash memory device, and to divide the device parameter set into logical partitions based on the partition rule information to obtain the corresponding initial partition configuration information;

[0198] An analysis module, the analysis module is used to obtain a type identifier and cache mapping data of the written data, associate the type identifier with the cache mapping data, and obtain a corresponding target storage partition;

[0199] An association module, the association module is used to obtain physical block erase data of the flash memory device, perform a balanced analysis on the initial partition configuration information according to the physical block erase data, and obtain a corresponding target write block position;

[0200] A processing module, the processing module is used to perform storage planning analysis on the target storage partition and the target write block position according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment plan;

[0201] A control module, the control module is used to analyze the access frequency of the written data to obtain the corresponding data importance information, and to evaluate the priority of the data importance information based on the physical block erase data to obtain the corresponding dynamic partition information;

[0202] The execution module is used to comprehensively process the initial partition adjustment plan and the dynamic partition information according to the preset Dynamic-FTL algorithm to obtain the corresponding global storage optimization strategy.

[0203] The present invention provides an adaptive partitioning cyclic storage device suitable for flash memory. By comprehensively analyzing the flash memory device parameters and partitioning rules, combined with data type information, it can more accurately evaluate the storage requirements of different types of data, thereby improving the rationality of storage space allocation and providing a more reliable basis for flash memory management. By associating and analyzing the write data with the cache mapping data, refined management of different types of data is achieved, which helps to allocate storage space on demand and avoid space waste. Balanced analysis of partition configuration based on physical block erase data can ensure that the flash memory device can operate efficiently under different write intensities, reduce unnecessary erase operations, and extend the life of the flash memory. By comprehensively analyzing the data access frequency and physical block erase conditions, a more reasonable dynamic partitioning strategy is formulated, and the optimized operation of the entire system is achieved through a global storage optimization strategy, thereby effectively utilizing storage resources and improving the overall performance of the flash memory device. At the same time, by considering the impact of data importance on the storage strategy, the storage management strategy can be flexibly adjusted according to the characteristics of different data and demand changes, so that the system is more adaptable to diverse storage scenarios.

[0204] It should be noted that technicians in the relevant technical field can clearly understand that for the convenience and conciseness of description, the specific working process of the system and each module described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0205] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An adaptive partition cyclic storage method suitable for flash memory, characterized in that: include: Acquire a device parameter set and partition rule information of a flash memory device, and divide the device parameter set into logical partitions based on the partition rule information to obtain corresponding initial partition configuration information; Acquire a type identifier and cache mapping data of the write data, associate the type identifier with the cache mapping data, and obtain a corresponding target storage partition; Acquire physical block erase data of the flash memory device, and perform a balanced analysis on the initial partition configuration information according to the physical block erase data to obtain a corresponding target write block position; Performing storage planning analysis on the target storage partition and the target write block position according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment plan; Performing access frequency analysis on the write data to obtain corresponding data importance information, and performing priority evaluation on the data importance information based on the physical block erase data to obtain corresponding dynamic partition information; Comprehensively processing the initial partition adjustment scheme and the dynamic partition information according to a preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy; The initial partition adjustment scheme and the dynamic partition information are comprehensively processed according to the preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy, including: Access frequency data of the dynamic partition information, identify hot data, and obtain corresponding hot data distribution information; Extracting partition structure features from the initial partition adjustment scheme to obtain initial partition structure data; Performing address mapping calculation on the initial partition structure data and the hot data distribution information according to a preset dynamic mapping algorithm to obtain an initial mapping table of corresponding logical block addresses to physical block addresses; Performing page-level mapping and block-level mapping hybrid processing on the initial mapping table to obtain a corresponding hybrid mapping table; Performing wear leveling processing on the hybrid mapping table according to the physical block erasure data to obtain a corresponding balanced write strategy; Based on the balanced writing strategy, an intelligent garbage collection mechanism is generated to obtain a corresponding data sorting solution; Performing virtual reorganization of physical blocks on the flash memory device according to the data arrangement scheme to generate a virtual partition mapping table; Calculate the load balancing index according to the virtual partition mapping table to obtain the load distribution; Performing iterative partition optimization on the virtual partition mapping table according to the load distribution to obtain a set of candidate partition schemes; Performing performance screening on the candidate partitioning scheme set to obtain a final partitioning configuration scheme; Update the FTL mapping table according to the final partition configuration scheme, and generate a corresponding data migration plan; Performing write amplification analysis on the data migration plan to obtain a corresponding write optimization strategy; Based on the write optimization strategy, the hybrid mapping table is updated to obtain a corresponding dynamic adjustment mapping table; A global storage state optimization analysis is performed based on the write optimization strategy and the dynamic adjustment mapping table to obtain the global storage optimization strategy.

2. The adaptive partition cyclic storage method applicable to flash memory according to claim 1, characterized in that: The step of acquiring a device parameter set and partition rule information of a flash memory device, and performing logical partition division on the device parameter set based on the partition rule information to obtain corresponding initial partition configuration information includes: Collecting physical characteristic parameters of the flash memory device to obtain the device parameter set including total storage capacity, block size and page size; Calculating available space of the flash memory device according to the device parameter set to obtain effective storage capacity data; Accessing a preset partition rule library to extract partition rule information matching the effective storage capacity data; According to the partition rule information, the effective storage capacity data is divided and calculated to obtain an initial logical partition scheme; Initializing an address mapping table for each partition in the initial logical partitioning scheme to obtain corresponding address mapping data; The initial logical partition scheme is associated with the address mapping data to generate initial partition configuration information.

3. The adaptive partition cyclic storage method applicable to flash memory according to claim 1, characterized in that: The step of obtaining a type identifier and cache mapping data of the write data, and associating the type identifier with the cache mapping data to obtain a corresponding target storage partition includes: Performing type identification on the written data to obtain the type identifier; Classify the written data according to the type identifier to obtain corresponding data category information; Performing feature distribution analysis on the data category information to obtain corresponding data distribution features; Perform query processing on the cache mapping table according to the data distribution characteristics to obtain corresponding cache mapping data; Mapping and matching the type identifier and the cache mapping data to obtain a corresponding initial mapping relationship; Performing available block traversal processing on the flash memory device according to the initial mapping relationship to obtain a corresponding available block list; Performing space allocation analysis on the available block list to obtain a corresponding block combination scheme; Optimize the initial mapping relationship according to the block combination scheme to obtain a corresponding target mapping relationship; The target mapping relationship is divided into storage areas to obtain corresponding target storage partitions.

4. The adaptive partition cyclic storage method applicable to flash memory according to claim 1, characterized in that: The obtaining of physical block erase data of the flash memory device, and performing a balanced analysis on the initial partition configuration information according to the physical block erase data to obtain a corresponding target write block position, includes: Performing statistics on the number of physical block erasures and writes on the flash memory device to obtain the physical block erasure data of each physical block; Classify and sort the physical blocks according to the erase data of the physical blocks to obtain an erase times distribution diagram; Performing data analysis on the erase / write times distribution graph to obtain an erase / write times threshold; The physical blocks are grouped according to the erasure number threshold to obtain a high-frequency erasure group and a low-frequency erasure group; Performing address mapping on the physical blocks in the high-frequency erasing group and the low-frequency erasing group to obtain a physical address mapping table; Evenly divide the initial partition configuration information according to the physical address mapping table to obtain an even partition configuration scheme; Calculating the available space for each partition in the balanced partition configuration scheme to obtain a partition available space list; According to the partition available space list, the space utilization of the physical blocks is sorted and analyzed to obtain a target partition list; Perform a cross comparison based on the target partition list and the physical address mapping table to obtain a candidate write block set; The candidate write block set is screened by the number of times of erasure to obtain the target write block position.

5. The adaptive partition cyclic storage method applicable to flash memory according to claim 1, characterized in that: The performing storage planning analysis on the target storage partition and the target write block position according to the preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment scheme includes: Dividing the target storage partition into parallel units according to the one-time programming-aware data allocation algorithm to obtain a plurality of flash memory parallel units; Performing a one-time programming characteristic analysis on a plurality of the flash memory parallel units to obtain programming state information of each of the flash memory parallel units; Performing availability evaluation on the plurality of flash memory parallel units according to the programming state information to obtain an available parallel unit list; Dividing the written data into logical pages to obtain a plurality of logical data pages; Performing data correlation analysis on the multiple logical data pages to obtain a data correlation matrix; Allocate the plurality of the logical data pages according to the data relevance matrix and the available parallel unit list to obtain a preliminary data allocation plan; Performing a one-time programming capacity evaluation on the target write block position to obtain a block capacity indicator; Adjusting the preliminary data allocation plan according to the block capacity indicator to obtain an optimized data allocation plan; Performing a read parallelism analysis on the optimized data allocation scheme to obtain a parallel read index; The optimized data allocation scheme is partitioned and adjusted according to the parallel reading index to obtain the initial partition adjustment scheme.

6. The adaptive partition cyclic storage method applicable to flash memory according to claim 1, characterized in that: The step of performing access frequency analysis on the write data to obtain corresponding data importance information, and performing priority evaluation on the data importance information based on the physical block erase data to obtain corresponding dynamic partition information includes: Dividing the written data into time windows to obtain a plurality of time window units; Counting the number of accesses to the written data in each of the time window units to obtain corresponding access frequency data; Sort the write data by importance according to the access frequency data to obtain a preliminary data importance list; Performing data block mapping on the preliminary data importance list according to the physical block erase data to obtain a data block importance mapping table; The flash memory device is divided into virtual partitions according to the data block importance mapping table to obtain the dynamic partition information.

7. The adaptive partition cyclic storage method applicable to flash memory according to claim 1, characterized in that: The address mapping calculation is performed on the initial partition structure data and the hot data distribution information according to a preset dynamic mapping algorithm to obtain an initial mapping table of corresponding logical block addresses to physical block addresses, including: Performing heat weight calculation on the heat data distribution information to obtain a heat data weight matrix; Performing hot zone division on the initial partition structure data according to the hot data weight matrix to obtain a hot zone distribution map; Performing logical address space division on the hot zone distribution map to obtain a logical address space distribution table; Grouping physical block addresses according to the logical address space distribution table to obtain physical block address groups; Perform dynamic mapping calculation on the physical block address group to obtain a dynamic mapping relationship table, wherein the dynamic mapping calculation includes: Identifying and prioritizing free blocks of the physical block address group to obtain a priority free block list; Performing logical address heat sorting on the logical address space distribution table to obtain a heat sorted logical address list; Perform one-to-one mapping according to the priority free block list and the heat sorted logical address list to obtain a preliminary mapping relationship; Performing load balancing calculation adjustment on the preliminary mapping relationship to obtain a dynamic mapping relationship table; Generate a mapping rule from a logical block address to a physical block address according to the dynamic mapping relationship table to obtain a mapping rule set; Performing conflict detection optimization on the mapping rule set to obtain an optimized mapping rule set; The initial mapping table is generated according to the optimized mapping rule set.

8. An adaptive partitioned cyclic storage device suitable for flash memory, characterized in that: The adaptive partitioned cyclic storage method applicable to a flash memory as applied to any one of claims 1 to 7 above comprises: A collection module, the collection module is used to obtain a device parameter set and partition rule information of a flash memory device, and to divide the device parameter set into logical partitions based on the partition rule information to obtain corresponding initial partition configuration information; An analysis module, the analysis module is used to obtain a type identifier and cache mapping data of the write data, associate the type identifier with the cache mapping data, and obtain a corresponding target storage partition; An association module, the association module is used to obtain physical block erase data of the flash memory device, and perform a balanced analysis on the initial partition configuration information according to the physical block erase data to obtain a corresponding target write block position; A processing module, the processing module is used to perform storage planning analysis on the target storage partition and the target write block position according to a preset one-time programming-aware data allocation algorithm to obtain a corresponding initial partition adjustment plan; A control module, the control module is used to perform access frequency analysis on the write data to obtain corresponding data importance information, and perform priority evaluation on the data importance information based on the physical block erase data to obtain corresponding dynamic partition information; An execution module, wherein the execution module is used to perform comprehensive processing on the initial partition adjustment scheme and the dynamic partition information according to a preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy; The initial partition adjustment scheme and the dynamic partition information are comprehensively processed according to the preset Dynamic-FTL algorithm to obtain a corresponding global storage optimization strategy, including: Access frequency data of the dynamic partition information, identify hot data, and obtain corresponding hot data distribution information; Extracting partition structure features from the initial partition adjustment scheme to obtain initial partition structure data; Performing address mapping calculation on the initial partition structure data and the hot data distribution information according to a preset dynamic mapping algorithm to obtain an initial mapping table of corresponding logical block addresses to physical block addresses; Performing page-level mapping and block-level mapping hybrid processing on the initial mapping table to obtain a corresponding hybrid mapping table; Performing wear leveling processing on the hybrid mapping table according to the physical block erasure data to obtain a corresponding balanced write strategy; Based on the balanced writing strategy, an intelligent garbage collection mechanism is generated to obtain a corresponding data sorting solution; Performing virtual reorganization of physical blocks on the flash memory device according to the data arrangement scheme to generate a virtual partition mapping table; Calculate the load balancing index according to the virtual partition mapping table to obtain the load distribution; Performing iterative partition optimization on the virtual partition mapping table according to the load distribution to obtain a set of candidate partition schemes; Performing performance screening on the candidate partitioning scheme set to obtain a final partitioning configuration scheme; Update the FTL mapping table according to the final partition configuration scheme, and generate a corresponding data migration plan; Performing write amplification analysis on the data migration plan to obtain a corresponding write optimization strategy; Based on the write optimization strategy, the hybrid mapping table is updated to obtain a corresponding dynamic adjustment mapping table; A global storage state optimization analysis is performed based on the write optimization strategy and the dynamic adjustment mapping table to obtain the global storage optimization strategy.

Citation Information

Patent Citations

  • Flash memory and method and system for automatically separating cold and hot data based on same

    CN102902628A

  • Method and Apparatus for Providing Wear Leveling to Non-Volatile Memory with Limited Program Cycles Using Flash Translation Layer

    US20170010810A1