Over-comparison method and device, equipment and storage medium

By reading the number of error bits in the Flash Block to generate a sorting table and reordering them, the problem of long comparison time in Flash was solved, achieving the effect of quickly locking read/write bugs and improving debugging efficiency.

CN120808858APending Publication Date: 2025-10-17SHENZHEN SANDIYIXIN ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510863395.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-10-17

Smart Images

  • Figure CN120808858A_ABST
    Figure CN120808858A_ABST
Patent Text Reader

Abstract

The invention discloses an over-comparison method and device, equipment and a storage medium. The method comprises the following steps: reading error bits of each Block in the Flash; according to the sizes of the error bits of the Blocks, a sorting table is generated, and the sorting sequence of the Blocks from large to small according to the error bits is recorded in the sorting table; and executing whole-disk read-write of the Flash, performing read-write operation on each Block based on the sequence of the sorting table when the whole-disk read-write is executed, and locking the read-write Bug of each Block during the process. The Blocks are reordered according to the sizes of the error bits by reading the error bits of the Blocks, the Blocks with high error bits are preferentially read and written, and the Blocks have higher probability to generate read-write Bug during over-comparison, so that research and development personnel quickly lock the read-write Bug generated during over-comparison of the Flash, and the debugging efficiency of the Flash is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Flash technology, and in particular to a comparison method, device, equipment and storage medium. Background Art

[0002] NAND Flash (abbreviated as Flash, the same below) is a mainstream storage medium and is widely used in various storage products, such as USB flash drives, SD cards, and solid-state drives. Flash memory is categorized by quality. As a storage medium, its read / write performance and capacity directly determine its price range.

[0003] In related technologies, before Flash is manufactured into storage products, it must undergo an H2Test project (also known as a comparison project). The H2Test project uses the H2Test tool to perform full read and write operations on the Flash drive. This process is very time-consuming, as it requires performing read and write operations on all blocks in the Flash drive. However, in real-world applications, developers rely on the H2Test project to quickly identify Flash read and write bugs. If the H2Test project takes too long to execute, it can significantly delay the developer's Flash debugging progress. Therefore, it is necessary to optimize the existing comparison mechanism. Summary of the Invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a comparison method, device, equipment and storage medium, which can enable R&D personnel to quickly lock the read and write bugs generated when Flash performs comparison, thereby improving the debugging efficiency of Flash.

[0005] The first aspect of the present application provides a comparison method, comprising: Read the number of error bits in each block in Flash; generating a sorting table according to the number of error bits of each block, wherein the sorting table records the order of the blocks in descending order of the number of error bits; The full disk read and write of the Flash is executed. When the full disk read and write is executed, the read and write operations are performed on each block based on the order of the sorting table, and the read and write bugs of each block are locked during the execution.

[0006] Furthermore, in one preferred embodiment, after reading the number of error bits of each block in the Flash, the method further includes: Read the number of error bits of each Page in each Block; obtaining a dispersion of the error bit number of each Block according to the error bit number of each Page in the Block; generating a ranking table according to the size of the error bit number of each Block, wherein the ranking table records each Block in a descending order of the error bit number, including: configuring a weight parameter group, wherein the weight parameter group includes a first weight coefficient and a second weight coefficient; calculating a first score of each Block according to the size of the error bit number of each Block in combination with the first weight coefficient; calculating a second score of each Block according to the dispersion of the error bit number of each Block in combination with the second weight coefficient; adding the first score and the second score corresponding to each Block to rank each Block in a descending order of the total score and generate a ranking table.

[0007] Further, in one preferred embodiment, the reading of the error bit number of each Page in each Block includes: reading the error bit number of each Frame in each Page; selecting the highest error bit number in each Frame as the error bit number of the current Page.

[0008] Further, in one preferred embodiment, after the obtaining of the dispersion of the error bit number of each Block according to the error bit number of each Page in the Block, it further includes: reading the block number of each Block; The configuration of the weight parameter group, wherein the weight parameter group includes a first weight coefficient and a second weight coefficient, includes: configuring a weight parameter group, wherein the weight parameter group includes a first weight coefficient, a second weight coefficient, and a third weight coefficient; After the calculating of the second score of each Block according to the dispersion of the error bit number of each Block in combination with the second weight coefficient, it further includes: calculating a third score of each Block according to the block number of each Block in combination with the third weight coefficient; The adding of the first score and the second score corresponding to each Block to rank each Block in a descending order of the total score and generate a ranking table, includes: adding the first score, the second score and the third score corresponding to each of the Blocks, sorting each of the Blocks in descending order of the total score, and generating a sorting table.

[0009] The second aspect of the present application provides a contrast device, comprising: The first reading module is configured to read the number of error bits of each Block in the Flash. The sorting module is configured to generate a sorting table according to the size of the number of error bits of each Block, wherein the sorting table records the order of each Block in descending order of the number of error bits. The read-write module is configured to perform full-disk read-write of the Flash, and perform read-write operation on each Block based on the order of the sorting table during the full-disk read-write, and lock the read-write bug of each Block during the read-write operation.

[0010] Further, in one of the preferred embodiments, the device further comprises: The second reading module is configured to read the number of error bits of each Page in each Block. The dispersion module is configured to obtain the dispersion of the number of error bits of each Block according to the number of error bits of each Page in each Block. The sorting module comprises: The weight unit is configured to configure a weight parameter group, wherein the weight parameter group comprises a first weight coefficient and a second weight coefficient. The first calculation unit is configured to calculate a first score of each Block according to the size of the number of error bits of each Block and in combination with the first weight coefficient. The second calculation unit is configured to calculate a second score of each Block according to the dispersion of the number of error bits of each Block and in combination with the second weight coefficient. The total score sorting unit is configured to add the first score and the second score corresponding to each of the Blocks, sort each of the Blocks in descending order of the total score, and generate a sorting table.

[0011] Further, in one of the preferred embodiments, the second reading module comprises: The Frame unit is configured to read the number of error bits of each Frame in each Page. The confirmation unit is configured to select the highest number of error bits in each Frame as the number of error bits of the current Page.

[0012] Further, in one of the preferred embodiments, the device further comprises: a third reading module, configured to read a block number of each of the Blocks; The weight unit is configured to configure a weight parameter group, and when the weight parameter group comprises a first weight coefficient and a second weight coefficient, the weight parameter group comprises: The weight unit is configured to configure a weight parameter group, and when the weight parameter group comprises a first weight coefficient, a second weight coefficient and a third weight coefficient; The third score unit is configured to calculate a third score of each of the Blocks according to the block number of each of the Blocks and the third weight coefficient. The total score sorting unit is configured to sort each of the Blocks in a descending order of a total score value when the first score and the second score corresponding to each of the Blocks are added, and generate a sorting table, and comprises: The total score sorting unit is configured to sort each of the Blocks in a descending order of a total score value when the first score, the second score and the third score corresponding to each of the Blocks are added, and generate a sorting table.

[0013] The third aspect of the present application provides an electronic device, comprising: a processor; and a memory having executable code stored thereon, wherein when the executable code is executed by the processor, the processor performs the comparison method as described above.

[0014] The fourth aspect of the present application provides a computer readable storage medium, characterized by storing executable code, wherein when the executable code is executed by the processor of an electronic device, the processor performs the comparison method as described above.

[0015] The technical solution of the present application comprises: reading the error bit number of each Block in the Flash; generating a sorting table according to the size of the error bit number of each Block, wherein the sorting table records the order of each Block in a descending order of the error bit number; performing full-disk read-write of the Flash, wherein the read-write operation of each Block is based on the order of the sorting table during the full-disk read-write, and the read-write Bug of each Block is locked. By reading the error bit number of each Block, the Blocks are reordered according to the size of the error bit number, and the Blocks with high error bit number are given priority in read-write. These Blocks have a higher probability of generating read-write Bug during the comparison, which enables the R&D personnel to quickly lock the read-write Bug generated by the Flash during the comparison, thereby improving the debugging efficiency of the Flash. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0017] Figure 1 is a flowchart of the over contrast method shown in an embodiment of the present application; Figure 2 is a flowchart of the over contrast method shown in another embodiment of the present application; Figure 3 is a flowchart of the over contrast method shown in another embodiment of the present application; Figure 4 is a structural schematic diagram of the over contrast device shown in another embodiment of the present application; Figure 5 is a structural schematic diagram of the over contrast device shown in another embodiment of the present application; Figure 6 is a structural schematic diagram of the over contrast device shown in another embodiment of the present application; Figure 7 is a structural schematic diagram of the electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to facilitate the understanding of the present application, the following will comprehensively describe the present application with the help of the related drawings. The drawings show the preferred embodiments of the present application. However, the present application can be realized in many different forms, and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0019] It should be noted that when an element is referred to as being "fixed" to another element, it can be directly on the other element or there can be an intervening element. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements can be present. As used herein the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0021] In the related art, the Flash is manufactured as a storage product, and an H2Test project (also referred to as a pass comparison project) is executed before the product is produced. The H2Test project is full-disk read and write of the Flash using an H2Test tool. Since read and write operations are performed on all Blocks in the Flash, this process is very time-consuming. However, in actual applications, a developer needs to use the H2Test project to quickly locate read and write bugs of the Flash. If the H2Test project takes too long to execute, the development of the Flash will be seriously delayed.

[0022] Therefore, to solve the above technical problems, the present application discloses a pass comparison method, which can quickly lock read and write bugs of the Flash when the Flash is executed, and improve the debugging efficiency of the Flash.

[0023] The technical solutions of the present application are described in detail below with reference to the accompanying drawings.

[0024] Please refer to Figure 1 A pass comparison method includes the following steps: Step S110, read the number of error bits of each Block in the Flash.

[0025] It should be noted that, in addition to the quality of the Flash itself, the Blocks inside the Flash also have quality differences. The quality of the Blocks can be judged by the number of error bits. Since the Flash is sold as a storage product with a storage control chip, the storage control chip is internally configured with an error correction engine. The error correction engine can correct bit errors that occur in the Flash. The error correction performance of the error correction engine is commonly referred to as error correction performance in the industry. The error correction performance of the error correction engine has an upper limit. If the number of error bits of the Block exceeds the maximum error correction performance of the error correction engine, the Block cannot normally write data, i.e., cannot normally store data. Therefore, the Block is identified as a bad Block. Similarly, if the number of error bits of the Block is less than or equal to the maximum error correction performance of the error correction engine, the Block can normally write data, i.e., can normally store data.

[0026] In addition, the relationship between the number of error bits of the Block and the error correction performance of the storage control chip can only be used as a criterion for distinguishing between good and bad Blocks. However, for a good Block, further division can be made according to the number of error bits itself. Specifically, the higher the number of error bits of a Block, the lower the stability of the Block even if it is determined to be a good Block. This is determined by the physical characteristics of the Flash. If the unstable Blocks are read and written during the test, these unstable Blocks can cause read and write bugs in the Flash. Therefore, according to this principle, the technical solution of the present application locks these unstable Blocks in advance before the test, and these unstable Blocks are given priority to perform read and write operations, so that the R&D personnel can quickly lock the read and write bugs generated by the Flash during the test, thereby improving the debugging efficiency of the Flash.

[0027] In step S120, an ordering table is generated according to the size of the number of error bits of each Block, wherein the ordering table records each Block in descending order of the number of error bits.

[0028] It should be noted that since the Flash performs full-disk read and write during the test, and the read and write are performed in sequence, that is, the full-disk read and write are performed in the order of the Block number. If the unstable Blocks in the Flash are located in the second half, the first half of the test is performed on stable Blocks, and it is almost impossible for these stable Blocks to cause read and write bugs during the read and write process, so the R&D personnel need to wait for a long time to capture the read and write bugs of the Flash. Generally, the execution time of the test of a 64G Flash is more than 1 hour, and the execution time of the test of a 128G or 256G Flash is longer than 1 hour. If the read and write operations are performed on unstable Blocks in the early stage, the read and write bugs of the test are more likely to occur. The R&D personnel can quickly lock and repair the unstable Blocks to speed up the debugging of the Flash.

[0029] Therefore, in the embodiment, the Blocks are reordered according to the number of error bits of each Block. The higher the number of error bits of a Block, the higher the rank of the Block. If the number of error bits of two or more Blocks is the same, the Block with the smaller block number has a higher rank. In this way, the order of the Blocks of the Flash is changed. Instead of being sorted according to the block number, the Blocks are sorted according to the number of error bits. Finally, a sorting table is formed, which records the order of the Blocks according to the number of error bits from high to low. The higher the rank of a Block, the lower the stability of the Block. These Blocks need to be read and written in priority. The lower the rank of a Block, the higher the stability of the Block. These Blocks can be read and written with low priority.

[0030] In step S130, full-disk read and write of the Flash are performed. When performing the full-disk read and write, each Block is read and written according to the order of the sorting table. During the read and write, the read and write Bug of each Block is locked.

[0031] It should be noted that in the embodiment, the number of error bits of each Block is read, and the Blocks are reordered according to the number of error bits. The Blocks with a high number of error bits are read and written in priority. These Blocks are more likely to have read and write Bug when being compared. This can help the developer quickly lock the read and write Bug of the Flash when being compared, thereby improving the debugging efficiency of the Flash.

[0032] Figure 2 Fig. 4 shows a flowchart of a comparison method according to another embodiment of the present application.

[0033] Referring to Fig. 4, Figure 2 A comparison method includes the following steps: In step S210, the number of error bits of each Block in the Flash is read.

[0034] The description of step S210 can be referred to step S110, which will not be repeated here.

[0035] In step S220, the number of error bits of each Page in each Block is read.

[0036] It should be noted that since the number of error bits in a block is derived from the number of error bits in each page, the specific principle is: read the number of error bits in each page of the block; select the highest number of error bits in each page as the number of error bits in the current block. In practice, the number of error bits in each page of a block may be very balanced (i.e., the number of error bits in each page is similar) or very discrete (i.e., the number of error bits in each page varies greatly). In this embodiment, blocks with high discreteness are also determined to be unstable. This situation cannot be fully determined by simply reading the number of error bits in the block; the error bit numbers of each page in the block must be read to determine the error bit number.

[0037] In addition, in this embodiment, the number of error bits for each page in each block is read according to the following steps: the number of error bits for each frame in each page is read; the highest number of error bits in each frame is selected as the number of error bits for the current page. It should be noted that a page has a certain size, typically 16K bytes. These 16K bytes are divided into 16 frames, each of which is 1K. Each frame also generates an error bit number, equivalent to 16 error bits for each page. The highest number of error bits in the frame is selected as the number of error bits for the current page.

[0038] Step S230: Obtain the error bit number dispersion of each Block according to the error bit number of each Page in each Block.

[0039] It should be noted that, for example, assuming that the current block has 10 pages, the number of error bits obtained after reading is as shown in Table 1.

[0040]

[0041] In this embodiment, the standard deviation is used to reflect the dispersion of the number of error bits in each Page in the current Block. The mean number of error bits is calculated as shown in Formula 1), where " " represents the average number of error bits in the current block," " represents the sum of the error bits of each page, and "n" represents the total number of pages.

[0042]

[0043] According to formula 1), we can calculate =(50+51+58+40+56+57+20+10+30+35) / 10=40.7.

[0044] Then, the overall variance of the number of error bits of each Page is calculated, as shown in Formula 2), where " ” represents the overall variance of the number of error bits in the current block.

[0045]

[0046] According to formula 2), E var =252.33.

[0047] Finally, calculate the standard deviation of the current Block according to Formula 3), where " ” represents the standard deviation of the current Block.

[0048]

[0049] Finally, get =15.88 (keep two decimal places).

[0050] Step S240: configuring a weight parameter group, wherein the weight parameter group includes a first weight coefficient and a second weight coefficient.

[0051] It should be noted that in this embodiment, the determination of block instability is no longer based solely on the number of error bits per block. The dispersion of the number of error bits per block is also considered. However, due to the physical structure of Flash memory, the number of error bits per block still accounts for the largest proportion. Therefore, different weight coefficients are assigned to different dimensions to minimize the possibility of misjudgment of blocks. In this embodiment, the first weight coefficient is set to 0.6 for the number of error bits per block, and the second weight coefficient is set to 0.4 for the dispersion of the number of error bits per block.

[0052] Step S250: Calculate a first score for each Block based on the number of error bits in each Block and a first weight coefficient.

[0053] It should be noted that the first score of the Block is calculated according to Formula 4), where " " represents the first score of the current Block," ” represents the first weight coefficient.

[0054]

[0055] According to formula 4), the Block =34.8.

[0056] Step S260, according to the error bit number discrete degree of each Block, combined with the second weight coefficient, the second score of each Block is calculated.

[0057] It should be noted that, according to the formula 5), the second score of the Block is calculated, wherein "S " represents the second score of the current Block, and "W " represents the second weight coefficient.

[0058]

[0059] According to the formula 5), the S S = 6.352.

[0060] Step S270, the first score and the second score corresponding to each Block are added, each Block is sorted in descending order of the total score, and a sorting table is generated.

[0061] It should be noted that, according to the formula 6), the total score of the current Block is calculated, wherein "S " represents the total score of the current Block.

[0062]

[0063] Thus, the S = 41.232.

[0064] Step S280, the full disk read-write of the Flash is executed, and the read-write operation of each Block is performed based on the order of the sorting table during the full disk read-write, and the read-write Bug of each Block is locked.

[0065] It should be noted that, in the embodiment, the stability of the Block is comprehensively judged by combining the error bit number of the Block with the discrete degree of the error bit number of the Block, and is represented by the total score. For the Flash, each Block has a corresponding score, and the Blocks are reordered according to the total score to generate a sorting table. The read-write operation of the Block is performed in the order of the sorting table in the subsequent Flash comparison. It can be understood that the greater the total score, the worse the stability of the Block, which is reflected in two aspects: first, the error bit number of the Block is high, and second, the discrete degree of the error bit number of each Page of the Block is large and uneven. According to these two points, it is determined that the Block is not stable.

[0066] In addition, since the error correction performance of the storage control chip has an upper limit, the Block whose error bit number exceeds the error correction performance will be directly determined as a bad Block and discarded without being used.

[0067] Figure 3 Fig. 3 is a flow diagram of a method for over-contrast according to another embodiment of the present application.

[0068] Referring to Fig. 3, a method for over-contrast includes the following steps: Figure 3 Step S310: Read the number of error bits of each Block in the Flash.

[0069] The description of step S310 can refer to step S210, which will not be repeated here.

[0070] Step S320: Read the number of error bits of each Page in each Block.

[0071] The description of step S320 can refer to step S220, which will not be repeated here.

[0072] Step S330: Obtain the dispersion of the number of error bits of each Block according to the number of error bits of each Page in each Block.

[0073] The description of step S330 can refer to step S230, which will not be repeated here.

[0074] Step S340: Read the Block number of each Block.

[0075] Step S350: Configure a weight parameter group, wherein the weight parameter group includes a first weight coefficient, a second weight coefficient and a third weight coefficient.

[0076] It should be noted that in this embodiment, the Block number is further comprehensively judged on the basis of the two dimensions of the number of error bits of each Block and the dispersion of the number of error bits of each Block. According to the physical characteristics of the Flash, the electrons of the floating gate transistors located on the left and right sides are more likely to be lost, compared with the floating gate transistors located on the inner side. The floating gate transistors located on the left and right sides usually correspond to the Blocks with the front and rear Block numbers. Therefore, according to the physical structure characteristics of the Flash, a weight coefficient is also configured for the Block number, but the weight coefficient occupies the lowest proportion.

[0077] In this embodiment, the first weight coefficient is configured as 0.6, which is for the dimension of the number of error bits of each Block, the second weight coefficient is configured as 0.3, which is for the dimension of the dispersion of the number of error bits of each Block, and the third weight coefficient is configured as 0.1, which is for the dimension of the Block number.

[0078] ​Step S360, according to the size of the error bit number of each Block, combining the first weight coefficient, the first score of each Block is calculated.

[0079] The description of step S360, please refer to step S250, here will not be repeated.

[0080] Step S370, according to the error bit number of each Block, combining the second weight coefficient, the second score of each Block is calculated.

[0081] The description of step S370, please refer to step S260, here will not be repeated.

[0082] Step S380, according to the block number of each Block, combining the third weight coefficient, the third score of each Block is calculated.

[0083] It should be noted that, according to formula 7) to calculate the third score of Block, wherein "S3" represents the third score of the current Block, "B" represents the block number of the current Block, "W3" third weight coefficient.

[0084]

[0085] So, assuming the block number of Block is 10, then =1.

[0086] Step S390, adding the first score, the second score and the third score corresponding to each Block, to sort each Block in the order of the total score value from large to small, and generate a sorting table.

[0087] It should be noted that, according to formula 8) to calculate the total score value of the current Block, wherein "S" represents the total score value of the current Block.

[0088]

[0089] So, get =42.232.

[0090] Step S391, the full disk read-write of Flash is executed, and the read-write operation of each Block is based on the order of the sorting table during the full disk read-write, and the read-write Bug of each Block is locked.

[0091] ​​​​It should be noted that in the embodiment, the stability of the Block is comprehensively judged from the number of error bits of the Block, the dispersion of the number of error bits of the Block, and the block number of the Block, and is represented by the total score value. For the Flash, each Block has a corresponding score, and the Blocks are reordered according to the total score value to generate a ranking table. In subsequent Flash comparison, the order in the ranking table is used to perform read and write operations of the Block. It can be understood that the greater the total score value, the worse the stability of the Block, which is reflected in three aspects: first, the number of error bits of the Block is high; second, the dispersion of the number of error bits of each Page of the Block is large and uneven; and third, the distribution position of the Block, which is the electron loss of the Block. According to the three points, it is determined that the Block is not stable.

[0092] The same as the foregoing method embodiments, the application discloses a comparison device and corresponding embodiments. Figure 4 Fig. 1 shows a structural schematic diagram of a comparison device in an embodiment of the application.

[0093] Referring to Fig. 1, Figure 4 A comparison device 400 includes a first reading module 410, a ranking module 420, and a read-write module 430. Wherein: The first reading module 410 is configured to read the number of error bits of each Block in the Flash.

[0094] The ranking module 420 is configured to generate a ranking table according to the size of the number of error bits of each Block, wherein the ranking table records the order of each Block from large to small according to the number of error bits.

[0095] The read-write module 430 is configured to perform full-disk read and write of the Flash, and perform read and write operations on each Block based on the order of the ranking table during the full-disk read and write, and lock the read and write Bug of each Block during the full-disk read and write.

[0096] It should be noted that the comparison method implemented by the comparison device disclosed in the embodiment is the same as the above-mentioned embodiments, so it will not be described in detail here. Alternatively, each module in the embodiment and the above-mentioned other operations or functions are respectively used to implement the method in the foregoing embodiments.

[0097] Figure 5 Fig. 2 shows a structural schematic diagram of a comparison device in another embodiment of the application.

[0098] Referring to Fig. 2, Figure 5A over contrast device 400, comprising: a first reading module 410, a second reading module 440, a discrete module 450, a sorting module 420 and a read-write module 430. Wherein the functions of the first reading module 410 and the read-write module 430 are described in the above embodiments, and will not be repeated here. Figure 4

[0099] The second reading module 440 is configured to read the error bit number of each Page in each Block.

[0100] Further, in the embodiment, the second reading module 440 comprises a Frame unit 441 and a confirmation unit 442. Wherein: The Frame unit 441 is configured to read the error bit number of each Frame in each Page.

[0101] The confirmation unit 442 is configured to select the highest error bit number in each Frame as the error bit number of the current Page.

[0102] The discrete module 450 is configured to obtain the error bit number discrete degree of each Block according to the error bit number of each Page in each Block.

[0103] The sorting module 420 comprises a weight unit 421, a first calculation unit 422, a second calculation unit 423 and a total score sorting unit 424. Wherein: The weight unit 421 is configured to configure a weight parameter group, wherein the weight parameter group comprises a first weight coefficient and a second weight coefficient.

[0104] The first calculation unit 422 is configured to calculate the first score of each Block according to the size of the error bit number of each Block in combination with the first weight coefficient.

[0105] The second calculation unit 423 is configured to calculate the second score of each Block according to the error bit number discrete degree of each Block in combination with the second weight coefficient.

[0106] The total score sorting unit 424 is configured to add the first score and the second score corresponding to each Block to sort each Block in descending order of the total score, and generate a sorting table.

[0107] It should be noted that the over contrast method realized by the over contrast device disclosed in the embodiment is as described above, and will not be described in detail here. Alternatively, each module in the embodiment and the above-mentioned other operations or functions are respectively used to realize the method in the foregoing embodiments.

[0108] Figure 6 Fig. 4 shows a structural schematic diagram of an over contrast device in another embodiment of the present application. ​

[0109] Please refer to Figure 6 A over contrast device 400, comprising: a first reading module 410, a second reading module 440, a discrete module 450, a third reading module 460, a sorting module 420 and a read-write module 430. Wherein the functions of the first reading module 410, the second reading module 440, the discrete module 450 and the read-write module 430 please refer to Figure 5 Here will not be repeated.

[0110] The third reading module 460 is used for reading the block number of each Block.

[0111] The sorting module 420 comprises: a weight unit 421, a first calculation unit 422, a second calculation unit 423, a third score unit 425 and a total score sorting unit 424. Wherein: the functions of the first calculation unit 422 and the second calculation unit 423 please refer to Figure 5 Here will not be repeated.

[0112] The weight unit 421 is used for configuring a weight parameter group, wherein the weight parameter group comprises a first weight coefficient, a second weight coefficient and a third weight coefficient.

[0113] The third score unit 425 is used for calculating the third score of each Block according to the block number of each Block combined with the third weight coefficient.

[0114] The total score sorting unit 424 is used for adding the first score, the second score and the third score corresponding to each Block, sorting each Block in the order of the total score value from large to small, and generating a sorting table.

[0115] It should be noted that the over contrast method realized by the over contrast device disclosed in the embodiment is as described above, so it will not be described in detail here. Alternatively, each module in the embodiment and the above-mentioned other operations or functions are respectively used to realize the method in the foregoing embodiments.

[0116] Please refer to Figure 7 Another embodiment of the present application shows a kind of computing electronic equipment 700, comprising: processor 710 and memory 720.

[0117] The processor 710 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc.

[0118] The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The memory 710 can include a variety of types of memory, such as system memory, read-only memory (ROM), and a permanent storage device.

[0119] The ROM can store static data or instructions required by the processor 720 or other modules of the computer. The permanent storage device can be a read-and-write memory device. The permanent storage device can be a non-volatile memory device that does not lose stored instructions and data even if the computer is powered off. In some embodiments, the permanent storage device employs a mass storage device (such as a magnetic or optical disk, flash memory) as the permanent storage device.

[0120] In some other embodiments, the permanent storage device can be a removable storage device (such as a floppy disk, optical disk). The system memory can be a read-and-write memory device or a volatile read-and-write memory device, such as a dynamic random access memory. The system memory can store some or all of the instructions and data required by the processor at runtime.

[0121] In addition, the memory 720 can include a combination of any computer readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic disks and / or optical disks can also be used.

[0122] In some embodiments, the memory 720 can include a read-and / or write removable storage device, such as a compact disc (CD), a read-only digital versatile disc (such as DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a min SD card, and a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer readable storage medium does not include a carrier wave and a transient electronic signal transmitted through a wireless or wired transmission. The memory 720 stores executable code, which when processed by the processor 710, can cause the processor 710 to perform part or all of the above-mentioned methods.

[0123] Furthermore, the method according to the present application can also be implemented as a computer program or a computer program product, which comprises computer program code instructions for performing some or all of the steps of the above-mentioned method according to the present application.

[0124] Alternatively, the present application can also be implemented as a computer readable storage medium (or a non-transitory machine readable storage medium or a machine readable storage medium) having stored thereon executable codes (or computer programs or computer instruction codes) which, when executed by a processor of an electronic device (or a server, etc.), cause the processor to perform some or all of the steps of the above-mentioned method according to the present application.

[0125] The embodiments of the present application have been described above, the above description is exemplary and is not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, practical application or improvement of the technology in the market, or to enable other ordinary skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for over-contrast, characterized in that: include: Read the number of error bits in each block in Flash; generating a sorting table according to the number of error bits of each block, wherein the sorting table records the order of the blocks in descending order of the number of error bits; The full disk read and write of the Flash is executed. When the full disk read and write is executed, the read and write operations are performed on each block based on the order of the sorting table, and the read and write bugs of each block are locked during the execution.

2. The over-contrast method according to claim 1, characterized in that: After reading the number of error bits in each block in the Flash, the following is also included: Read the number of error bits of each Page in each Block; Obtaining a dispersion of the number of error bits of each Block according to the number of error bits of each Page in each Block; Generating a sorting table according to the number of error bits of each block, wherein the sorting table records the order of the blocks in descending order of the number of error bits, including: configuring a weight parameter group, wherein the weight parameter group includes a first weight coefficient and a second weight coefficient; Calculating a first score for each block based on the number of error bits in each block and the first weight coefficient; Calculating a second score for each block based on the error bit number dispersion of each block in combination with the second weight coefficient; The first score and the second score corresponding to each Block are added together, the Blocks are sorted from largest to smallest total score, and a sorting table is generated.

3. The over-contrast method according to claim 2, characterized in that: The step of reading the number of error bits of each Page in each Block includes: Read the number of error bits of each Frame in each Page; The highest number of error bits in each of the Frames is selected as the number of error bits in the current Page.

4. The over-contrast method according to claim 2, characterized in that: After obtaining the error bit number dispersion of each block according to the error bit number of each page in each block, the method further includes: Read the block number of each block; The configuration weight parameter group, wherein the weight parameter group includes a first weight coefficient and a second weight coefficient, includes: configuring a weight parameter group, wherein the weight parameter group includes a first weight coefficient, a second weight coefficient, and a third weight coefficient; After calculating the second score of each block based on the error bit number dispersion of each block in combination with the second weight coefficient, the method further includes: Calculating a third score for each Block based on the block number of each Block and the third weight coefficient; The adding of the first score and the second score corresponding to each block, sorting the blocks in descending order of the total score, and generating a sorting table includes: The first score, the second score, and the third score corresponding to each Block are added together, and the Blocks are sorted from largest to smallest total score, and a sorting table is generated.

5. A contrast device, characterized in that: include: The first reading module is used to read the number of error bits of each block in the Flash; a sorting module, configured to generate a sorting table according to the number of error bits of each block, wherein the sorting table records the order of the blocks in descending order of the number of error bits; The read / write module is used to perform full disk read / write of the Flash. When performing the full disk read / write, the read / write operation is performed on each block based on the order of the sorting table, and the read / write bugs of each block are locked during the process.

6. The over-contrast device according to claim 5, characterized in that: Also includes: A second reading module is used to read the number of error bits of each Page in each Block; A discrete module, configured to obtain a discrete degree of the number of error bits of each Block according to the number of error bits of each Page in each Block; The sorting module includes: a weight unit, configured to configure a weight parameter group, wherein the weight parameter group includes a first weight coefficient and a second weight coefficient; a first calculation unit, configured to calculate a first score for each block according to the number of error bits of each block and the first weight coefficient; a second calculation unit, configured to calculate a second score for each block according to the dispersion of the number of error bits of each block in combination with the second weight coefficient; The total score sorting unit is configured to add the first score and the second score corresponding to each Block, sort the Blocks in descending order of the total score, and generate a sorting table.

7. The over-contrast device according to claim 6, characterized in that: The second reading module includes: A Frame unit, configured to read the number of error bits of each Frame in each Page; The confirmation unit is configured to select the highest number of error bits in each of the Frames as the number of error bits in the current Page.

8. The over-contrast device according to claim 6, characterized in that: Also includes: A third reading module is used to read the block number of each block; The weight unit is used to configure a weight parameter group, wherein when the weight parameter group includes a first weight coefficient and a second weight coefficient, it includes: configuring a weight parameter group, wherein the weight parameter group includes a first weight coefficient, a second weight coefficient, and a third weight coefficient; a third scoring unit, configured to calculate a third score for each of the blocks based on the block number of each block and the third weight coefficient; The total score sorting unit is configured to add the first score and the second score corresponding to each block, sort the blocks in descending order of the total score, and generate a sorting table, including: The first score, the second score, and the third score corresponding to each Block are added together, and the Blocks are sorted from largest to smallest total score, and a sorting table is generated.

9. An electronic device comprising: processor; as well as A memory having executable code stored thereon, wherein when the executable code is executed by the processor, the processor is caused to execute the over-comparison method according to any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that An executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the comparison method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Memory management method, memory control circuit unit and memory storage device

    CN111831210A

  • Storage controller and storage device initialization method

    CN112802512A

  • Digital verification method and system of Nand flash memory

    CN114242153A

  • Method and device for recycling junk data of blocks in storage system and medium

    CN115904264A

  • System and method for prioritization of bit error correction attempts

    US20200381076A1