Page continuity optimization method, apparatus, storage control chip and medium

CN122575443APending Publication Date: 2026-08-14SHENZHEN SANDIYIXIN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-14

AI Technical Summary

Benefits of technology

[0040]本技术方案通过剔除孤立页和/或孤立页段,让Flash的块的页模板尽可能连续,主控在固件中加载该地址连续的页模板时,仅在连续有效页区间内执行读写、擦除、垃圾回收,禁止访问孤立页与孤立页段,减少页跳转与干扰,以达到提高Flash稳定性的目的。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122575443A_ABST
    Figure CN122575443A_ABST
Patent Text Reader

Abstract

This invention discloses a page continuity optimization method, apparatus, storage control chip, and medium. The method includes: performing read / write verification on the Flash memory; reading the number of error bits for each page of the Flash memory and generating a page template based on a configured error correction threshold; processing the page template according to page address continuity criteria, identifying and removing isolated pages and / or isolated page segments from the page template according to preset conditions to obtain a first new page template; performing mass production operations on the Flash memory using the first new page template; if the Flash memory meets the mass production conditions, it is produced based on the current mass production specifications; if the Flash memory does not meet the mass production conditions, the process ends; wherein the mass production conditions include sufficient compatibility and passing comparative tests. By removing isolated pages and / or isolated page segments, the page templates of Flash memory blocks are made as continuous as possible, and read / write, erase, and garbage collection are performed within continuous valid page intervals, prohibiting access to isolated pages and isolated page segments, reducing page jumps and interference, thereby improving Flash memory stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flash memory technology, specifically to a page continuity optimization method, apparatus, memory controller chip, and medium. Background Technology

[0002] With the continuous iteration of NAND Flash (hereinafter referred to as Flash) storage technology, 3D stacking technology has become the mainstream application direction. As the number of Flash stacking layers continues to increase, its storage capacity, number of blocks, and number of pages also increase significantly. Currently, Flash products with more pages per block than the number of blocks have appeared on the market. Flash storage capacity and stability are negatively correlated: the larger the capacity, the lower the storage stability; the smaller the capacity, the relatively higher the stability. Therefore, while 3D stacking technology significantly improves Flash capacity, it also exacerbates its stability issues.

[0003] The current industry standard for improving Flash memory stability is to use a wordline strategy to remove abnormal pages, including unstable pages, bad pages, and pages adjacent to bad pages, thereby reducing the impact of abnormal pages on overall reliability. However, this approach has a significant technical flaw: it does not address the issue of page address contiguity. After removing abnormal pages, a large number of orphaned pages can easily be generated within a block. This forces the memory controller chip to frequently jump between non-contiguous physical page addresses during read and write operations. When such page jumps accumulate in large numbers, they significantly exacerbate inter-page interference, ultimately reducing the overall stability of the Flash memory. Summary of the Invention

[0004] The purpose of this invention is to provide a page continuity optimization method, apparatus, storage control chip, and medium that can eliminate isolated pages within Flash memory, ensure page address continuity during read and write operations, and improve the overall stability of Flash memory.

[0005] The first aspect of this application provides a page continuity optimization method, comprising:

[0006] Perform read / write verification on the Flash memory;

[0007] Read the number of error bits for each page of Flash, combine it with the configured error correction threshold, and generate a page template;

[0008] The page template is processed according to the page address continuity criterion, and isolated pages and / or isolated page segments in the page template are identified and removed according to preset conditions to obtain a first new page template;

[0009] The Flash is mass-produced using the first new page template. If the Flash meets the mass production conditions, it is produced based on the current mass production specifications. If the Flash does not meet the mass production conditions, the process ends. The mass production conditions include sufficient compatibility and passing the comparative test.

[0010] Furthermore, in one preferred embodiment, if the Flash does not meet the mass production conditions, the method further includes:

[0011] The page template is processed according to the configured page segment length threshold, the page template is divided into multiple page segment intervals, and the page segment intervals containing abnormal pages are removed to obtain a second new page template;

[0012] The Flash is mass-produced using the second new page template. If the Flash meets the mass production conditions, it is produced based on the current mass production specifications; if the Flash does not meet the mass production conditions, the process ends.

[0013] Further, in one preferred embodiment, the page address continuity criterion includes:

[0014] Read the page address of each page;

[0015] Determine whether the adjacent pages of the current page are abnormal pages and whether the page addresses of the current page and the adjacent pages are consecutive. If yes, then the current page is determined to be an orphan page; otherwise, then the current page is determined not to be an orphan page.

[0016] Determine whether the left adjacent page of the current page segment's header is an abnormal page, whether the right adjacent page of the current page segment's tail is an abnormal page, and whether the page addresses of the pages within the current page segment are consecutive. If yes, then the current page segment is determined to be an isolated page segment; otherwise, the current page segment is determined not to be an isolated page segment.

[0017] Furthermore, in one preferred embodiment, after processing the page template according to a configured page segment length threshold and dividing the page template into multiple page segment intervals, the method further includes:

[0018] If the page template cannot be divided into an integer multiple of the page segment intervals according to the page segment length threshold, the remaining pages are processed in the following way:

[0019] Based on the determination that at least one of the remaining pages is an abnormal page, all the remaining pages are directly removed; or

[0020] Based on the determination that all remaining pages are normal pages, it is determined whether the page segment interval adjacent to the remaining pages has been removed. If it has been removed, the remaining pages are also removed; otherwise, the remaining pages are merged with the adjacent page segment interval to form a new page segment interval.

[0021] A second aspect of this application provides a page continuity optimization apparatus, comprising:

[0022] The read / write module is used to perform read / write verification of the Flash memory.

[0023] The generation module is used to read the number of error bits for each page of Flash and, in combination with the configured error correction threshold, generate a page template.

[0024] The first processing module is used to process the page template according to the page address continuity criterion, identify and remove isolated pages and / or isolated page segments in the page template according to preset conditions, and obtain a first new page template;

[0025] The first mass production module is used to perform mass production operations on the Flash using the first new page template. If the Flash meets the mass production conditions, it will be produced based on the current mass production specifications; if the Flash does not meet the mass production conditions, the process will end. The mass production conditions include sufficient compatibility and passing the comparative test.

[0026] Furthermore, in one preferred embodiment, when the first mass production module determines that the Flash does not meet the mass production conditions, the method further includes:

[0027] The second processing module is used to process the page template according to the configured page segment length threshold, divide the page template into multiple page segment intervals, and remove the page segment intervals containing abnormal pages to obtain a second new page template.

[0028] The second mass production module is used to perform mass production operations on the Flash using the second new page template. If the Flash meets the mass production conditions, it will be produced based on the current mass production specifications; if the Flash does not meet the mass production conditions, the process will end.

[0029] Further, in one preferred embodiment, the page address continuity criterion includes:

[0030] Read the page address of each page;

[0031] Determine whether the adjacent pages of the current page are abnormal pages and whether the page addresses of the current page and the adjacent pages are consecutive. If yes, then the current page is determined to be an orphan page; otherwise, then the current page is determined not to be an orphan page.

[0032] Determine whether the left adjacent page of the current page segment's header is an abnormal page, whether the right adjacent page of the current page segment's tail is an abnormal page, and whether the page addresses of the pages within the current page segment are consecutive. If yes, then the current page segment is determined to be an isolated page segment; otherwise, the current page segment is determined not to be an isolated page segment.

[0033] Further, in one preferred embodiment, after the second processing module processes the page template according to a configured page segment length threshold and divides the page template into multiple page segment intervals, it further includes:

[0034] If the page template cannot be divided into an integer multiple of the page segment intervals according to the page segment length threshold, the remaining pages are processed in the following way:

[0035] Based on the determination that at least one of the remaining pages is an abnormal page, all the remaining pages are directly removed; or

[0036] Based on the determination that all remaining pages are normal pages, it is determined whether the page segment interval adjacent to the remaining pages has been removed. If it has been removed, the remaining pages are also removed; otherwise, the remaining pages are merged with the adjacent page segment interval to form a new page segment interval.

[0037] A third aspect of this application provides a memory control chip, including the page continuity optimization device as described above:

[0038] The fourth aspect of this application provides executable code that, when executed by a processor of an electronic device, causes the processor to perform the page continuity optimization method as described above.

[0039] Compared with the prior art, the beneficial effects of the present invention are:

[0040] This technical solution eliminates orphaned pages and / or orphaned page segments, making the page templates of Flash blocks as contiguous as possible. When the main controller loads page templates with contiguous addresses in the firmware, it only performs read, write, erase, and garbage collection within the contiguous valid page range, prohibiting access to orphaned pages and orphaned page segments, reducing page jumps and interference, thereby improving Flash stability. Attached Figure Description

[0041] Figure 1 This is a schematic flowchart of the page continuity optimization method in one embodiment of this application;

[0042] Figure 2 This is a flowchart illustrating the steps of a page continuity optimization method in another embodiment of this application;

[0043] Figure 3 This is a schematic diagram of the page continuity optimization device in one embodiment of this application;

[0044] Figure 4 This is a schematic diagram of the page continuity optimization device in another embodiment of this application;

[0045] Figure 5This is a schematic diagram of the structure of a storage control chip in one embodiment of this application;

[0046] Figure 6 This is a schematic diagram of the specifications of a Micron series QLC type Flash in one embodiment of this application. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] In related technologies, the current industry standard for improving Flash stability is to use a wordline strategy to remove abnormal pages, including unstable pages, bad pages, and pages adjacent to bad pages, thereby reducing the impact of abnormal pages on overall reliability. However, this solution has a significant technical flaw: it does not address the issue of page address continuity. After removing abnormal pages, a large number of orphaned pages are easily generated within a block, forcing the storage controller chip to frequently jump between non-contiguous physical page addresses during read and write operations. When such page jumps accumulate in large numbers, they significantly exacerbate inter-page interference, ultimately reducing the overall stability of the Flash memory.

[0049] Therefore, in order to solve the above-mentioned technical problems, this application provides a page continuity optimization method and corresponding embodiments.

[0050] The technical solution of this application will be described in detail below with reference to the accompanying drawings.

[0051] like Figure 1 The diagram shown is a flowchart illustrating the steps of a page continuity optimization method according to an embodiment of this application.

[0052] Please see Figure 1 A page continuity optimization method includes the following steps:

[0053] Step S110: Perform Flash read / write verification.

[0054] It should be noted that in this embodiment, by performing a full-domain physical address overwrite read and write operation on the NAND Flash, standard test data is written to the specified physical page according to the Flash storage protocol. Then, the data is read out from the corresponding physical page and compared bit by bit with the original written data. The bit flips (i.e., the number of error bits) that occur in each physical page during the read and write process are recorded simultaneously. The actual number of error bits in each physical page of the Flash is accurately collected, providing objective and reliable raw data for the subsequent identification of normal and abnormal pages, and ensuring the accuracy of subsequent page processing.

[0055] Step S120: Read the number of error bits for each page of Flash, and generate a page template by combining it with the configured error correction threshold.

[0056] It should be noted that in this embodiment, the storage controller chip has a built-in ECC error correction module. This module has a preset error correction threshold, which is the maximum number of error bits that the chip can stably correct. This threshold is the core basis for determining whether a physical page is usable (i.e., whether the page is a normal page or an abnormal page). This step reads the number of error bits for each physical page and compares this value with the pre-configured error correction threshold: when the number of error bits for a page is less than or equal to the error correction threshold, the page is determined to be a valid page that can store data normally and is given a valid status mark; when the number of error bits for a page is greater than the error correction threshold, the page is determined to be an abnormal page that cannot reliably store data and is given an abnormal status mark. Based on the status marks of all physical pages, a page status mapping table, i.e., a page template, is generated for each block according to the address sorting rules of Flash physical blocks and physical pages. This template presents the usability status of each physical page in a digital form and can be quickly read and called by the storage controller chip.

[0057] Step S130: Process the page template according to the page address continuity criterion, identify and remove isolated pages and / or isolated page segments in the page template according to preset conditions, and obtain the first new page template.

[0058] The following provides a definition of orphaned pages and orphaned page segments to better understand the technical solution of this application. Orphaned page: refers to a single physical page, and the physical pages adjacent to it are abnormal pages.

[0059] Orphaned page segments: These refer to multiple contiguous physical pages at a single physical address. These segments constitute a relatively small percentage of the total page count in a block. The left and right adjacent pages to the header and tail pages of a segment are considered abnormal pages. Orphaned pages and orphaned page segments are essentially the same concept, with orphaned page segments being a further derivative of orphaned pages. The difference lies in the number of pages in an orphaned page segment compared to an orphaned page, and the fact that they are physically contiguous.

[0060] In this embodiment, the page address continuity criterion can be implemented as follows: Read the page address of each page; determine whether the adjacent pages of the current page are abnormal pages and whether the page addresses of the current page and its adjacent pages are continuous. If yes, the current page is determined to be an isolated page; otherwise, the current page is determined not to be an isolated page; determine whether the left adjacent page of the header page of the current page segment is an abnormal page, whether the right adjacent page of the tail page of the current page segment is an abnormal page, and whether the page addresses of the pages within the current page segment are continuous. If yes, the current page segment is determined to be an isolated page segment; otherwise, the current page segment is determined not to be an isolated page segment. It should be noted that, through the above page address continuity criterion, all isolated pages and isolated page segments can be accurately and completely identified in the page template, ensuring the reliability of subsequent page template processing. After identification, this step marks all physical pages identified as orphaned pages and orphaned page segments as unavailable and removes them from the valid page range (this removal does not physically remove orphaned pages and orphaned page segments, but marks them as unavailable, not directly erased). Only valid page regions with contiguous physical addresses, adjacent valid pages, not surrounded by abnormal pages, and possessing complete continuous read / write conditions are retained. Through this removal operation, non-contiguous available pages formed by scattered distribution within the block can be eliminated at the source, ensuring that the remaining valid pages are arranged continuously in terms of physical addresses. This avoids frequent page address jumps during read / write operations by the storage controller chip and reduces inter-page interference. After the removal process is completed, a first new page template is formed. This first new page template removes all orphaned pages and orphaned page segments that disrupt address continuity, retaining highly continuous and stable continuous valid page segments.

[0061] In this embodiment, the preset condition is to identify all isolated pages and isolated page segments through page templates, and then filter them in descending order of hierarchy until the lowest threshold that meets the city's capacity requirements is found, ensuring that the capacity of the remaining consecutive pages still meets the standard after removing isolated pages and / or isolated page segments.

[0062] Step S140: Perform mass production operation on Flash using the first new page template. If Flash meets the mass production conditions, it will be produced based on the current mass production specifications. If Flash does not meet the mass production conditions, the process will end. The mass production conditions include sufficient market compatibility and passing the comparative test.

[0063] The following provides explanations of the terms "foot capacity" and "market access foot capacity" to help readers better understand the technical solution of this application.

[0064] Maximum capacity: refers to the maximum physical usable capacity of a Flash chip at the time of manufacture. It is the theoretically maximum capacity that the Flash chip can achieve and is an inherent hardware attribute of Flash.

[0065] Market-ready capacity (MTC) is a standard capacity derived from the standard capacity for market circulation. This capacity meets market sales specifications and is the actual usable capacity that can be stably advertised and circulated externally. For example, the physical capacity of a Flash memory model N28 is 141312Mb; however, the standard capacity (MTC) for external market circulation of this model is 120000Mb. It should be noted that in this embodiment, the first new page template is used as the basis for mass production configuration, and mass production verification is performed on the processed Flash memory. The mass production conditions include two core indicators: market-ready capacity and passing the comparative test. Market-ready capacity refers to the effective capacity of the Flash memory calculated based on the first new page template, which meets the standard capacity requirements for market circulation and has no significant capacity reduction. The comparative test refers to performing read and write verification performance on the Flash memory according to industry standards and product performance indicators to ensure that the written data and read data are the same, ensuring the accuracy and stability of the Flash memory's read and write data, and making the Flash memory meet the product's factory performance standards. The storage controller chip configures the available physical address range of the Flash memory according to the first new page template, masks the removed orphaned pages, orphaned page segments, and original abnormal pages, and then verifies the mass production conditions item by item. If both indicators are met, the Flash memory is determined to be ready for mass production and shipped according to the current configuration specifications; if either indicator is not met, the Flash memory is determined to be unoptimizable by this method, the mass production process is terminated, and unqualified products are prevented from entering the market.

[0066] In this embodiment, a specific case is given to illustrate the technical principles of steps S130 to S140 in detail.

[0067] The full capacity formula for Flash is as follows:

[0068] C0=Block×ValidPage×Sector / 2048 1)

[0069] Wherein, "C0" represents the maximum capacity of the Flash memory; "Block" represents the number of physical blocks in the Flash memory; "ValidPage" represents the number of valid physical pages within a single block; and "Sector" represents the number of sectors per page (which determines the storage capacity of a single page).

[0070] The formula for the maximum number of valid pages that can be removed in Flash (2) is as follows:

[0071] TPageMax=(C0-C1) / (Block×Sector / 2048) 2)

[0072] Among them, "TPageMax" represents the maximum number of valid pages that Flash can remove; "C1" represents the maximum number of pages available.

[0073] The maximum percentage of valid pages that can be removed in Flash is shown in formula 3) below:

[0074] TpageMaxPercent=TpageMax / ValidPage 3)

[0075] Among them, "TpageMaxPercent" represents the maximum percentage of valid pages that can be removed. This indicator directly reflects the capacity redundancy, that is, how many percentages of valid pages can be removed to ensure that the product capacity meets the standard.

[0076] Using Micron's 3D Flash series as an example, such as Figure 6 As shown. From Figure 6 The data shows that Micron's QLC-type Flash memory generally has a capacity redundancy of more than 15%, and some models (such as M4PA) even have a redundancy of more than 30%. These provide sufficient capacity buffer space for eliminating isolated pages / segments and optimizing page continuity.

[0077] The core idea of ​​this case is to first identify all isolated pages and isolated page segments through page templates, and then filter them in descending order of size until the lowest threshold that meets the city's capacity requirements is found, ensuring that the capacity of the remaining consecutive pages still meets the standard after removing isolated pages and / or isolated page segments.

[0078] Take the 256-page page template in the example as an example:

[0079] Template status (hexadecimal): 9E00FF00FFFFFFFF0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

[0080] After being converted to binary, the page state distribution within the block can be parsed out: normal pages are marked as 1, and abnormal pages are marked as 0.

[0081] The statistics show that the total number of isolated pages and isolated page segments within the block is 1+4+8+28+192, with lengths of 1 page, 4 pages, 8 pages, 28 pages, and 192 pages, respectively.

[0082] Level 1 Filter (Preset condition = Remove isolated pages and / or isolated page segments < 192 pages)

[0083] Result: Only the longest isolated segment of 192 pages was retained, and all other short segments were removed.

[0084] Calculate the capacity corresponding to this 192-page segment: 192 pages × single page capacity × number of blocks / 2048

[0085] If the capacity is greater than or equal to the city's maximum capacity C1, the product is removed; otherwise, the next level of screening begins.

[0086] Second-level filtering (preset condition = remove isolated pages and / or isolated page segments < 28 pages)

[0087] Result: If the capacity of only retaining 192 isolated page segments is insufficient, the threshold is lowered. In this case, consecutive isolated page segments with a length of ≥28 pages can be retained, namely two segments: 28 pages and 192 pages.

[0088] Calculate the total capacity of the two segments: (28 + 192) pages × single page capacity × number of blocks / 2048

[0089] If the total capacity is greater than or equal to C1, then the threshold is set to 28, and these two isolated page segments are retained.

[0090] Subsequent iterations of the selection process (adjusting preset criteria sequentially).

[0091] If the previous level still does not meet the criteria, the rejection threshold will be further lowered:

[0092] Preset conditions = Remove isolated pages and / or isolated page segments with a length of <8 pages: Keep consecutive segments with a length of ≥8 pages (8 pages, 28 pages, 192 pages), and calculate the total capacity of the three segments.

[0093] Preset conditions = Remove isolated pages and / or isolated page segments with a length of <4 pages: retain consecutive segments with a length of ≥4 pages (4 pages, 8 pages, 28 pages, 192 pages), and calculate the total capacity of the four segments.

[0094] The process continues until the lowest threshold that meets the city's capacity is found. This threshold is the ultimate threshold for removing orphaned pages and / or orphaned page segments (i.e., the preset condition).

[0095] The beneficial effects of the technical solution in this embodiment:

[0096] 1) The reverse logic of "capacity priority" avoids excessive elimination.

[0097] Traditional solutions first set a fixed threshold and then remove pages, which can easily lead to a sudden drop in capacity if the threshold is set too high. This solution aims for "sufficient capacity in the market" and starts from the actual distribution of page templates to deduce the acceptable limit for page removal, ensuring that the removal operation is always carried out within the capacity redundancy range.

[0098] 2) Balancing continuity and capacity

[0099] Long, contiguous, orphaned page segments are prioritized for retention. Because of their good page address continuity, these segments reduce frequent page address jumps during read and write operations. They also avoid capacity loss caused by excessive removal of orphaned pages and / or orphaned page segments, thus perfectly resolving the technical contradiction between "continuity optimization" and "capacity achievement".

[0100] 3) Adaptable to different Flash characteristics, possessing high versatility

[0101] Different Flash memory models have significant differences in effective page distribution and capacity redundancy (e.g.) Figure 6 Compared to the 15% redundancy of N18 and the 34% redundancy of M4PA, the technical solution of this application can dynamically adjust the threshold according to the page template distribution of each Flash, without the need to configure fixed parameters separately for different models, thus having stronger adaptability.

[0102] Figure 2 A flowchart illustrating the steps of a page continuity optimization method according to another embodiment of this application is shown.

[0103] Please see Figure 2 A page continuity optimization method includes the following steps:

[0104] Step S210: Perform Flash read / write verification.

[0105] Please refer to the description of step S110 for this step, which will not be repeated here.

[0106] Step S220: Read the number of error bits for each page of Flash, and generate a page template by combining it with the configured error correction threshold.

[0107] Please refer to the description of step S120 for this step, which will not be repeated here.

[0108] Step S230: Process the page template according to the page address continuity criterion, identify and remove isolated pages and / or isolated page segments in the page template according to preset conditions, and obtain the first new page template.

[0109] Please refer to the description of step S130 for this step, which will not be repeated here.

[0110] Step S240: Perform mass production operation on Flash using the first new page template. If Flash meets the mass production conditions, it will be produced based on the current mass production specifications. If Flash does not meet the mass production conditions, proceed to step S250. The mass production conditions include sufficient compatibility and passing the comparative test.

[0111] Please refer to the description of step S140 for this step, which will not be repeated here.

[0112] Step S250: Process the page template according to the configured page segment length threshold, divide the page template into multiple page segment intervals, and remove the page segment intervals containing abnormal pages to obtain the second new page template.

[0113] It should be noted that if the Flash still does not meet the mass production requirements after processing according to the aforementioned method of removing isolated pages and / or isolated page segments, then proceed to step S250. Step S250 differs from the aforementioned method of removing isolated pages and / or isolated page segments; it belongs to the second page continuity optimization strategy and employs a novel interval division and whole-segment removal mechanism to process the page template. Specifically, in this embodiment, based on the configured page segment length threshold, the page template is evenly divided into multiple fixed-length page segment intervals according to the physical address order. Then, the page status of each page segment interval is detected to determine whether it contains abnormal pages. If at least one abnormal page exists in a certain page segment interval, the entire page segment interval is removed, retaining only the page segment intervals without any abnormal pages, thus obtaining a second new page template. Through this whole-segment division and whole-segment removal method, the address continuity and interval regularity of the remaining valid pages can be forcibly guaranteed, further improving the continuity and stability of Flash read and write operations, thereby increasing the possibility of meeting the mass production requirements.

[0114] Furthermore, during the process of segmenting the page template, it is inevitable that the page segment length threshold will not be able to divide the page template into an integer multiple of page segment intervals, resulting in redundant extra pages. To address this issue, this embodiment adopts the following method to handle these extra pages:

[0115] If at least one remaining page is determined to be an abnormal page, all remaining pages are directly removed; or

[0116] Based on the determination that all remaining pages are normal pages, check whether the page segment interval adjacent to the remaining pages has been removed. If it has been removed, the remaining pages are also removed; otherwise, the remaining pages are merged with the adjacent page segment interval to form a new page segment interval.

[0117] Based on the retained valid page segment range and the remaining pages after the above processing, a second new page template is obtained. By using this method of segment division and segment elimination, the address continuity and interval regularity of the remaining valid pages can be forcibly guaranteed, further improving the continuity and stability of Flash read and write operations, thereby increasing the possibility of meeting mass production conditions.

[0118] It should also be noted that the page segment length threshold needs to be configured based on the actual situation of the page template. This embodiment does not impose specific limitations. The primary goal is to divide the page template into an integer multiple of page segment intervals as much as possible. The secondary goal is to group multiple abnormal pages into the same page segment interval as much as possible. This ensures that after subsequent removal processing of the divided page segment intervals, the page address continuity of the remaining page segment intervals is maintained to the best extent, thereby improving the read / write verification stability and data storage stability of Flash, and increasing the success rate of Flash comparison tests.

[0119] To facilitate understanding, a specific example is given below:

[0120] Assuming a Flash memory block has a total of 260 pages and a configured page segment length threshold of 32 pages, it can be divided into 8 complete page segment intervals (256 pages in total) according to the physical address order, with the remaining 4 pages as spare pages.

[0121] The 8 complete page segment intervals are as follows:

[0122] Page range 1 (pages 0–31), page range 2 (pages 32–63), page range 3 (pages 64–95), page range 4 (pages 96–127), page range 5 (pages 128–159), page range 6 (pages 160–191), page range 7 (pages 192–223), page range 8 (pages 224–255), remaining pages: pages 256–259 (total 4 pages).

[0123] Based on the page template detection results:

[0124] Page segment range 1: Contains abnormal pages → Remove the entire segment;

[0125] Page range 2: All valid pages → Reserved;

[0126] Page segment range 3: Contains abnormal pages → Remove the entire segment;

[0127] Page range 4: All valid pages → Reserved;

[0128] Page segment range 5: Contains abnormal pages → Remove the entire segment;

[0129] Page range 6: All valid pages → Reserved;

[0130] Page segment range 7: Contains abnormal pages → Remove the entire segment;

[0131] Page range 8: All valid pages → Reserved;

[0132] The remaining pages (pages 256–259) were all found to be normal after testing.

[0133] The page segment closest to the remaining pages is page segment 8. Page segment 8 was not removed, so these 4 remaining pages are merged with page segment 8 to form a new page segment (pages 224–259, total 36 pages).

[0134] Final Retention:

[0135] Page segment 2, page segment 4, page segment 6, and the merged new page segment 8, based on the above-mentioned reserved intervals, yield the second new page template.

[0136] As can be seen, this step ensures that all valid pages are long page segments with continuous addresses and regular intervals by dividing the page into fixed-length intervals, removing entire segments containing abnormal pages, and intelligently merging / removing remaining pages. This completely avoids frequent page jumps caused by scattered and isolated pages, significantly improves the stability of Flash read and write operations, and makes it easier to meet mass production requirements.

[0137] Step S260: Perform mass production operation on Flash using the second new page template. If Flash meets the mass production conditions, it will be produced based on the current mass production specifications; if Flash does not meet the mass production conditions, the process will end.

[0138] It should be noted that the mass production conditions in this step are consistent with those mentioned above, both including meeting the market supply capacity requirements and passing comparative tests as two core judgment criteria. Specifically, based on the valid page segment range and the merged valid remaining pages retained in the second new page template, the actual usable capacity of the Flash is recalculated to determine whether this capacity meets the market supply capacity standards. At the same time, comparative tests on read / write performance, stability, and reliability of the Flash are performed according to preset test items to determine whether the tests pass. When the Flash meets both the market supply capacity requirements and passes the comparative tests, it is determined to meet the mass production conditions, and the factory configuration is completed according to the mass production specifications corresponding to the second new page template. When the Flash does not meet both of the above conditions, it is determined that it cannot meet the factory standards through the page continuity optimization strategy of this application, and the current mass production process is directly terminated to prevent unqualified products from entering the market.

[0139] Corresponding to the aforementioned method embodiments, this application provides a page continuity optimization apparatus and corresponding embodiments.

[0140] Figure 3 The diagram shown is a schematic diagram of the page continuity optimization device in one embodiment of this application.

[0141] Please see Figure 3 A page continuity optimization device 300 includes: a read / write module 310, a generation module 320, a first processing module 330, and a first mass production module 340. Wherein:

[0142] The read / write module 310 is used to perform read / write verification of Flash memory.

[0143] The generation module 320 is used to read the number of error bits for each page of Flash and generate a page template by combining it with the configured error correction threshold.

[0144] The first processing module 330 is used to process the page template according to the page address continuity criterion, identify and remove isolated pages and / or isolated page segments in the page template according to preset conditions, and obtain the first new page template.

[0145] The first mass production module 340 is used to perform mass production operations on Flash using the first new page template. If Flash meets the mass production conditions, it will be produced based on the current mass production specifications; if Flash does not meet the mass production conditions, the process will end. The mass production conditions include sufficient market compatibility and passing the comparative test.

[0146] Furthermore, in this embodiment, the page address continuity criterion can be implemented as follows: read the page address of each page; determine whether the adjacent pages of the current page are abnormal pages and whether the page addresses of the current page and the adjacent pages are continuous. If yes, the current page is determined to be an isolated page; if no, the current page is determined to be not an isolated page; determine whether the left adjacent page of the header page of the current page segment is an abnormal page, whether the right adjacent page of the tail page of the current page segment is an abnormal page, and whether the page addresses of the pages within the current page segment are continuous. If yes, the current page segment is determined to be an isolated page segment; if no, the current page segment is determined to be not an isolated page segment.

[0147] It should be noted that the page continuity optimization method implemented by the page continuity optimization device disclosed in this embodiment is the same as that in the above embodiments, and therefore will not be described in detail here. Optionally, each module and the other operations or functions described above are respectively for implementing the methods in the foregoing embodiments.

[0148] Figure 4 The diagram shown is a schematic diagram of the page continuity optimization device in another embodiment of this application.

[0149] Please see Figure 4 A page continuity optimization device 300 includes: a read / write module 310, a generation module 320, a first processing module 330, a first mass production module 340, a second processing module 350, and a second mass production module 360. The functions of the read / write module 310, the generation module 320, the first processing module 330, and the first mass production module 340 are described in detail below. Figure 3 This will not be elaborated upon here.

[0150] The second processing module 350 is used to process the page template according to the configured page segment length threshold, divide the page template into multiple page segment intervals, and remove the page segment intervals containing abnormal pages to obtain a second new page template.

[0151] Please see Figure 4Furthermore, in this embodiment, the second processing module 350 processes the page template according to the configured page segment length threshold, dividing the page template into multiple page segment intervals. It further includes the following steps: if the page template cannot be divided into an integer multiple of page segment intervals according to the page segment length threshold, the remaining pages are processed in the following manner: based on the determination that at least one remaining page is an abnormal page, all remaining pages are directly removed; or based on the determination that all remaining pages are normal pages, it is determined whether the page segment interval adjacent to the remaining page has been removed. If it has been removed, the remaining page is also removed; otherwise, the remaining page is merged with the adjacent page segment interval to form a new page segment interval.

[0152] The second mass production module 360 ​​is used to perform mass production operations on Flash using the second new page template. If Flash meets the mass production conditions, it will be produced based on the current mass production specifications; if Flash does not meet the mass production conditions, the process will end.

[0153] It should be noted that the page continuity optimization method implemented by the page continuity optimization device disclosed in this embodiment is the same as that in the above embodiments, and therefore will not be described in detail here. Optionally, each module and the other operations or functions described above are respectively for implementing the methods in the foregoing embodiments.

[0154] Please refer to 3, a storage control chip 400, including the page continuity optimization device 300 described above.

[0155] This application improves Flash stability by eliminating orphaned pages and / or orphaned page segments, making the page templates of Flash blocks as continuous as possible. When the main controller loads the page templates with continuous addresses in the firmware, it only performs read, write, erase, and garbage collection within the continuous valid page range, prohibiting access to orphaned pages and orphaned page segments, reducing page jumps and interference.

[0156] It should be noted that the storage controller chip 400 is a logic chip. The storage controller chip 400 consists of analog circuits, digital circuits, and a firmware layer. Other functions that perform complex digital logic functions, such as protocol processing, error correction, address mapping, and storage management algorithms, fall under the category of logic chips.

[0157] Furthermore, the method according to this application can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the method described above.

[0158] Alternatively, this application may be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) storing executable code (or computer program or computer instruction code) thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the methods described above according to this application.

[0159] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A page continuity optimization method, characterized in that, include: Perform read / write verification on the Flash memory; Read the number of error bits for each page of Flash, combine it with the configured error correction threshold, and generate a page template; The page template is processed according to the page address continuity criterion, and isolated pages and / or isolated page segments in the page template are identified and removed according to preset conditions to obtain a first new page template; The first new page template is used to perform mass production operation on the Flash. If the Flash meets the mass production conditions, it will be produced based on the current mass production specifications. If the Flash does not meet the mass production conditions, the process ends; the mass production conditions include sufficient compatibility and passing the comparative test.

2. The page continuity optimization method according to claim 1, characterized in that, If the Flash memory does not meet the mass production requirements, the following also applies: The page template is processed according to the configured page segment length threshold, the page template is divided into multiple page segment intervals, and the page segment intervals containing abnormal pages are removed to obtain a second new page template; The Flash is mass-produced using the second new page template. If the Flash meets the mass production conditions, it is produced based on the current mass production specifications; if the Flash does not meet the mass production conditions, the process ends.

3. The page continuity optimization method according to claim 1, characterized in that, The page address continuity criteria include: Read the page address of each page; Determine whether the adjacent pages of the current page are abnormal pages and whether the page addresses of the current page and the adjacent pages are consecutive. If yes, then the current page is determined to be an orphan page; otherwise, then the current page is determined not to be an orphan page. Determine whether the left adjacent page of the current page segment's header is an abnormal page, whether the right adjacent page of the current page segment's tail is an abnormal page, and whether the page addresses of the pages within the current page segment are consecutive. If yes, then the current page segment is determined to be an isolated page segment; otherwise, the current page segment is determined not to be an isolated page segment.

4. The page continuity optimization method according to claim 2, characterized in that, The step of processing the page template according to the configured page segment length threshold, dividing the page template into multiple page segment intervals, further includes: If the page template cannot be divided into an integer multiple of the page segment intervals according to the page segment length threshold, the remaining pages are processed in the following way: Based on the determination that at least one of the remaining pages is an abnormal page, all the remaining pages are directly removed; or Based on the determination that all remaining pages are normal pages, it is determined whether the page segment interval adjacent to the remaining pages has been removed. If it has been removed, the remaining pages are also removed; otherwise, the remaining pages are merged with the adjacent page segment interval to form a new page segment interval.

5. A page continuity optimization device, characterized in that, include: The read / write module is used to perform read / write verification of the Flash memory. The generation module is used to read the number of error bits for each page of Flash and, in combination with the configured error correction threshold, generate a page template. The first processing module is used to process the page template according to the page address continuity criterion, identify and remove isolated pages and / or isolated page segments in the page template according to preset conditions, and obtain a first new page template; The first mass production module is used to perform mass production operations on the Flash using the first new page template. If the Flash meets the mass production conditions, it will be produced based on the current mass production specifications. If the Flash does not meet the mass production conditions, the process ends; the mass production conditions include sufficient compatibility and passing the comparative test.

6. The page continuity optimization apparatus according to claim 5, characterized in that, When the first mass production module determines that the Flash does not meet the mass production conditions, the following is also included: The second processing module is used to process the page template according to the configured page segment length threshold, divide the page template into multiple page segment intervals, and remove the page segment intervals containing abnormal pages to obtain a second new page template. The second mass production module is used to perform mass production operations on the Flash using the second new page template. If the Flash meets the mass production conditions, it will be produced based on the current mass production specifications; if the Flash does not meet the mass production conditions, the process will end.

7. The page continuity optimization apparatus according to claim 5, characterized in that, The page address continuity criteria include: Read the page address of each page; Determine whether the adjacent pages of the current page are abnormal pages and whether the page addresses of the current page and the adjacent pages are consecutive. If yes, then the current page is determined to be an orphan page; otherwise, then the current page is determined not to be an orphan page. Determine whether the left adjacent page of the current page segment's header is an abnormal page, whether the right adjacent page of the current page segment's tail is an abnormal page, and whether the page addresses of the pages within the current page segment are consecutive. If yes, then the current page segment is determined to be an isolated page segment; otherwise, the current page segment is determined not to be an isolated page segment.

8. The page continuity optimization apparatus according to claim 6, characterized in that, The second processing module processes the page template according to the configured page segment length threshold, dividing the page template into multiple page segment intervals, and further includes: If the page template cannot be divided into an integer multiple of the page segment intervals according to the page segment length threshold, the remaining pages are processed in the following way: Based on the determination that at least one of the remaining pages is an abnormal page, all the remaining pages are directly removed; or Based on the determination that all remaining pages are normal pages, it is determined whether the page segment interval adjacent to the remaining pages has been removed. If it has been removed, the remaining pages are also removed; otherwise, the remaining pages are merged with the adjacent page segment interval to form a new page segment interval.

9. A memory control chip, comprising the page continuity optimization device as described in any one of claims 5 to 8.

10. A computer-readable storage medium, characterized in that, The device stores executable code that, when executed by a processor of an electronic device, causes the processor to perform the page continuity optimization method as described in any one of claims 1 to 4.