Rewrite decision method, device, readable storage medium and electronic device

By collecting read and write information when the number of memory block reads reaches a preset value and inputting it into a decision tree to determine whether to perform a rewrite, the problem of invalid rewrites caused by memory read interference is solved, and the operating efficiency and life of the memory are improved.

CN120428925BActive Publication Date: 2025-10-17BIWIN STORAGE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510919101.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-17
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

In the prior art, invalid copies are frequently caused by read interference when the memory reads data, affecting data stability and memory life. How to reduce invalid copies and lower the number of migration and write times has become an urgent problem to be solved.

Method used

A rewrite decision method is adopted to determine whether the number of read times of the memory block reaches a first preset value, collect read and write information and input it into a trained decision tree for comprehensive judgment to decide whether to perform the rewrite operation and avoid invalid rewrite.

Benefits of technology

Through comprehensive judgment, invalid replication is reduced, the operating efficiency and service life of the memory are improved, and the effectiveness and accuracy of replication are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428925B_ABST
    Figure CN120428925B_ABST
Patent Text Reader

Abstract

The application discloses a copy decision method and device, a readable storage medium and an electronic device. When the read number of a block of a memory reaches a first preset value, read-write information is collected, the read-write information is input into a trained decision tree to determine whether to perform a copy operation, a copy decision result is obtained, and the memory is operated according to the copy decision result. The first preset value is the read number of repeatedly reading the same page in only one block in the memory until the read interference phenomenon occurs in the block. Unlike the prior art, whether to perform the copy is not simply determined according to whether the read number of the block reaches a threshold value, but when the read number of the block reaches the first preset value, the collected read-write information is input into the trained decision tree to comprehensively determine whether to perform the copy operation, so that invalid copy is reduced, the number of moving and writing is reduced, and the running efficiency and service life of the memory are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data reading and writing, and particularly relates to a rewriting decision method and device, a readable storage medium and an electronic device. BACKGROUND

[0002] When reading data in a certain memory cell, a Vpass voltage needs to be applied to the adjacent memory cell to ensure conduction, and this voltage will cause slight read programming to the adjacent memory cell, i.e., read interference, which will affect or damage the data stored in the adjacent cell. In order to solve the influence caused by read interference, when the data is about to be wrong, the correct data needs to be re-written, i.e., rewriting.

[0003] Currently, the judgment condition for whether rewriting is needed is whether the read number of a certain block reaches a certain threshold, and this threshold is obtained by repeatedly reading and writing a page in the block without reading and writing test of the remaining pages. In fact, the probability of this scenario is very low, because the firmware strategy is based on the consideration of wear leveling, and will not only read and write a page in the block, so in actual use, when the eMMC (Embedded Multi-Media Card) performs rewriting, the data is still relatively stable, and the effect of rewriting is general. Therefore, how to reduce invalid rewriting, reduce the number of moving write, improve the running efficiency and service life has become one of the problems to be solved. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a rewriting decision method and device, a readable storage medium and an electronic device, which can reduce invalid rewriting and reduce the number of moving write.

[0005] In order to solve the above technical problem, one technical solution adopted by the present application is:

[0006] A rewriting decision method, comprising the steps of:

[0007] judging whether the read number of a block of a memory reaches a first preset value, if yes, collecting read-write information;

[0008] inputting the read-write information into a trained decision tree to judge whether to perform rewriting operation, and obtaining a rewriting decision result;

[0009] performing operation on the memory according to the rewriting decision result;

[0010] The first preset value is the read number of repeatedly reading the same page in only one block in the memory until the read interference phenomenon occurs in the block.

[0011] In order to solve the above technical problem, another technical solution adopted by the present application is:

[0012] A copy decision device comprises:

[0013] A collection module is configured to determine whether the read times of a block of a memory reach a first preset value, and collect read-write information if yes;

[0014] A decision module is configured to input the read-write information into a trained decision tree to determine whether to perform a copy operation, and obtain a copy decision result;

[0015] An operation module is configured to perform an operation on the memory according to the copy decision result.

[0016] The first preset value is the read times when only the same page in one block of the memory is repeatedly read until the read interference phenomenon occurs in the block.

[0017] To solve the above technical problems, another technical solution adopted by the present application is:

[0018] A computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement each step of the copy decision method.

[0019] To solve the above technical problems, another technical solution adopted by the present application is:

[0020] An electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement each step of the copy decision method.

[0021] The present application has the following beneficial effects: when the read times of a block of a memory reach a first preset value, read-write information is collected, the read-write information is input into a trained decision tree to determine whether to perform a copy operation, a copy decision result is obtained, and an operation is performed on the memory according to the copy decision result. The first preset value is the read times when only the same page in one block of the memory is repeatedly read until the read interference phenomenon occurs in the block. Unlike the simple determination of whether to perform a copy in the prior art according to whether the read times of a block reach a threshold value, the read-write information collected is input into a trained decision tree to comprehensively determine whether to perform a copy operation when the read times of a block reach a first preset value, thereby reducing invalid copies and reducing the number of times of moving and writing, and further improving the running efficiency and service life of the memory. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 A step flowchart of a copy decision method of an embodiment of the present application;

[0023] Figure 2A structure schematic diagram of a copy decision device according to an embodiment of the present application;

[0024] Figure 3 A structure schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] To make the technical content, the achieved purposes and effects of the present application clear, the following will be described in combination with embodiments and the accompanying drawings.

[0026] Please refer to Figure 1 A copy decision method, comprising the steps of:

[0027] judging whether the read times of a block of a memory reach a first preset value, and if so, collecting read-write information;

[0028] inputting the read-write information into a trained decision tree to judge whether to perform a copy operation, and obtaining a copy decision result;

[0029] performing an operation on the memory according to the copy decision result;

[0030] The first preset value is the read times when only the same page in one block of the memory is repeatedly read until the read interference phenomenon occurs in the block.

[0031] From the above description, the beneficial effects of the present application are as follows: when the read times of a block of a memory reach a first preset value, read-write information is collected, the read-write information is inputted into a trained decision tree to judge whether to perform a copy operation, a copy decision result is obtained, and an operation is performed on the memory according to the copy decision result. The first preset value is the read times when only the same page in one block of the memory is repeatedly read until the read interference phenomenon occurs in the block. Unlike the simple judgment of whether to perform a copy operation according to whether the read times of a block reach a threshold value in the prior art, when the read times of a block reach the first preset value, the collected read-write information is inputted into a trained decision tree to comprehensively judge whether to perform a copy operation, thereby reducing invalid copy, reducing the number of times of moving and writing, and further improving the running efficiency and service life of the memory.

[0032] Further, the collecting of read-write information comprises:

[0033] determining the page with the minimum read times in the block;

[0034] determining the difference between the read times of the page with the minimum read times and the read times of the block;

[0035] comparing the difference with the first preset value to obtain a comparison result;

[0036] determining whether the page with the minimum read frequency triggers read error correction to obtain a first determination result;

[0037] determining whether the read error correction is successful to obtain a second determination result;

[0038] obtaining read-write information according to the comparison result, the first determination result and the second determination result.

[0039] From the above description, it can be seen that the difference value is compared with the first preset value to obtain a comparison result, it is determined whether the page with the minimum read frequency triggers read error correction to obtain a first determination result, it is determined whether the read error correction is successful to obtain a second determination result, and the above information is input into the decision tree, so that it can be more comprehensive and accurate to determine whether the current needs to perform rewriting, and the effectiveness of rewriting is ensured.

[0040] Further, before determining whether the read frequency of the block of the memory reaches the first preset value, the method further comprises:

[0041] performing stress testing on the memory used for training;

[0042] determining whether the read frequency of the block of the memory used for training reaches the first preset value, if yes, determining a difference value between the read frequency of the page with the minimum read frequency in the block and the read frequency of the block, and determining a first number of the block in which the difference value reaches the first preset value;

[0043] obtaining a second number of the block corresponding to the page with the minimum read frequency which triggers read error correction, a third number of the block corresponding to the page whose read error correction is successful, a fourth number of the block in the memory used for training which performs rewriting, and a fifth number of the block in the memory used for training;

[0044] training the decision tree based on the first number, the second number, the third number, the fourth number and the fifth number to obtain a trained decision tree.

[0045] From the above description, it can be seen that the decision tree is trained based on the first number, the second number, the third number, the fourth number and the fifth number, so that the decision tree can more accurately predict the behavior of the memory, so as to output more accurate rewriting decision results in the subsequent.

[0046] Further, the training of the decision tree based on the first number, the second number, the third number, the fourth number and the fifth number to obtain a trained decision tree comprises:

[0047] calculating the information gain rate of each classification based on the first number, the second number, the third number, the fourth number and the fifth number;

[0048] traverse all candidate classification attributes, take the attribute with the maximum information gain ratio as the root node, until all samples belong to a unified category or there are no remaining classification attributes, to obtain a decision tree;

[0049] recursively process each subset in the decision tree, remove the branches with the lowest and highest information gain ratios, to obtain a trained decision tree.

[0050] As can be seen from the above description, by calculating the information gain ratio to select the root node, it can be ensured that the decision tree is split at each node based on the feature that is most helpful for classification, and the recursive removal of the branches with the lowest and highest information gain ratios helps to prevent overfitting and underfitting, making the decision tree structure more compact and efficient, and improving the classification accuracy of the model.

[0051] Further, the calculation of the information gain ratio of each classification based on the first number, the second number, the third number, the fourth number and the fifth number comprises:

[0052] calculating the information entropy of the data set based on the fourth number and the fifth number;

[0053] calculating the conditional entropy of the data set under each classification based on the first number, the second number, the third number and the fifth number;

[0054] calculating the information gain of each classification according to the information entropy of the data set and the conditional entropy of the data set under each classification;

[0055] calculating the split information of each classification based on the first number, the second number, the third number and the fifth number;

[0056] calculating the information gain ratio of each classification according to the information gain of each classification and the split information of each classification.

[0057] As can be seen from the above description, by comprehensively considering the information gain and the split information, a decision tree model with better generalization ability can be constructed, the prediction accuracy for new data can be improved, and thus the accuracy of the rewriting decision can be improved.

[0058] Further, the calculation of the information entropy of the data set based on the fourth number and the fifth number comprises:

[0059] determining the probability of performing rewriting and the probability of not performing rewriting in the memory used for training based on the fourth number and the fifth number;

[0060] calculating the information entropy of the data set according to the probability of performing rewriting and the probability of not performing rewriting.

[0061] According to the above description, the information entropy of the data set is calculated according to the probability of performing the copy and the probability of not performing the copy, so that the actual distribution of the copy and the non-copy operation in the data set can be more accurately reflected, the uncertainty of the data can be more truly evaluated, and the training effect of the decision tree is ensured.

[0062] Further, the operation on the memory according to the copy decision result comprises:

[0063] If the copy decision result is to perform the copy, a copy operation is performed on the memory.

[0064] If the copy decision result is not to perform the copy, no copy operation is performed on the memory.

[0065] According to the above description, whether to perform the copy operation on the memory is determined according to the copy decision result, which is more reliable and effectively avoids invalid copy.

[0066] Please refer to Figure 2 Another embodiment of the present application provides a copy decision device, comprising:

[0067] A collection module is configured to determine whether the read times of a block of the memory reach a first preset value, and collect read-write information if yes.

[0068] A decision module is configured to input the read-write information into the trained decision tree to determine whether to perform the copy operation, and obtain a copy decision result.

[0069] An operation module is configured to operate on the memory according to the copy decision result.

[0070] The first preset value is the read times when the same page in only one block of the memory is repeatedly read until the read interference phenomenon occurs in the block.

[0071] Another embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize each step of the above copy decision method.

[0072] Please refer to Figure 3 Another embodiment of the present application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor realizes each step of the above copy decision method when executing the computer program.

[0073] The above copy decision method, device, readable storage medium and electronic device of the present application can be applied to the eMMC read-write scene, and the following specific embodiments are described:

[0074] Please refer toFigure 1 An embodiment of the present application is:

[0075] A copy decision method, comprising the steps of:

[0076] S1, stress test the memory used for training.

[0077] In an optional embodiment, the stress test is a random read of the pages in the block of the memory used for training.

[0078] S2, determine whether the number of reads of the block of the memory used for training reaches a first preset value, if so, determine the difference between the number of reads of the page with the minimum number of reads in the block and the number of reads of the block, and determine the first number of blocks whose difference reaches the first preset value.

[0079] The first preset value is the number of reads of the same page in only one block of the memory until the read interference phenomenon occurs in the block.

[0080] S3, obtain the second number of blocks corresponding to the page with the minimum number of reads that triggers the read error correction, the third number of blocks corresponding to the page that successfully performs read error correction, the fourth number of blocks in the memory used for training that performs copy, and the fifth number of blocks in the memory used for training.

[0081] S4, train the decision tree based on the first number, the second number, the third number, the fourth number and the fifth number to obtain a trained decision tree, specifically comprising S41-S43:

[0082] S41, calculate the information gain rate of each classification based on the first number, the second number, the third number, the fourth number and the fifth number, specifically comprising S411-S415:

[0083] S411, calculate the information entropy of the data set based on the fourth number and the fifth number.

[0084] Specifically, determine the probability of performing copy and the probability of not performing copy in the memory used for training based on the fourth number and the fifth number; calculate the information entropy of the data set according to the probability of performing copy and the probability of not performing copy, specifically:

[0085] ;

[0086] In the formula, info( D ) represents the information entropy of the data set D , the data set D is all blocks in the memory, m represents the number of result categories in the copy classification, and pi probability of the result i in the classification indicating whether to perform overwriting.

[0087] For example, assuming that there are 5 blocks in the memory, data collection is performed on the 5 blocks to obtain Table 1, as shown in Table 1, the fourth number is 4 and the fifth number is 5, then the probability of performing overwriting is 4 / 5 and the probability of not performing overwriting is 1 / 5, .

[0088] Table 1: Data collection results of 5 blocks in the memory

[0089]

[0090] S412, calculating the conditional entropy of the data set under each classification based on the first number, the second number, the third number and the fifth number, specifically:

[0091] ;

[0092] wherein, info M ( D ) represents the conditional entropy of the data set under the classification M , v represents the number of result categories in the classification D , represents the number of samples taking the jth result in the classification M , represents the total number of samples of the data set , that is, the total number of all blocks in the memory, info M ( ) represents the information entropy of the data set D , D j represents the classification in which the difference value reaches the first preset value, D j represents the classification in which the page with the minimum read number triggers read error correction, A represents the classification in which read error correction of the page triggering read error correction is successful. B C For example, as shown in Table 1, the first number is 2, the second number is 3, the third number is 2, the fourth number is 4 and the fifth number is 5, then:

[0093] ;

[0094] ;

[0095] ;

[0096] ;

[0097] ​Wherein, 2 / 5 and 3 / 5 in the first formula are because there are 2 "yes" (as numerator 2) and 3 "no" (as numerator 3) in the first column of Table 1, 2 / 2 and 0 / 2 are because there are 2 "yes" (as denominator 2) in the first column of Table 1, and the results of the fourth column corresponding to the 2 "yes" in the first column are 2 "yes" (as numerator 2) and 0 "no" (as numerator 0), 2 / 3 and 1 / 3 are because there are 3 "no" (as denominator 3) in the first column of Table 1, and the results of the fourth column corresponding to the 3 "no" in the first column are 2 "yes" (as numerator 2) and 1 "no" (as numerator 1), the second formula and the third formula are sequentially similar.

[0098] S413, calculating the information gain of each classification according to the information entropy of the data set and the conditional entropy of the data set under each classification, specifically:

[0099] ;

[0100] In the formula, gain( M ) represents the information gain of the classification M .

[0101] The above formula is expanded as:

[0102] ;

[0103] ;

[0104] .

[0105] S414, calculating the split information of each classification based on the first number, the second number, the third number and the fifth number, specifically:

[0106] ;

[0107] In the formula, split_info M ( D ) represents the split information of the classification M .

[0108] For example, continuing the above example, then:

[0109] ;

[0110] ;

[0111] .

[0112] S415, calculating an information gain ratio of each category according to the information gain of each category and the split information of each category, specifically:

[0113] ;

[0114] wherein, gain_ratio( M ) represents the information gain ratio of the category M .

[0115] The above formula is expanded as:

[0116] ;

[0117] ;

[0118] .

[0119] S42, traversing all candidate category attributes, taking the attribute with the largest information gain ratio as the root node, until all samples belong to a unified category or there is no remaining category attribute, obtaining a decision tree.

[0120] S43, recursively processing each subset in the decision tree, removing the branches with the lowest and highest information gain ratios, obtaining a trained decision tree.

[0121] S5, judging whether the read times of the block of the memory reaches a first preset value, if yes, collecting read-write information, specifically including S51-S56:

[0122] S51, judging whether the read times of the block of the memory reaches a first preset value, if yes, determining the page with the minimum read times in the block.

[0123] S52, determining the difference between the read times of the page with the minimum read times and the read times of the block.

[0124] S53, comparing the difference with the first preset value to obtain a comparison result.

[0125] Wherein, the comparison result is that the difference reaches the first preset value or the difference does not reach the first preset value.

[0126] S54, judging whether the page with the minimum read times triggers read error correction to obtain a first judgment result.

[0127] Wherein, the first judgment result is that the page with the minimum read times triggers read error correction or the page with the minimum read times does not trigger read error correction.

[0128] S55, judging whether the read error correction is successful to obtain a second judgment result.

[0129] The second judgment result is that read error correction has been successfully corrected or read error correction has not been successfully corrected.

[0130] S56, obtaining read-write information according to the comparison result, the first judgment result and the second judgment result.

[0131] S6, inputting the read-write information into the trained decision tree to determine whether to perform a rewrite operation, and obtaining a rewrite decision result.

[0132] S7, performing an operation on the memory according to the rewrite decision result, specifically including S71-S72:

[0133] S71, if the rewrite decision result is to perform a rewrite, performing a rewrite operation on the memory.

[0134] S72, if the rewrite decision result is not to perform a rewrite, not performing a rewrite operation on the memory.

[0135] Please refer to Figure 2 Embodiment two of the present application is:

[0136] A rewrite decision device, comprising:

[0137] A collection module for determining whether the read frequency of a block of the memory reaches a first preset value, and collecting read-write information if so;

[0138] A decision module for inputting the read-write information into a trained decision tree to determine whether to perform a rewrite operation, and obtaining a rewrite decision result;

[0139] An operation module for performing an operation on the memory according to the rewrite decision result.

[0140] The first preset value is the read frequency when only the same page in a block of the memory is repeatedly read until the read interference phenomenon occurs in the block.

[0141] Embodiment three of the present application is:

[0142] A computer readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement each step of the rewrite decision method in embodiment one.

[0143] Embodiment four of the present application is:

[0144] Please refer to Figure 3 An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing each step of the rewrite decision method in embodiment one when executing the computer program.

[0145] In conclusion, the present application provides a copy decision method, device, readable storage medium and electronic equipment. When the read number of the block of the memory reaches the first preset value, read-write information is collected, the read-write information is input into the trained decision tree to judge whether to perform the copy operation, a copy decision result is obtained, and the memory is operated according to the copy decision result. The first preset value is the read number when only the same page in one block in the memory is repeatedly read until the read interference phenomenon occurs in the block. Instead of simply judging whether to perform the copy operation according to whether the read number of the block reaches the threshold value in the prior art, when the read number of the block reaches the first preset value, the collected read-write information is input into the trained decision tree to comprehensively judge whether to perform the copy operation, so that invalid copy is reduced, the number of move-write is reduced, and the running efficiency and service life of the memory are improved. In addition, the difference value is compared with the first preset value to obtain a comparison result, it is judged whether the page with the minimum read number triggers read error correction to obtain a first judgment result, it is judged whether the read error correction is successful to obtain a second judgment result, and the several information is input into the decision tree, so that it can be more comprehensively and accurately judged whether the copy needs to be performed at present, and the effectiveness of the copy is ensured.

[0146] In the above-described embodiments provided by the present application, it should be understood that the disclosed method, device, computer readable storage medium and electronic equipment can be implemented in other manners. For example, the above-described device embodiment is merely illustrative. For example, the division of the modules is merely a logical function division. There can be another division manner in actual implementation. For example, a plurality of components or modules can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the modules shown or discussed can be indirect coupling or communication connection through some interfaces, devices or components, and can be electrical, mechanical or in other forms.

[0147] The components described as separated components can or can not be physically separated, and the components shown as components can or can not be physical modules, i.e., can be located in one place, or can be distributed on a plurality of network modules. Some or all of the components can be selected according to actual needs to achieve the purpose of the present embodiment.

[0148] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each component can be physically present alone, or two or more modules can be integrated into one module. The above integrated module can be realized in the form of hardware or in the form of a software functional module.

[0149] The integrated module, if implemented in the form of a software function module and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, etc.

[0150] It should be noted that, for the foregoing method embodiments, in order to facilitate description, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited by the order of the described actions, because according to the present application, certain steps can be performed in other orders or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0151] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0152] The above only describes the embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent transformation or direct or indirect application in related technical fields based on the content of the specification and drawings of the present application is also included in the patent protection scope of the present application.

Claims

1. A replication decision method, characterized in that: Including steps: Stress test the memory used for training; determining whether the number of reads of a block of the memory used for the training reaches a first preset value, and if so, determining a difference between the number of reads of a page with the smallest number of reads in the block and the number of reads of the block, and determining the first number of blocks for which the difference reaches the first preset value; Obtaining a second number of blocks corresponding to the page with the minimum number of reads that triggered overread error correction, a third number of blocks corresponding to pages for which read error correction was successful, a fourth number of blocks in the memory used for training on which overwriting is performed, and a fifth number of blocks in the memory used for training; Training a decision tree based on the first number, the second number, the third number, the fourth number, and the fifth number to obtain a trained decision tree; Determining whether the number of reads of a block of the memory reaches a first preset value, and if so, collecting read and write information; Inputting the read / write information into the trained decision tree to determine whether to perform a replication operation, and obtaining a replication decision result; operating the memory according to the duplication decision result; The first preset value is the number of times a same page in a block of the memory is repeatedly read until a read disturbance phenomenon occurs in the block.

2. A replication decision method according to claim 1, characterized in that: The acquisition of read and write information includes: Determining a page in the block having a minimum number of reads; determining a difference between the number of reads of the page having the smallest number of reads and the number of reads of the block; Comparing the difference with the first preset value to obtain a comparison result; Determining whether the page with the smallest number of reads triggers overread error correction to obtain a first determination result; Determining whether the read error correction is successful to obtain a second determination result; Read and write information is obtained according to the comparison result, the first judgment result and the second judgment result.

3. A replication decision method according to claim 1, characterized in that: The training of the decision tree based on the first number, the second number, the third number, the fourth number, and the fifth number to obtain a trained decision tree includes: Calculating the information gain rate of each classification based on the first number, the second number, the third number, the fourth number, and the fifth number; Traverse all candidate classification attributes and take the attribute with the largest information gain rate as the root node until all samples belong to the same category or there are no remaining classification attributes, and obtain a decision tree; Recursively perform the training on each subset in the decision tree, remove the branches with the lowest and highest information gain rates, and obtain a trained decision tree.

4. A replication decision method according to claim 3, characterized in that: The calculating the information gain rate of each classification based on the first number, the second number, the third number, the fourth number, and the fifth number includes: Calculating the information entropy of the data set based on the fourth number and the fifth number; Calculating the conditional entropy of the data set under each category based on the first number, the second number, the third number, and the fifth number; Calculate the information gain of each category based on the information entropy of the data set and the conditional entropy of the data set under each category; Calculating split information for each category based on the first number, the second number, the third number, and the fifth number; The information gain rate of each category is calculated according to the information gain of each category and the split information of each category.

5. A replication decision method according to claim 4, characterized in that: Calculating the information entropy of the data set based on the fourth number and the fifth number includes: determining a probability of performing overwriting and a probability of not performing overwriting in the memory used for the training based on the fourth number and the fifth number; The information entropy of the data set is calculated according to the probability of performing the replication and the probability of not performing the replication.

6. A replication decision method according to claim 1, characterized in that: The operating the memory according to the overwrite decision result includes: If the duplication decision result is to perform duplication, performing a duplication operation on the memory; If the rewrite decision result is not to perform rewrite, then no rewrite operation is performed on the memory.

7. A replication decision device, characterized in that: include: an acquisition module, configured to determine whether the number of reads of a block of the memory has reached a first preset value, and if so, to acquire read and write information; A decision module, configured to input the read / write information into a trained decision tree to determine whether to perform a replication operation and obtain a replication decision result; an operating module, configured to operate the memory according to the replication decision result; The first preset value is the number of reads performed by repeatedly reading only the same page in a block of the memory until a read disturbance phenomenon occurs in the block; Before determining whether the number of read times of the memory block reaches the first preset value, the method further includes: Stress test the memory used for training; determining whether the number of reads of a block of the memory used for the training reaches a first preset value, and if so, determining a difference between the number of reads of a page with the smallest number of reads in the block and the number of reads of the block, and determining the first number of blocks for which the difference reaches the first preset value; Obtaining a second number of blocks corresponding to the page with the minimum number of reads that triggered overread error correction, a third number of blocks corresponding to pages for which read error correction was successful, a fourth number of blocks in the memory used for training on which overwriting is performed, and a fifth number of blocks in the memory used for training; A decision tree is trained based on the first number, the second number, the third number, the fourth number, and the fifth number to obtain a trained decision tree.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the overwrite decision method according to any one of claims 1 to 6 is implemented.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the processor implements the steps of the overwrite decision method according to any one of claims 1 to 6.

Citation Information

Patent Citations

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

    CN111863099A

  • Random number generation method and apparatus, electronic device, and storage medium

    WO2022142111A1