CN112530512A - Method and device for testing flash memory storage equipment - Google Patents
Method and device for testing flash memory storage equipment Download PDFInfo
- Publication number
- CN112530512A CN112530512A CN202011608228.0A CN202011608228A CN112530512A CN 112530512 A CN112530512 A CN 112530512A CN 202011608228 A CN202011608228 A CN 202011608228A CN 112530512 A CN112530512 A CN 112530512A
- Authority
- CN
- China
- Prior art keywords
- data
- test
- read
- centroids
- initial
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 237
- 230000005055 memory storage Effects 0.000 title claims abstract description 38
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 31
- 239000013598 vector Substances 0.000 claims description 27
- 238000003860 storage Methods 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000010998 test method Methods 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000004458 analytical method Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000003064 k means clustering Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005034 decoration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000011056 performance test Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C29/00—Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
- G11C29/56—External testing equipment for static stores, e.g. automatic test equipment [ATE]; Interfaces therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Probability & Statistics with Applications (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The invention discloses a method and a device for testing a flash memory device. Wherein, the method comprises the following steps: performing read-write test on a plurality of computer flash memory devices by adopting the test case to obtain test data; clustering the test data through a clustering algorithm to obtain a plurality of data sets; and generating a test result according to the plurality of data sets. The invention solves the technical problems of large error and low efficiency of the related technology that the test log is generated by a special read-write tool and is manually analyzed to determine the read-write speed of the flash memory storage device.
Description
Technical Field
The invention relates to the field of hardware testing, in particular to a testing method and a testing device of flash memory equipment.
Background
In the related art, the performance test method of the flash memory storage device mainly uses a special hard disk read-write tool such as FIO, BIT and the like to perform speed test, sets a read-write speed threshold in a program as a performance judgment standard, classifies the speed in different threshold intervals, and determines that the performance is poor if the speed is less than the threshold, otherwise, the read-write performance is excellent. Or the test result is only output to the log of the test tool, and the read-write speed data of the log is analyzed manually to subjectively judge that the read-write performance of the flash memory storage device is excellent. The problems of large error and low efficiency exist.
In the related art, the threshold is used as the determination criterion, so that the determination criterion is rigid and has no transitivity, and the numerical value near the threshold is misjudged or misjudged due to a small difference (for example, the threshold of the determination criterion is 300M/S, if the actual measurement rate of the flash memory device is 299M/S, the speed is misjudged to be low due to being smaller than the threshold); the method of analyzing the print log may also consider small batches of flash memory devices, and may be very inefficient for large batches of flash memory devices.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing a flash memory device, which are used for at least solving the technical problems of large error and low efficiency caused by the fact that a test log is generated by a special read-write tool and the test log is manually analyzed to determine the read-write speed of the flash memory device in the related technology.
According to an aspect of an embodiment of the present invention, there is provided a method for testing a flash memory device, including: performing read-write test on a plurality of flash memory devices by adopting the test case to obtain test data; clustering the test data through a clustering algorithm to obtain a plurality of data sets; and generating a test result according to the plurality of data sets.
Optionally, the performing, by using the test case, a read-write test on the plurality of flash memory devices to obtain test data includes: controlling the plurality of flash memory devices to run the test case to perform read-write test; determining that the test of the test case successfully completed in the plurality of flash memory devices passes through the flash memory devices; and acquiring data obtained by performing read-write test on the flash memory storage device in the test, and taking the obtained data as the test data.
Optionally, clustering the test data by using a clustering algorithm to obtain a plurality of data sets includes: selecting a plurality of centroids, wherein the centroids correspond to the data sets one to one; and clustering the test data according to the plurality of centroids through a clustering algorithm to obtain a plurality of data sets.
Optionally, selecting a plurality of centroids includes: selecting a plurality of initial centroids; optimizing the plurality of initial centroids to obtain a plurality of updated centroids; determining a plurality of updated centroids as the plurality of centroids under the condition that the distances between the plurality of updated centroids and the corresponding initial centroids are smaller than a preset distance; and under the condition that the distances between the plurality of updated centroids and the corresponding initial centroids are not less than the preset distance, optimizing the plurality of real centroids as new initial centroids again until the distances between the plurality of optimized updated centroids and the corresponding initial centroids are less than the preset distance.
Optionally, selecting a plurality of initial centroids includes: setting the number of data sets to be obtained as the number of the centroids; determining a data vector of test data of each flash memory device, wherein the test data comprises read-write data, the read-write data comprises a read speed and a write speed, and the data vector is obtained by calculation according to coordinates corresponding to the read speed and the write speed; randomly selecting read-write data as a first initial centroid; determining a second initial centroid according to the data vector of the read-write data in the test data and the first initial centroid; and determining a third initial centroid according to the data vector of the read-write data in the test data and the second initial centroid until the number of initial centroids is determined.
Optionally, determining the second initial centroid according to the data vector of the read-write data in the test data and the first initial centroid includes: determining the distance between the read-write data except the first initial centroid in the test data and the first initial centroid; determining the probability that the read-write data except the first initial centroid in the test data is a second initial centroid according to the distance; selecting the read data with the maximum probability as a second initial centroid; determining a third initial centroid according to the data vector of the read-write data in the test data and the second initial centroid comprises: determining the distance between the read-write data except the first initial centroid and the second initial centroid in the test data; determining the probability that the read-write data except the first initial centroid and the second initial centroid in the test data is a third initial centroid according to the distance; and selecting the read data with the maximum probability as a third initial centroid.
Optionally, optimizing the plurality of initial centroids to obtain a plurality of updated centroids includes: classifying the read-write data of the test data according to the distances between the read-write data of the test data and the initial centroids to obtain a plurality of initial sets corresponding to the initial centroids, wherein the read-write data belongs to the initial set corresponding to the initial centroid closest to the read-write data; and determining actual centroids of the plurality of initial sets, and taking the actual centroids as updated centroids corresponding to the initial centroids of the initial sets to obtain a plurality of updated centroids.
According to another aspect of the embodiments of the present invention, there is also provided a test apparatus for a flash memory device, including: the test module is used for performing read-write test on the plurality of flash memory devices by adopting the test case to obtain test data; the clustering module is used for clustering the test data through a clustering algorithm to obtain a plurality of data sets; and the generating module is used for generating a test result according to the plurality of data sets.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium, where the computer storage medium includes a stored program, and when the program runs, the apparatus where the computer storage medium is located is controlled to execute the method for testing a flash memory storage device according to any one of the foregoing items.
According to another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is configured to execute a program, where the program executes a method for testing a flash memory device according to any one of the above descriptions.
In the embodiment of the invention, a test case is adopted to carry out read-write test on a plurality of flash memory devices to obtain test data; clustering the test data through a clustering algorithm to obtain a plurality of data sets; according to the mode of generating the test result according to the data sets, the method comprises the steps of performing read-write test on the flash memory storage devices, clustering test data through a clustering algorithm, classifying the flash memory storage devices, and screening test data blocks rapidly, so that the aims of simultaneously testing the mass flash memory storage devices and classifying the test data are fulfilled, the technical effects of improving the test efficiency of the mass flash memory storage devices and the efficiency and accuracy of inquiring the test data are achieved, the technical problems that in the related technology, a test log is generated through a special read-write tool, the read-write speed of the flash memory storage devices is determined through manual analysis of the test log, the error is large, and the efficiency is low are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of testing a flash memory device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a test module according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the hardware connections of a test system according to an embodiment of the present invention;
FIG. 4 is a flow chart of a testing method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a testing apparatus for a flash memory device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method embodiment of a method for testing a flash memory device, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a testing method of a flash memory device according to an embodiment of the present invention, as shown in fig. 1, the method includes the steps of:
step S102, performing read-write test on a plurality of flash memory devices by adopting a test case to obtain test data;
step S104, clustering the test data through a clustering algorithm to obtain a plurality of data sets;
and step S106, generating a test result according to the plurality of data sets.
Through the steps, the test case is adopted to carry out read-write test on the plurality of flash memory devices to obtain test data; clustering the test data through a clustering algorithm to obtain a plurality of data sets; according to the mode of generating the test result according to the data sets, the method comprises the steps of performing read-write test on the flash memory storage devices, clustering test data through a clustering algorithm, classifying the flash memory storage devices, and screening test data blocks rapidly, so that the aims of simultaneously testing the mass flash memory storage devices and classifying the test data are fulfilled, the technical effects of improving the test efficiency of the mass flash memory storage devices and the efficiency and accuracy of inquiring the test data are achieved, the technical problems that in the related technology, a test log is generated through a special read-write tool, the read-write speed of the flash memory storage devices is determined through manual analysis of the test log, the error is large, and the efficiency is low are solved.
In the embodiment, the read-write performance of the flash memory device (Solid State Disk) is an important parameter, the read-write test is simultaneously performed on a plurality of flash memory devices through the test case, the obtained test data is clustered to obtain a plurality of data sets, each data set corresponds to one centroid, the read-write performance of the data set can be reflected by the read-write speed corresponding to the centroid, and the test result can be quickly and effectively generated according to the plurality of data sets. When the number of the flash memory devices is large, compared with the traditional test mode, the efficiency is improved more obviously.
Before the test case is used for performing read-write test on the plurality of flash memory devices to obtain test data, the plurality of flash memory devices are connected with a host through a switch, wherein the host is used for receiving the test case. After the plurality of flash memory devices are connected with the host through the switch, whether network connection is intact is detected, data transmission can be guaranteed, and under the condition that the network connection is intact, the test case is transmitted to the plurality of flash memory devices for read-write test.
Optionally, the performing, by using the test case, a read-write test on the plurality of flash memory devices to obtain test data includes: controlling a plurality of flash memory devices to run test cases to perform read-write test; determining that the test of the successfully completed test case in the plurality of flash memory devices passes through the flash memory devices; and acquiring data obtained by performing read-write test on the flash memory storage device, and taking the obtained data as test data.
Under the condition that the flash memory storage device does not successfully complete the test case, the test failure of the flash memory storage device is shown, and the flash memory storage device which fails in the test cannot generate effective test data, so that only the test number of the flash memory storage devices which pass the test is obtained, and the effectiveness and the accuracy of the test data are improved.
Optionally, clustering the test data by using a clustering algorithm to obtain a plurality of data sets includes: selecting a plurality of centroids, wherein the centroids correspond to the data sets one to one; and clustering the test data according to the plurality of centroids through a clustering algorithm to obtain a plurality of data sets.
The centroid is also a center for clustering, and whether the test data belongs to the data set of the centroid can be determined according to the distance between each test data and the centroid in the coordinate system. The test data includes read-write data, which specifically includes a read speed and a write speed, and in this embodiment, the coordinate system may be established by using the read speed and the write speed as coordinate axes, respectively.
Optionally, selecting a plurality of centroids includes: selecting a plurality of initial centroids; optimizing the initial centroids to obtain updated centroids; determining the plurality of updated centroids as a plurality of centroids under the condition that the distances between the plurality of updated centroids and the corresponding initial centroids are smaller than the preset distance; and under the condition that the distances between the plurality of updated centroids and the corresponding initial centroids are not less than the preset distance, optimizing the plurality of real centroids as new initial centroids again until the distances between the plurality of updated centroids and the corresponding initial centroids after optimization are less than the preset distance.
After selecting initial barycenter, the effective scientific classification of test data can not be guaranteed to initial barycenter probably, consequently, optimize initial barycenter, obtain the update barycenter, under the condition that a plurality of update barycenter respectively and the initial barycenter that corresponds all are less than preset distance, confirm a plurality of update barycenter and be a plurality of barycenter, show that initial barycenter can be effectual classify test data, however, initial barycenter is compared in the actual barycenter of initial set, also be the update barycenter, the update barycenter is more accurate, consequently, will update the barycenter and regard as above-mentioned a plurality of barycenter.
In addition, under the condition that the distances between the plurality of updated centroids and the corresponding initial centroids are not less than the preset distance, the data set obtained by clustering the initial centroids is not reasonable enough, and the plurality of real centroids are used as new initial centroids to be optimized again until the distances between the plurality of updated centroids and the corresponding initial centroids are less than the preset distance. Therefore, the rationality of the mass center is improved, and the classification accuracy and the scientificity of a plurality of data sets are improved.
Optionally, selecting a plurality of initial centroids includes: taking the number of data sets to be obtained as the number of centroids; determining a data vector of test data of each flash memory device, wherein the test data comprises read-write data, the read-write data comprises a read speed and a write speed, and the data vector is obtained by calculation according to coordinates corresponding to the read speed and the write speed; randomly selecting read-write data as a first initial centroid; determining a second initial centroid according to the data vector of the read-write data in the test data and the first initial centroid; and determining a third initial centroid according to the data vector of the read-write data and the second initial centroid in the test data until the number of the initial centroids is determined.
The method comprises the steps of randomly selecting a first initial centroid, determining a second initial centroid according to data vectors of read-write data in test data, determining the initial centroids of the required number according to the second initial centroid and the data vectors of the read-write data in the test data, and repeating the steps until the initial centroids of the required number are determined, and recording the initial centroids.
Optionally, determining the second initial centroid according to the data vector of the read-write data in the test data and the first initial centroid includes: determining the distance between the read-write data except the first initial centroid in the test data and the first initial centroid; determining the probability that the read-write data except the first initial centroid in the test data is the second initial centroid according to the distance; selecting the read data and the write data with the maximum probability as a second initial centroid; determining a third initial centroid according to the data vector of the read-write data in the test data and the second initial centroid includes: determining the distance between the read-write data except the first initial centroid and the second initial centroid in the test data and the second initial centroid; determining the probability that the read-write data except the first initial centroid and the second initial centroid in the test data is the third initial centroid according to the distance; and selecting the read data with the highest probability as a third initial centroid.
Determining the probability that the read-write data except the first initial centroid in the test data is the second initial centroid according to the first centroid and the read-write data except the first initial centroid in the test data, which can be specifically determined by the following probability formula:
where τ is the probability that the ith read-write data is the second centroid (next centroid), and d (rw)i) Data vector rw for ith read-write dataiDistance from the first centroid (current centroid).
By the above formula, it is possible to select the second initial centroid from the first initial centroids, and then select the above number of initial centroids one by one.
The meaning of the above probability formula is that the read-write data farthest from the current centroid is determined as the next initial centroid.
Optionally, optimizing the plurality of initial centroids to obtain a plurality of updated centroids includes: classifying the read-write data of the test data according to the distances between the read-write data of the test data and the initial centroids to obtain a plurality of initial sets corresponding to the initial centroids, wherein the read-write data belongs to the initial set corresponding to the initial centroid closest to the read-write data; and determining the actual centroids of the plurality of initial sets, and taking the actual centroids as the updated centroids corresponding to the initial centroids of the initial sets to obtain a plurality of updated centroids.
And after the plurality of initial centroids are optimized to obtain a plurality of updated centroids, clustering according to the updated centroids through a clustering algorithm to obtain a plurality of data sets.
And determining the read-write performance gap between the plurality of data sets according to the read speed and the write speed of the updated centroid corresponding to the data set. And a data set with better read-write performance can be determined, and the test of a plurality of flash memory devices is completed.
It should be noted that the present application also provides an alternative implementation, and the details of the implementation are described below.
The embodiment is applied to the analysis of the read-write performance of the flash memory storage device, particularly the analysis and presentation of the read-write performance results of a large batch of flash memory storage devices, the misjudgment problem of division standard threshold transition zones is avoided, different test cases are led in, the read-write performance under different test cases is respectively analyzed and test analysis reports are generated, and the analysis and the checking of the performance of the flash memory storage devices under different parameters are facilitated. Automatically acquiring test cases, simultaneously testing a plurality of testers, and automatically acquiring and analyzing data by a host.
Fig. 2 is a schematic diagram of a test module according to an embodiment of the present invention, and as shown in fig. 2, the embodiment is divided into five modules in total, a flash memory device to be tested, a flash memory device read-write test module, a host data monitoring module, a host read-write parameter (test case) module, and a host big data analysis module.
Fig. 3 is a schematic diagram of hardware connection of a test system according to an embodiment of the present invention, and fig. 4 is a flowchart of a test method according to an embodiment of the present invention, as shown in fig. 3 and fig. 4, the present embodiment provides a batch flash memory device read-write performance automatic analysis method based on a K-Means clustering algorithm.
The method uses the existing FIO read-write test tool, and mainly comprises the following steps:
1. the testing machine detects that the network connection is intact, if the network connection is detected to be intact, the step 2 is executed, if the network connection is not detected to be intact, the test is quitted, and the monitoring network is reconnected;
2. each testing machine respectively obtains a test case from the host, corresponding read-write testing is carried out according to the case, and after one sample is tested, the flash memory storage equipment which is not tested is removed;
3. repeating the step 2 until all the test cases are completed;
4. after the test of all the flash memory storage devices is finished, the host acquires read-write test data of all the testers;
5. the host machine processes the read-write data based on the K-Means algorithm to complete performance analysis and classification.
The test case IO engine totally uses libaio, and 4K sequential read-write, 128K random read-write and 32K sequential read-write are set for read-write respectively.
Now, a detailed description will be given of the implementation process of classifying the read-write rate of the flash memory storage device based on the K-Means clustering algorithm:
assume that the number of classification sets is P (i.e., the number of clusters), and the maximum number of iterations is M.
Firstly, constructing a read-write data pair original data set:
setting the read-write speed of each disk as a data pair, wherein N tested disks have N groups of read-write speed data pairs for each test script, (r)1,w1)、(r2,w2)、(r3,w3)…(rN,wN) The corresponding original data pair vector set is D { rw1,rw2,rw3…rwNIs the set of desired output data pairs O { { O { (O) }1},{O2},{O3}…{OP}}。
Secondly, selecting a proper initial centroid:
selecting a data pair from N data pairs randomly as a centroid c1For each vector rw in the set of N sets of data pairsi(i ═ 1,2,3 … N), the minimum distance d (rw) of each vector from the currently selected centroid (i.e. the distance of the centroid that is close to itself) is calculatedi) Calculating the probability that each sample is chosen to be the next centroidThe next data pair is selected as the other centroid using a roulette algorithm.
Iterating step until P optimal data pairs are selected as centroids, and using set C { C }1,c2,c3…cPRepresents it.
Thirdly, optimizing the position of the mass center:
fourthly, each centroid vector is recorded as cj(j-1, 2,3 … P) according to the formulaCalculating the distances from N data pairs to P centroid data pairs respectively, and dividing the data pairs with smaller distances from each centroid into a set to which the centroid belongs, such as data pairs rwiTo the center of mass cjWhen the distance of (3) is smaller, rwiTo a centroid cjO 'of'cj=Ocj∪{rwi};
Fifthly, all the sets are calculated, P data pair sets are totally obtained, and P new centroids are recalculated for the new P data pair sets
Fourthly, convergence judgment and result output:
sixthly, calculating the distance between the new P centroids and the original P centroids, considering the algorithm to be converged if the distance is less than a certain convergence value, outputting a statistical result at the moment, if the distance is more than the set convergence value, iterating and calculating the step (d) - (c) on the premise that the iteration number is less than the maximum iteration number, and otherwise, finishing the calculation and outputting the statistical result.
In the whole algorithm execution process, each read-write data pair carries SN information of the flash memory storage device corresponding to the current read-write speed, so that the hierarchy of the read-write speed of a certain flash memory storage device can be conveniently checked through SN in the finally generated statistical result.
According to the above algorithm implementation, the specific implementation details are as follows:
as shown in table 1, after n-round testing by 10 testing machines, 100 sets of read-write speed pairs were obtained under the 128K sequential read-write test scenario.
TABLE 110 test data for n test runs
The 100 groups of read-write rate data pairs are selected as an original set and marked as D { rw1,rw2,rw3…rw100And selecting the value of the classification set number P as 3 in order to better mark and display the performance of the flash memory storage device. All the read-write rate data pairs are divided into low read-write rate, medium read-write rate and high read-write rate.
According to the step 2, a point is randomly selected from the original set as a first initial centroid and is recorded as c1Calculating all vectors and c of the set D1Is denoted as d (rw)1)、d(rw2)…d(rw100) Calculating the probability of each point becoming the next centroid, and calculating by applying a wheel disc algorithm to obtain a second centroid; in the same way, three optimal centroids are found out and are recorded as c1、c2、c3。
Calculating the distances D from all vectors of the set D to the three centroids respectivelyij(i 1,2,3 … 100) (j 1,2,3) classified into a similar set O according to the distance from the three centroids1、O2、O3。
For new 3 data pair sets O1、O2、O3Recalculating 3 new centroids, calculating the distances between the new 3 centroids and the original 3 centroids, considering the algorithm to be converged if the distances are less than a certain convergence value, and outputting a statistical result at the moment, otherwise iterating the steps until the convergence is reached. Therefore, three data sets are generated after the program is converged and are respectively used for storing read-write rate pairs, and the identification of the rapid read-write rate performance can be realized through the algorithm.
The method classifies the read-write speed of the flash memory storage devices based on the K-Means clustering algorithm, realizes good speed distribution judgment of the flash memory storage devices, and can clearly describe the flash memory storage devices with the read-write speed in a transition zone and at the edge instead of one-time cutting.
Fig. 5 is a schematic diagram of a testing apparatus for a flash memory device according to an embodiment of the present invention, and as shown in fig. 5, according to another aspect of the embodiment of the present invention, there is also provided a testing apparatus for a flash memory device, including: a testing module 52, a clustering module 54, and a generation module 56, which are described in detail below.
The test module 52 is configured to perform read-write test on the multiple flash memory devices by using the test case to obtain test data; a clustering module 54 connected to the test module 52 for clustering the test data by a clustering algorithm to obtain a plurality of data sets; and a generating module 56, connected to the clustering module 54, for generating a test result according to the plurality of data sets.
By the device, the test case of the test module 52 is adopted to carry out read-write test on the plurality of flash memory devices to obtain test data; the clustering module 54 clusters the test data through a clustering algorithm to obtain a plurality of data sets; the generation module 56 generates a test result according to the plurality of data sets, performs read-write test on the plurality of flash memory devices, clusters the test data through a clustering algorithm, classifies the plurality of flash memory devices, and rapidly screens the test data block, thereby achieving the purpose of simultaneously testing the mass flash memory devices and classifying the test data, thereby achieving the technical effects of improving the test efficiency of the mass flash memory devices, the efficiency and the accuracy of inquiring the test data, and further solving the technical problems of generating a test log through a special read-write tool in the related art, manually analyzing the test log to determine the read-write speed of the flash memory devices, having large error and low efficiency.
According to another aspect of the embodiments of the present invention, there is also provided a computer storage medium, where the computer storage medium includes a stored program, and when the program runs, the apparatus where the computer storage medium is located is controlled to execute the method for testing the flash memory storage device in any one of the above.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes a method for testing a flash memory device according to any one of the above methods.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (10)
1. A method of testing a flash memory device, comprising:
performing read-write test on a plurality of computer flash memory devices by adopting the test case to obtain test data;
clustering the test data through a clustering algorithm to obtain a plurality of data sets;
and generating a test result according to the plurality of data sets.
2. The method of claim 1, wherein performing read-write testing on the plurality of computer flash memory devices using the test case to obtain test data comprises:
controlling the plurality of flash memory devices to run the test case to perform read-write test;
determining that the test of the test case successfully completed in the plurality of flash memory devices passes through the flash memory devices;
and acquiring data obtained by performing read-write test on the flash memory storage device in the test, and taking the obtained data as the test data.
3. The method of claim 1, wherein clustering the test data by a clustering algorithm to obtain a plurality of data sets comprises:
selecting a plurality of centroids, wherein the centroids correspond to the data sets one to one;
and clustering the test data according to the plurality of centroids through a clustering algorithm to obtain a plurality of data sets.
4. The method of claim 3, wherein selecting a plurality of centroids comprises:
selecting a plurality of initial centroids;
optimizing the plurality of initial centroids to obtain a plurality of updated centroids;
determining a plurality of updated centroids as the plurality of centroids under the condition that the distances between the plurality of updated centroids and the corresponding initial centroids are smaller than a preset distance;
and under the condition that the distances between the plurality of updated centroids and the corresponding initial centroids are not less than the preset distance, optimizing the plurality of real centroids as new initial centroids again until the distances between the plurality of optimized updated centroids and the corresponding initial centroids are less than the preset distance.
5. The method of claim 4, wherein selecting a plurality of initial centroids comprises:
setting the number of data sets to be obtained as the number of the centroids;
determining a data vector of test data of each flash memory device, wherein the test data comprises read-write data, the read-write data comprises a read speed and a write speed, and the data vector is obtained by calculation according to coordinates corresponding to the read speed and the write speed;
randomly selecting read-write data as a first initial centroid;
determining a second initial centroid according to the data vector of the read-write data in the test data and the first initial centroid;
and determining a third initial centroid according to the data vector of the read-write data in the test data and the second initial centroid until the number of initial centroids is determined.
6. The method of claim 5, wherein determining a second initial centroid from the data vectors of the read and write data in the test data and the first initial centroid comprises:
determining the distance between the read-write data except the first initial centroid in the test data and the first initial centroid;
determining the probability that the read-write data except the first initial centroid in the test data is a second initial centroid according to the distance;
selecting the read data with the maximum probability as a second initial centroid;
determining a third initial centroid according to the data vector of the read-write data in the test data and the second initial centroid comprises:
determining the distance between the read-write data except the first initial centroid and the second initial centroid in the test data;
determining the probability that the read-write data except the first initial centroid and the second initial centroid in the test data is a third initial centroid according to the distance;
and selecting the read data with the maximum probability as a third initial centroid.
7. The method of claim 4, wherein optimizing the plurality of initial centroids to obtain a plurality of updated centroids comprises:
classifying the read-write data of the test data according to the distances between the read-write data of the test data and the initial centroids to obtain a plurality of initial sets corresponding to the initial centroids, wherein the read-write data belongs to the initial set corresponding to the initial centroid closest to the read-write data;
and determining actual centroids of the plurality of initial sets, and taking the actual centroids as updated centroids corresponding to the initial centroids of the initial sets to obtain a plurality of updated centroids.
8. An apparatus for testing a flash memory device, comprising:
the test module is used for performing read-write test on the plurality of flash memory devices by adopting the test case to obtain test data;
the clustering module is used for clustering the test data through a clustering algorithm to obtain a plurality of data sets;
and the generating module is used for generating a test result according to the plurality of data sets.
9. A flash memory storage medium, wherein the computer storage medium comprises a stored program, and wherein the program, when executed, controls a device in which the computer storage medium is located to perform the method for testing a flash memory storage device according to any one of claims 1 to 7.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the method for testing a flash memory device according to any one of claims 1 to 7 when running.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011257824 | 2020-11-11 | ||
CN2020112578249 | 2020-11-11 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112530512A true CN112530512A (en) | 2021-03-19 |
Family
ID=74977479
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011608228.0A Pending CN112530512A (en) | 2020-11-11 | 2020-12-29 | Method and device for testing flash memory storage equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112530512A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116340191A (en) * | 2023-05-31 | 2023-06-27 | 合肥康芯威存储技术有限公司 | Method, device, equipment and medium for testing memory firmware |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140173369A1 (en) * | 2012-12-14 | 2014-06-19 | Virtium Technology, Inc. | Classifying flash devices using ecc |
US9971548B1 (en) * | 2017-03-06 | 2018-05-15 | Nutanix, Inc. | Storage resource management employing performance analytics |
US20190065577A1 (en) * | 2017-08-31 | 2019-02-28 | Intel Corporation | Target number of clusters based on internal index fibonacci search |
CN109657891A (en) * | 2018-09-18 | 2019-04-19 | 深圳供电局有限公司 | Load characteristic analysis method based on self-adaptive k-means + + algorithm |
CN110543897A (en) * | 2019-08-16 | 2019-12-06 | 苏州浪潮智能科技有限公司 | memory bank classifying method, system, terminal and storage medium |
CN110554936A (en) * | 2018-06-04 | 2019-12-10 | 记忆科技(深圳)有限公司 | SSD (solid State disk) testing method and system |
CN110705606A (en) * | 2019-09-12 | 2020-01-17 | 武汉大学 | Spatial K-means clustering method based on Spark distributed memory calculation |
CN111220889A (en) * | 2020-01-02 | 2020-06-02 | 长江存储科技有限责任公司 | Wafer test data processing method and equipment |
CN111243647A (en) * | 2020-01-02 | 2020-06-05 | 长江存储科技有限责任公司 | Flash memory programming parameter determination method and device, electronic equipment and storage medium |
CN111290932A (en) * | 2020-02-22 | 2020-06-16 | 苏州浪潮智能科技有限公司 | Performance estimation method and device of storage equipment |
CN111611171A (en) * | 2020-05-25 | 2020-09-01 | 网易(杭州)网络有限公司 | Test case processing method and device and storage medium |
-
2020
- 2020-12-29 CN CN202011608228.0A patent/CN112530512A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140173369A1 (en) * | 2012-12-14 | 2014-06-19 | Virtium Technology, Inc. | Classifying flash devices using ecc |
US9971548B1 (en) * | 2017-03-06 | 2018-05-15 | Nutanix, Inc. | Storage resource management employing performance analytics |
US20190065577A1 (en) * | 2017-08-31 | 2019-02-28 | Intel Corporation | Target number of clusters based on internal index fibonacci search |
CN110554936A (en) * | 2018-06-04 | 2019-12-10 | 记忆科技(深圳)有限公司 | SSD (solid State disk) testing method and system |
CN109657891A (en) * | 2018-09-18 | 2019-04-19 | 深圳供电局有限公司 | Load characteristic analysis method based on self-adaptive k-means + + algorithm |
CN110543897A (en) * | 2019-08-16 | 2019-12-06 | 苏州浪潮智能科技有限公司 | memory bank classifying method, system, terminal and storage medium |
CN110705606A (en) * | 2019-09-12 | 2020-01-17 | 武汉大学 | Spatial K-means clustering method based on Spark distributed memory calculation |
CN111220889A (en) * | 2020-01-02 | 2020-06-02 | 长江存储科技有限责任公司 | Wafer test data processing method and equipment |
CN111243647A (en) * | 2020-01-02 | 2020-06-05 | 长江存储科技有限责任公司 | Flash memory programming parameter determination method and device, electronic equipment and storage medium |
CN111290932A (en) * | 2020-02-22 | 2020-06-16 | 苏州浪潮智能科技有限公司 | Performance estimation method and device of storage equipment |
CN111611171A (en) * | 2020-05-25 | 2020-09-01 | 网易(杭州)网络有限公司 | Test case processing method and device and storage medium |
Non-Patent Citations (2)
Title |
---|
杨秀璋 等: "Pyhton网络数据爬取及分析从入门到精通(分析篇", 30 June 2018, 北京航空航天大学出版社, pages: 90 * |
王海燕 等: "大足石刻佛教造像脸部虚拟修复", 30 April 2019, 重庆大学出版社, pages: 41 - 42 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116340191A (en) * | 2023-05-31 | 2023-06-27 | 合肥康芯威存储技术有限公司 | Method, device, equipment and medium for testing memory firmware |
CN116340191B (en) * | 2023-05-31 | 2023-08-08 | 合肥康芯威存储技术有限公司 | Method, device, equipment and medium for testing memory firmware |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108986869B (en) | Disk fault detection method using multi-model prediction | |
CN113688042B (en) | Determination method and device of test scene, electronic equipment and readable storage medium | |
KR101768438B1 (en) | Apparatus and method for classifying data and system for collecting data of using the same | |
CN109842513A (en) | Network exception event analytical equipment, method and its computer storage medium | |
CN108052528A (en) | A kind of storage device sequential classification method for early warning | |
CN111752775B (en) | Disk fault prediction method and system | |
US20040022442A1 (en) | Method and system for face detection using pattern classifier | |
CN112214369A (en) | Hard disk fault prediction model establishing method based on model fusion and application thereof | |
US7716152B2 (en) | Use of sequential nearest neighbor clustering for instance selection in machine condition monitoring | |
CA3141144A1 (en) | Optimizing training data for image classification | |
CN110389866A (en) | Disk failure prediction technique, device, computer equipment and computer storage medium | |
CN105871879A (en) | Automatic network element abnormal behavior detection method and device | |
CN109951468B (en) | Network attack detection method and system based on F value optimization | |
CN114756420A (en) | Fault prediction method and related device | |
CN112530512A (en) | Method and device for testing flash memory storage equipment | |
CN115798559A (en) | Failure unit prediction method, device, equipment and storage medium | |
CN112766427A (en) | Training method, device and equipment of image recognition model | |
CN111863135B (en) | False positive structure variation filtering method, storage medium and computing device | |
CN105678557A (en) | Method and device for generating model, method and device for evaluating service quality | |
CN110427316B (en) | Embedded software defect repairing method based on access behavior perception | |
CN113934585A (en) | Disk failure prediction method and device, equipment and storage medium | |
CN111258874B (en) | User operation track analysis method and device based on web data | |
CN114511002A (en) | Fault diagnosis method and system for small sample data | |
US11520831B2 (en) | Accuracy metric for regular expression | |
KR102032180B1 (en) | Apparatus for testing information exchange function of digital substation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |