A kind of service life of flash memory prediction technique and device based on decision Tree algorithms
Technical field
The present invention relates to service life of flash memory electric powder predictions, more particularly, to a kind of service life of flash memory based on decision Tree algorithms
Prediction technique and device.
Background technique
Memory is in modern information technologies for protecting stored memory device.In the calculating process of electronic equipment,
Initial data, computer program, intermediate operation result and the final operation result of input can be all stored in memory, be modern
One of core component of Information Technology Development.Currently, memory in the market is broadly divided into: volatile memory and non-volatile
Memory.Flash memory is a kind of nonvolatile memory, it can save data for a long time after a power failure, and have data transmission
The advantages that speed is fast, production cost is low, memory capacity is big, so being widely used among electronic equipment.
Under existing flash memory structure, due to the influence of semiconductor fabrication process, the unit of flash memory internal can be with erasing
The increase of number is written and leads to oxide degradation, so that mistake occurs during storage in the storage chip, and most
Flash memory is caused to fail eventually.Therefore, it tests and determines that the service life of flash memory has great significance in flash memory production, use process.
The remaining life for predicting flash memory, can allow flash memory device user before using equipment or use is set
Standby period understands the loss state of memory, and data caused by due to memory cell fails is avoided to be lost.Meanwhile memory is used
The flash memory remaining life information that family can also be obtained according to prediction changes storing data strategy effective use flash memory and saves data.
Summary of the invention
The present invention for the technical problems in the prior art, it is pre- to provide a kind of service life of flash memory based on decision Tree algorithms
Method and device is surveyed, a kind of characteristic quantity or the combination of several characteristic quantities of flash memory are measured, to part in all characteristic quantities or combination
Characteristic quantity performs mathematical calculations, and the combination of operation result or measurement result or operation result and measurement result is input to decision tree
In algorithm, the predicted value of service life of flash memory is calculated by decision Tree algorithms.
The technical scheme to solve the above technical problems is that
In a first aspect, the present invention provides a kind of service life of flash memory prediction technique based on decision Tree algorithms, comprising the following steps:
The characteristics of flash memory amount of flash memory to be predicted is obtained, the characteristics of flash memory amount is that the service life of flash memory based on decision Tree algorithms is pre-
Survey characteristic quantity corresponding to the node type of model;
The characteristics of flash memory amount is inputted into the service life of flash memory prediction model based on decision Tree algorithms, the longevity of flash memory is calculated
Order predicted value.
Further, the characteristics of flash memory amount includes the flash memory physical message or right directly acquired by flash disk operation
The flash memory physical message carries out the calculation process value of arithmetic operation acquisition.
Further, the flash memory physical message directly acquired by flash disk operation includes at least in following physical message
It is one or more:
The programming time of flash chip, read access time, erasing time, electric current, chip power-consumption, threshold voltage distribution, storage
Program/erase periodicity, condition errors number of pages, the condition errors block that block number, storage page number, flash chip currently live through
Number, number of error bits and error rate.
Further, the calculation process value for carrying out arithmetic operation acquisition to the flash memory physical message includes at least
One of following operation is a variety of:
Linear operation, different characteristic amount between the linear operation of characteristic quantity, the nonlinear operation of characteristic quantity, different characteristic amount
Between nonlinear operation, calculate different memory page characteristic quantities maximum value, calculate different memory page characteristic quantities minimum value,
The nonlinear operation between linear operation, different memory page characteristic quantities between different memory page characteristic quantities, different storages
The nonlinear operation between linear operation, different memory block characteristic quantities between block feature amount, the different memory block characteristic quantities of calculating
Maximum value memory block characteristic quantity different with calculating minimum value.
Further, before the characteristics of flash memory amount of the acquisition flash memory to be predicted, this method further includes establishing to be based on
The service life of flash memory prediction model of decision Tree algorithms, specifically includes the following steps:
Sample data is obtained, is randomly selected from the flash memory products set of same type different batches under same manufacturing process
The flash chip of predetermined quantity is as test sample;
Corresponding flash disk operation is carried out to sample flash memory, is obtained for establishing the service life of flash memory prediction based on decision Tree algorithms
Flash memory physical message and service life of flash memory information needed for model, and life prediction node type is set;
By decision Tree algorithms handle data founding mathematical models, using the corresponding characteristics of flash memory amount of the node type as
The input variable of mathe-matical map relationship in algorithm, output variable of the service life of flash memory predicted value as mathe-matical map relationship, training number
Model is learned, to obtain the optimal service life of flash memory prediction model based on decision Tree algorithms.
Further, described that corresponding flash disk operation is carried out to sample flash memory, it obtains and is calculated for establishing based on decision tree
Flash memory physical message needed for the service life of flash memory prediction model of method and service life of flash memory information, comprising:
Step 601, the randomly drawing sample chip from test sample, and storage is randomly choosed from each sample flash memory
Block;
Step 602, flash memory storage block is executed and wipes operation, and record dependence test physical message;
Step 603, test data set is sent to flash memory storage block to deposit flash memory after having sent test data vector
It stores up block and executes write operation, and keep the data stored in flash memory storage block for a period of time, the holding time, length was according to flash chip
Type determine;
Step 604, flash memory storage block is executed and reads data manipulation, the test data for reading data and transmission is compared
Compared with recording and saving error data information, do not saved if not malfunctioning;Other physical quantitys are recorded simultaneously;
Step 605, the operation that step 602 arrives step 605 is repeated, the number of erasable operation is recorded;Work as number of operations
When reaching setting value, test macro records the related data of the last step 602 flash memory storage block into step 605 operation;
Step 606, count and save the data error rate information of flash memory storage block;
Step 607, the operation for repeating step 605 and step 606, until flash memory reaches lifetime limitation, statistics flash memory
Program/erase operation cycle number.
Second aspect, the service life of flash memory forecasting system based on decision Tree algorithms that the present invention also provides a kind of, including
Data acquisition unit, the data acquisition unit are connect with flash memory to be predicted, for feature needed for obtaining prediction
Amount;
Life prediction unit, the characteristic quantity input for the flash memory to be predicted that the life prediction unit is used to acquire is based on certainly
The life prediction value of flash memory is calculated in the service life of flash memory prediction model of plan tree algorithm.
The third aspect, the present invention also provides a kind of flash memory test equipment, the flash memory test equipment passes through data switching exchane
It is connect with host computer test macro, including test master control borad and flash memory test daughter board;
The test master control borad is realized by FPGA, for carrying out flash disk operation, is acquired for establishing Life Prediction Model
Or the characteristics of flash memory amount for life prediction;
The flash memory test daughter board is for connecting sample flash memory or flash memory to be predicted.
The third aspect, the present invention also provides a kind of computer readable storage medium, be stored in the medium for realizing
A kind of computer software programs of the service life of flash memory prediction technique based on decision Tree algorithms described in first aspect present invention.
The beneficial effects of the present invention are: 1. present invention are based on the decision Tree algorithms technology in current computer field forward position
It is proposed a kind of service life of flash memory prediction technique, compared with current technology, the advance of this method is the preparation and training of data
Process is very simple, the characteristics of capable of intuitively embodying very much data.2. the present invention is using a variety of dependability parameters as decision
The input of tree algorithm, with only higher using a kind of accuracy of parameter bimetry value compared with the Life Prediction Model of foundation.3.
Decision Tree algorithms in service life of flash memory prediction technique proposed by the present invention based on decision Tree algorithms had in the relatively short time
Interior the advantages of result that is feasible and working well can be made to large data source.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the service life of flash memory prediction technique based on decision Tree algorithms of the embodiment of the present invention.
Fig. 2 is a kind of structure chart of flash memory test macro of the embodiment of the present invention.
Fig. 3 is a kind of flow chart that service life of flash memory prediction model is established using recurrence tree algorithm of the embodiment of the present invention.
Fig. 4 is a kind of specific implementation flow chart of training data acquisition modes of the embodiment of the present invention.
Fig. 5 is a kind of specific implementation flow chart for returning division, classification in tree algorithm of the embodiment of the present invention.
Specific embodiment
The principle and features of the present invention will be described below with reference to the accompanying drawings, and the given examples are served only to explain the present invention, and
It is non-to be used to limit the scope of the invention.
Fig. 1 is the flow diagram of present invention prediction service life of flash memory, and the pre- flow gauge of service life of flash memory as shown in the figure is suitable for institute
There is flash type, detailed explanation is carried out to Fig. 1 using a kind of flash memory products as embodiment below.
In the present embodiment, using 3D multipole unit nand flash memory (the MLC NAND flash) product under certain manufacturing process as
Test object and life prediction object.
As shown in Figure 1, in the present embodiment, the method for the present invention the following steps are included:
Step S01, according to following rule extraction sample from the flash memory products set: sample flash memory is same manufacture work
The flash memory of same type under skill;The chip sample of identical quantity is randomly selected, from the chip of different batches to ensure sample
Diversity.Wherein, the batch of sampling is to randomly select, and sample size can be sampled batch flash memory total amount 1 percent.
Step S02, sample flash memory is connect with flash memory test macro start flash memory physical message needed for test is collected with
Service life of flash memory information.Flash memory physical message involved in the present embodiment includes: flash memory from beginning to use to can not be during normal use
The programming time of block, erasing time, threshold voltage distribution and error rate increase in the program/erase period in interior flash memory storage chip
Under the conditions of the data information that changes (threshold voltage is distributed as optional physical message).
The acquisition modes of flash memory storage block programming time are as follows: programming time logging modle is set in flash memory test macro;
The programming time logging modle clock cycle that record passes through while flash memory starts to be written data manipulation is receiving flash memory return
Clock periodicity is stopped recording after data programming complement mark;Programming time value is clock cycle duration multiplied by Mbus
Periodicity.
The acquisition modes in flash memory storage block erasing time and programming time acquisition modes similarly, by the erasing in test macro
Time recording module records the lasting clock periodicity of erasing operation, and erasing time value is clock cycle duration multiplied by erasing
Clock periodicity.The acquisition modes of flash memory cell threshold voltage distribution are as follows: test macro sends READ-RETRY to flash memory
The reading reference voltage that flash memory is altered in steps in command set reads simultaneously data and is distributed according to data Data-Statistics threshold voltage is read.
The acquisition modes of flash memory storage block error rate are as follows: test macro executes reading data manipulation to flash memory and reads from flash memory
The test data of the data of reading and write-in is compared mistake of statistics data amount check by data, test macro, and error rate is mistake
Accidentally number is divided by total data amount check.
The flash memory test macro used in step S02, structure is as shown in Fig. 2, mainly include host computer testing and control system
System and flash memory control module.Wherein, host computer test macro is write programming system by computer language and is realized;Flash memory controls mould
Block is realized by FPGA.
Step S03, by regression tree algorithm process data founding mathematical models, the physical message that test is obtained is as calculation
The input variable of mathe-matical map relationship in method, output variable of the service life of flash memory predicted value as mathe-matical map relationship;The present embodiment
In to return tree algorithm as the intelligent algorithm of founding mathematical models, heretofore described decision Tree algorithms are not limited to the calculation
Method.Service life of flash memory value refers to the program/erase periodicity that flash memory products can execute before disabling.
In the present embodiment step S03, the process for establishing service life of flash memory prediction model using recurrence tree algorithm is as shown in Figure 3.
According to Fig. 3, the specific steps of service life of flash memory prediction model are established are as follows:
(1) data needed for establishing regression tree model are obtained, which can obtain by test with money chip, can also be with
By using other people test datas to same money chip.
In step (1), test shown in the flow chart 4 of chip data:
Sample flash memory is connect by a) the randomly drawing sample chip from flash memory set with test macro, and from each sample
Memory block is randomly choosed in flash memory.
B) flash memory storage block is executed by flash memory test platform and wipes operation, and record dependence test physical quantity.
C) test data set is sent to flash memory storage block by test macro, it is right after having sent test data vector
Flash memory storage block executes write operation, and keeps the data stored in flash memory storage block for a period of time, and the holding time, length was according to sudden strain of a muscle
The type for depositing chip determines.
D) flash memory is executed by test macro and reads data manipulation, the test data for reading data and transmission is compared
Compared with recording and saving error data information, do not saved if not malfunctioning;Other physical quantitys are recorded simultaneously.
E) operation that step (b) arrives step (d) is repeated, the number of erasable operation is recorded;It is set when number of operations reaches
When definite value, test macro records the related data of the last step (b) flash memory storage block into step (d) operation.
F) it is distributed by the threshold voltage that test macro measures flash cell, records and stores the threshold voltage distribution of unit
Information;The step is optional step, does not include the step in testing procedure if prediction object does not have READ-RETRY function.
G) test macro counts and saves the data error rate information of each memory block of flash memory.
H) it repeats (e) and arrives (g), until flash memory reaches lifetime limitation;The program/erase that test macro counts flash memory operates week
Issue.
(2) life prediction node type is set.
According to the definition of decision tree, life prediction node type described in step (2) mainly include flash memory programming time,
Read access time, erasing time, electric current, chip power-consumption, threshold voltage distribution, storage block number, storage page number, flash memory are currently undergone
(features described above amount can for program/erase periodicity, condition errors number of pages, condition errors block number, number of error bits and the error rate crossed
To choose one or several and these characteristic quantities mutation as key node).
(3) data in (1) are updated to and are returned in tree algorithm, the model for returning tree algorithm bimetry is trained,
Obtain the recurrence tree algorithm Life Prediction Model with degree of precision.
High precision forecasting model described in step (3) refer mainly to using the smallest attribute of regression variance as division side
Case successively divides obtained recurrence tree algorithm prediction model.
According to the definition of decision tree, training method described in step (3) is mainly as shown in Figure 5:
A) according to data dependence, the higher physical quantity of the degree of correlation is chosen as split vertexes (such as programming time).
B) classified to split vertexes (such as programming time value range is A-B, can be classified as A-a, a-b ...,
z-B)。
C) regression variance of the mode classification is calculated, concrete mode is
Wherein I is a section of split vertexes, a point in the section i, xiIt is the i point corresponding service life, μ is section
The service life average value of interior all the points;L represents entire node value interval.Regression variance is smaller to show that model is more accurate.Pass through one
A little processing modes (such as C4.5) optimize node-classification, so that regression variance is less than a certain threshold value, with mode classification work
For the final classification of the split vertexes.
D) step a) is repeated to c), and division training is continued to model.Until splitting into certain number of plies or regression variance is small
In a certain threshold value.
E) regression tree algorithm model is extracted.
Data processing operation required for service life of flash memory prediction model is established to realize by computer program, it is used
Computer language is not limited to a certain computer language.
Step S04 measures the corresponding input physical message of flash memory to be predicted using the flash memory test platform in step S02,
As the input variable of Life Prediction Model, the output valve of mathematic(al) expectation prediction model predicts the remaining longevity of target flash product
Life value.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.