Method and device for detecting service life loss of solid state disk
Through the solid-state drive life loss detection method based on long-term and short-term neural network model, the target network model and current operating data are used to predict the life loss of the solid-state drive, which solves the problem of low detection accuracy in the existing technology and achieves more accurate life loss Evaluation and equipment life extension.
Patent Information
- Application Number
- CN202411343155.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-25
AI Technical Summary
Existing SSD life loss detection methods such as read and write cycle counting methods cannot reflect the healthy status of SSDs in real time, resulting in low detection accuracy.
The life loss detection method based on long and short-term neural network model is adopted. By obtaining the current running data, inputting the target network model for prediction, evaluating the life loss of the solid-state drive, and determining the bandwidth ratio based on the predicted number of commands and commands thresholds, thereby detecting the life loss .
It improves the accuracy of SSD life loss detection, and can more accurately evaluate the life loss of SSD, thereby extending the service life of the equipment.
Smart Images

Figure CN119314540A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state hard disks, and in particular to a method and device for detecting life loss of solid state hard disks. Background Art
[0002] With the rapid development of information technology, solid-state drives (SSDs), as non-volatile storage devices, have been widely used in terminal devices such as smartphones, tablets, and personal computers. Therefore, the lifespan of SSDs affects the use of terminal devices such as smartphones, tablets, and personal computers.
[0003] Existing methods for detecting the life loss of solid-state drives mainly include the read-write cycle counting method, which evaluates the life of the solid-state drive (SSD) by tracking the number of reads and writes of each storage unit in the solid-state drive (SSD). However, the read-write cycle counting method can only provide a rough estimate of the life span and cannot reflect the actual health status in real time, resulting in low accuracy in detecting the life loss of the solid-state drive. Summary of the invention
[0004] In view of the above-mentioned problems, the present invention provides a method and device for detecting the life loss of a solid state drive, so as to improve the detection accuracy of the life loss of a solid state drive.
[0005] In a first aspect, the present invention provides a method for detecting life loss of a solid state drive, comprising:
[0006] Get the current operation data of the solid state drive;
[0007] Input the current operation data as a test data set into the target network model to obtain the predicted number of commands output by the target network model; wherein the target network model is obtained by training a training data set, a validation data set and a long-short term neural network model based on historical operation data; the predicted number of commands is used to evaluate the life loss of the solid state drive;
[0008] Determining a bandwidth ratio according to the predicted command quantity and a command quantity threshold;
[0009] The life loss of the solid state drive is detected based on the bandwidth ratio.
[0010] According to the life loss detection method of a solid state drive provided by the present invention, the training process of the target network model is as follows:
[0011] Determine a time series forward arrangement training data set and a time series reverse arrangement training data set according to the training data set;
[0012] Inputting the time series forward arrangement training data set and the time series reverse arrangement training data set into the long-term and short-term neural network model respectively to obtain a bidirectional learning network model;
[0013] The two-way learning network model is trained according to a preset number of training times and error accuracy to obtain an initial network model;
[0014] The verification data set is input into the initial network model for model optimization to obtain the target network model.
[0015] According to the life loss detection method of a solid state drive provided by the present invention, the determining of the bandwidth ratio according to the predicted command quantity and the command quantity threshold comprises:
[0016] Get the amount of data written by the command and the amount of data recovered by the command;
[0017] Obtaining a data volume ratio according to a ratio of the amount of data written by the command to the amount of data recovered by the command;
[0018] Determining a quantity difference according to a difference between the predicted command quantity and a command quantity threshold;
[0019] The bandwidth ratio is determined according to the data volume ratio and the quantity difference.
[0020] According to the life loss detection method of a solid state drive provided by the present invention, after detecting the life loss of the solid state drive based on the bandwidth ratio, the method further includes:
[0021] Determine the preset ratio;
[0022] Determining a relationship between the preset ratio and the bandwidth ratio;
[0023] The bandwidth ratio is adjusted according to the relationship between the preset ratio and the bandwidth ratio and a dynamic optimization rule to obtain a performance optimization result of the solid state drive.
[0024] According to the life loss detection method of a solid state drive provided by the present invention, the life loss detection method of the solid state drive further includes:
[0025] Perform read operations on the solid-state drive;
[0026] Obtaining the number of read operations of the solid state drive within each preset time interval and the delay time of each read operation;
[0027] A performance analysis report of the read operation is generated according to the number of reads and the delay time.
[0028] According to the life loss detection method of the solid state drive provided by the present invention, before executing the read operation of the solid state drive, the method further includes: setting a plurality of control parameter combinations of the solid state drive controller;
[0029] The performing of the read operation of the solid state hard disk comprises: performing the read operation of the solid state hard disk respectively under the control of the plurality of groups of control parameter combinations;
[0030] Correspondingly, after generating a performance analysis report of a read operation according to the number of reads and the delay time, the method further includes:
[0031] In response to the current preset time interval not being a time interval of preset minimum granularity, a first adjustment is made to the control parameter of the solid state drive controller, and the preset time interval is reduced, and the process proceeds to the step of executing the read operation of the solid state drive;
[0032] The first adjustment of the control parameters of the solid state drive controller includes:
[0033] The multiple groups of control parameter combinations are screened according to the performance analysis report, and the control parameter combinations that meet the read delay performance requirements corresponding to the current preset time interval are retained; the value of at least one control parameter in the control parameter combination is adjusted; and / or, a new control parameter combination is added.
[0034] According to the life loss detection method of the solid state drive provided by the present invention, after generating a performance analysis report of the read operation according to the number of reads and the delay time, the method further includes:
[0035] In response to the current preset time interval being the preset minimum granularity time interval, and knowing according to the performance analysis report that at least one of the multiple control parameter combinations satisfies the read latency performance requirement corresponding to the current preset time interval, the execution of the solid state drive life loss detection method is terminated, and the at least one control parameter combination that satisfies the read latency performance requirement corresponding to the current preset time interval is recorded;
[0036] In response to the current preset time interval being the time interval of the preset minimum granularity, and knowing according to the performance analysis report that there is no control parameter combination in the multiple groups of control parameter combinations that meets the read latency performance requirement corresponding to the current preset time interval, a second adjustment is made to the control parameters of the solid-state hard disk controller, and the process proceeds to the step of executing the read operation of the solid-state hard disk;
[0037] The second adjustment of the control parameters of the solid state drive controller includes:
[0038] Adjusting the value of at least one control parameter in the control parameter combination; and / or adding a new control parameter combination.
[0039] In a second aspect, the present invention provides a device for detecting the life loss of a solid state drive, comprising:
[0040] An acquisition module is used to obtain the current operation data of the solid state drive;
[0041] A prediction module, used to input the current operation data as a test data set into a target network model to obtain a predicted number of commands output by the target network model; wherein the target network model is obtained by training a training data set, a validation data set and a long-short term neural network model based on historical operation data; and the predicted number of commands is used to evaluate the life loss of the solid state drive;
[0042] A determination module, configured to determine a bandwidth ratio according to the predicted command quantity and a command quantity threshold;
[0043] A loss detection module is used to detect the life loss of the solid state drive based on the bandwidth ratio.
[0044] In a third aspect, the present invention further provides an electronic device, comprising: a memory for storing a computer software program; a processor for reading and executing the computer software program, thereby implementing the life loss detection method of a solid state drive as described in the first aspect above.
[0045] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, wherein the storage medium stores a computer software program, and when the computer software program is executed by a processor, the solid-state hard disk life loss detection method as described in the first aspect above is implemented.
[0046] In a fifth aspect, the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the method for detecting life loss of a solid state drive as described in the first aspect above.
[0047] The life loss detection method for a solid-state hard disk provided by the present invention accurately predicts the number of predicted commands for evaluating the life loss of the solid-state hard disk through a target network model and current operating data, further accurately evaluates the bandwidth ratio based on the predicted command number, and then detects the life loss of the solid-state hard disk based on the accurate bandwidth ratio, thereby improving the detection accuracy of the life loss of the solid-state hard disk. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 It is a flow chart of a method for detecting life loss of a solid state hard disk provided by the present invention;
[0050] Figure 2 It is a schematic diagram of the model structure provided by the present invention;
[0051] Figure 3 It is a structural schematic diagram of a life loss detection device for a solid state hard disk provided by the present invention;
[0052] Figure 4 is a schematic diagram of the structure of an electronic device provided by the present invention;
[0053] Figure 5 A schematic diagram of an embodiment of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0055] In the description of the present invention, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined. In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present invention is not necessarily interpreted as being more preferred or more advantageous than other embodiments. In order to enable any technician in the field to implement and use the present invention, the following description is given. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present invention obscure. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present invention.
[0056] See also Figure 1 , Figure 1 : is a flow chart of a method for detecting the life loss of a solid state drive provided by the present invention. The method for detecting the life loss of a solid state drive comprises:
[0057] Step 10, obtaining the current operation data of the solid state drive.
[0058] Among them, the current operation data is the data updated and counted during the operation of the solid-state drive, such as time data, command data, block size data, write scale, and whether the current garbage collection (GC) has been started. Time data refers to the time period data of 10 intensity sampling, and command data refers to the command mode issued by the host computer, which is divided into continuous write and random write.
[0059] In one embodiment, a specific implementation method for obtaining the current operating data of a solid-state drive includes: obtaining the initial operating data of the solid-state drive; cleaning the initial operating data for outliers and / or missing values to obtain target operating data; and normalizing the target operating data to obtain current operating data.
[0060] In this step, the initial operating data is the initial data updated and counted during the historical operation of the solid-state drive, specifically: obtaining the initial operating data updated and counted during the operation of the solid-state drive, after obtaining the initial operating data, firstly performing data cleaning of abnormal values and / or missing values on the initial operating data to reduce the impact of abnormal data on subsequent model training, thereby obtaining target operating data; then further normalizing the target operating data so that the target operating data has a unified data specification, thereby obtaining the final current operating data, improving the accuracy of subsequent model training and model application, and reducing the impact of one batch of data on subsequent use.
[0061] In one embodiment, the target operation data is normalized, and the normalization function is as follows: t =(x′ t -x′ min ) / (x′ max -x′ min ), where x t is the sample feature of the current running data collected at time t, x′ min is the minimum value of the sample feature collected, x′ max is the maximum value of the sample features collected.
[0062] In one embodiment, the target network model is trained based on historical operation data, and the historical operation data includes a training data set, a verification data set, and a test data set; after obtaining the historical operation data of the solid state drive, it also includes: determining the training data set, the verification data set, and the test data set according to the historical operation data and data partitioning rules; wherein the data partitioning rules are pre-set division ratios for dividing the training data set, the verification data set, and the test data set.
[0063] In this step, the training data set is used to train the subsequent target network model; the validation data set is used to verify the trained target network model and determine the optimization performance of the trained target network model; the test data set is used to input the target network model for data testing.
[0064] The data partitioning rule is a pre-set partitioning ratio for partitioning the training data set, the validation data set, and the test data set. For example, the collected historical operation data can be randomly divided into three parts, such as 60% as the training data set, 20% as the validation data set, and 20% as the test data set.
[0065] Specifically, after the historical operation data of the solid state drive is obtained, the collected current operation data is randomly divided into three parts according to the historical operation data and the data division rule.
[0066] In one embodiment, when 100,080 pieces of historical operation data are obtained, the 100,080 pieces of current operation data are divided according to a data division rule such as 60% as a training data set, 20% as a verification data set, and 20% as a test data set.
[0067] Step 20, input the current running data as a test data set into the target network model to obtain the number of predicted commands output by the target network model.
[0068] Among them, the target network model is obtained by training the training data set, verification data set and long-term and short-term neural network model based on historical operation data; the predicted number of commands is used to evaluate the life loss of the solid-state drive.
[0069] Specifically, after obtaining the historical operation data, the current operation data is input into the target network model as a test data set, and the input current operation data is processed by the target network model to obtain the predicted command data volume output by the target network model.
[0070] In one embodiment, the training process of the target network model is as follows: determine a time series forward arrangement training data set and a time series reverse arrangement training data set based on the training data set; input the time series forward arrangement training data set and the time series reverse arrangement training data set into the long-term and short-term neural network model respectively to obtain a bidirectional learning network model; train the bidirectional learning network model according to a preset number of training times and error accuracy to obtain an initial network model; input the verification data set into the initial network model for model optimization to obtain a target network model.
[0071] See also Figure 2 , Figure 2 It is a schematic diagram of the model structure provided by the present invention, such as Figure 2As shown in the figure, the input of the long-term and short-term neural network model includes X1, X2, X3, ...Xn, etc. X1, X2, X3, ...Xn represent the number of current running data input. The long-term and short-term neural network model is composed of input gate, forget gate and output gate, respectively. Each neuron has a memory unit and three gate structures: input, output and forget. This network controls the flow of information through these gates and can save and recall long-term information between input data. The target network model is improved on the basis of the traditional long-term and short-term neural network model: it is a fusion of the forward long-term and short-term memory network and the reverse long-term and short-term memory neural network. The improved target network model takes into account the past and future features of the sequence, uses two long-term and short-term memory networks, a forward input sequence, and a reverse input sequence, and then combines the outputs of the two according to certain weights as the final result. The hidden layer of the improved model consists of two parts: the forward cell state and the reverse cell state. The flow sequence enters the hidden layer through the input layer and participates in the forward calculation and reverse calculation respectively. The final output result is obtained by the output layer fusing the output result of the forward long-term and short-term memory network and the output result of the reverse long-term and short-term memory network according to certain weights.
[0072] The preset number of training times is the preset number of training times for the target network model, for example, it can be 60 times, 80 times, 100 times, etc. The error accuracy is the accuracy preset to evaluate whether the training has reached the preset error requirement. The preset error requirement can be, for example, the mean absolute error (MAE) and the root mean square error (RMSE) as measurement indicators. MAE is the average of the absolute errors between the predicted value and the observed value, and RMSE is the expected value of the square of the difference between the predicted value and the true value. The smaller the values of these two errors, the better the performance of the model. The expressions of MAE and RMSE are as follows: Where m represents the total number of sampling times for the current running data, i represents the i-th sampling, and R i represents the expected number of prediction commands for the ith time, P i Represents the actual number of predicted commands for the ith time. If the preset error requirement set by the training goal is reached, the results are output and the target network model is determined. If the preset error requirement set by the training goal is not reached, the preset number of training times is increased or the training goal is redefined. When the predetermined training goal is reached or the number of training times is the maximum, the network model training is completed. After many experiments, the best improved long short-term memory network model is obtained to determine the target network model. The known historical operation data of the solid-state drive is used as a test data set to predict the unknown number of predicted commands. After a large number of repeated experiments, the recorded results are analyzed and studied. The number of predicted commands is obtained by multiplying the output results of the forward training network and the reverse training network by the weighted matrix fusion.
[0073] Specifically, first, a time series forward arrangement training data set and a time series reverse arrangement training data set are determined according to the training data set, and the time series forward arrangement training data set and the time series reverse arrangement training data set are respectively input into the long-term and short-term neural network model to strengthen and highlight the overall characteristics of the logical address of the long-term and short-term neural network model to obtain a two-way learning network model, and then the two-way learning network model is further trained according to the preset number of training times and error accuracy to obtain an initial network model, and finally, the verification data set is input into the initial network model for model optimization, and the parameters and count values are updated to obtain the target network model.
[0074] Furthermore, in the process of processing the input current running data through the target network model to obtain the predicted command data volume output by the target network model, considering the ideal situation that all blocks have no bad blocks and GC writes and host writes at a uniform speed, the data volume of the GC recovered source super data block (data block bound according to 32 data block units) is recorded as VDF GC , the amount of data in a super data block excluding parity is recorded as VDF SBLK Then, the time it takes for GC to produce an idle superblock is equal to the time it takes for GC and the host to write a superblock. During this period, the amount of data recovered by GC is, and the amount of data written by the host is VDF WR =VDF SBLK -VDF GC , which means that the bandwidth ratio of host write bandwidth to GC write bandwidth should be equal to VDF WR / VDF GC Since GC is started when the number of free super blocks is less than a certain threshold, it is hoped that the number of free super blocks will be stabilized at a value less than this threshold to ensure that the host write does not time out and the GC does not exit prematurely.
[0075] Therefore, a mechanism is needed to make the host write bandwidth ratio larger than the ideal steady-state bandwidth when there are more free super blocks, and the GC write bandwidth ratio smaller than the ideal steady-state bandwidth; and vice versa.
[0076] Step 30: Determine the bandwidth ratio according to the predicted command quantity and the command quantity threshold.
[0077] The command quantity threshold is a preset quantity.
[0078] In one embodiment, the implementation method of determining the bandwidth ratio based on the predicted command quantity and the command quantity threshold includes: obtaining the command write data volume and the command recovered data volume; obtaining the data volume ratio based on the ratio of the command write data volume and the command recovered data volume; determining the quantity difference based on the difference between the predicted command quantity and the command quantity threshold; determining the bandwidth ratio based on the data volume ratio and the quantity difference.
[0079] The command quantity threshold is a preset value used to evaluate the predicted command quantity.
[0080] Specifically, the bandwidth ratio refers to the ratio of the expected write bandwidth to the expected recycle bandwidth. To write bandwidth expectations, To recover bandwidth expectation, VDF WR The amount of data written for the command, VDF GC The amount of data recovered by the command, n free is the number of predicted commands, n crit is the command quantity threshold, and c is a constant coefficient.
[0081] Step 40, detecting the life loss of the solid state drive based on the bandwidth ratio.
[0082] Furthermore, the life loss of the solid state drive is detected according to the bandwidth ratio. In one embodiment, if the bandwidth ratio is in the first range, the life loss of the solid state drive is determined to be low loss, wherein the second range is [20,100]. If the bandwidth ratio is in the second range, the life loss of the solid state drive is determined to be medium loss, wherein the second range is [5,20). If the bandwidth ratio is in the third range, the life loss of the solid state drive is determined to be high loss, wherein the second range is [1,5).
[0083] The embodiment of the present invention accurately predicts the number of predicted commands for evaluating the life loss of a solid-state drive through a target network model and current operating data, further accurately evaluates the bandwidth ratio based on the predicted number of commands, and then detects the life loss of the solid-state drive based on the accurate bandwidth ratio, thereby improving the accuracy of detecting the life loss of the solid-state drive.
[0084] In one embodiment, after detecting the life loss of the solid-state drive based on the bandwidth ratio, it also includes: optimizing the performance of the solid-state drive according to the bandwidth ratio and dynamic optimization rules, wherein the dynamic optimization rules are pre-set rules for adjusting the bandwidth ratio, specifically: determining a preset ratio; determining the relationship between the preset ratio and the bandwidth ratio; adjusting the bandwidth ratio according to the relationship between the preset ratio and the bandwidth ratio and the dynamic optimization rules to obtain a performance optimization result of the solid-state drive.
[0085] Specifically, a preset ratio is determined; wherein the preset ratio is a ratio of a preset write bandwidth expectation to a preset recovery bandwidth expectation; the relationship between the preset ratio and the bandwidth ratio is determined; the bandwidth ratio is adjusted according to the relationship between the preset ratio and the bandwidth ratio and a dynamic optimization rule to determine a performance optimization result, and when the bandwidth ratio is less than or equal to the preset ratio, the bandwidth ratio is adjusted according to a first dynamic adjustment rule to determine a performance optimization result; wherein the first dynamic adjustment rule is to lower the write bandwidth expectation and increase the recovery bandwidth expectation; when the bandwidth ratio is greater than the preset ratio, the bandwidth ratio is adjusted according to a second dynamic adjustment rule to determine a performance optimization result; wherein the second dynamic adjustment rule is to increase the recovery bandwidth expectation and lower the write bandwidth expectation.
[0086] In one embodiment, an adjustment factor related to the number of free super blocks, namely, the bandwidth ratio, is added to the bandwidth ratio of the expected host write bandwidth and the bandwidth ratio of the expected GC write bandwidth. in, To write bandwidth expectations, To recover bandwidth expectation, VDF WR The amount of data written for the command, VDF GC The amount of data recovered by the command, n free is the number of predicted commands, n crit is the command quantity threshold, and c is a constant coefficient. Furthermore, the master core calculates the bandwidth ratio of the expected host write bandwidth to the expected GC write bandwidth based on the data volume of the GC source data block counted every second. Then, the bandwidth ratio is sent to the slave core. At the beginning of each second, each microcontroller unit (MCU) sets the current time as the starting time and independently counts the GC write bandwidth and host write bandwidth in the next second. For a certain time in the interval (t0, t0+1s), the host write data volume from t0 to t is The amount of data written by GC is Since bandwidth control will block input / output (IO), if each core arbitrates independently, different blocking conditions of each core may lead to unexpected deadlock. And by adopting the unified control method of the main core, the bandwidth of each core in the sub-time interval is calculated uniformly. The bandwidth upper limit is a shared variable and is visible to all cores. In the main loop, the main core dynamically adjusts the upper limit in real time according to the current actual ratio of host writes to GC writes. The basic principle is to calculate the expected bandwidth ratio of host writes to GC writes and normalize the ratio to 100,000. After determining If the number of remaining free data blocks is less than the dangerous number, divide the Host write ratio by 2 to prevent timeout.
[0087] The embodiment of the present invention determines the bandwidth ratio according to the predicted number of prediction commands. The main core in the main loop dynamically adjusts the upper limit in real time according to the current actual bandwidth ratio of host write and GC write, thereby improving the steady-state performance of the solid-state hard disk.
[0088] In one embodiment, the life loss detection method of the solid-state hard disk also includes: executing a read operation of the solid-state hard disk; obtaining the number of read operations of the solid-state hard disk within each preset time interval and the delay time of each read operation; and generating a performance analysis report of the read operation based on the number of read operations and the delay time.
[0089] The read operation of the solid state drive can be executed according to the set read operation execution mode, and the read operation can be monitored in real time through the monitoring program. Among them, the monitoring logic can be integrated in the solid state drive controller to realize real-time monitoring and recording of the read operation.
[0090] The monitoring mechanism of the read operation can capture the start and end time of each read operation in real time, thereby obtaining the delay time, providing a reliable basis for accurate calculation of the delay time and performance analysis. The timestamp array can be set to capture and record the start and end time of each read operation with high precision, providing detailed time data support for performance analysis.
[0091] By setting a counter that matches the preset time interval, it is ensured that the number of read operations within each preset time interval can be accurately recorded.
[0092] According to the preset time interval, the calculated delay time is carefully classified and counted to generate a performance analysis report for the read operation. The read operation frequency and delay distribution characteristics within each preset time interval are analyzed to reveal the system performance bottleneck and room for improvement.
[0093] The embodiment of the present invention performs a read operation of a solid-state hard disk, obtains the number of read operations of the solid-state hard disk within each preset time interval and the delay time of each read operation, generates a performance analysis report of the read operation according to the number of read operations and the delay time, realizes the statistics and analysis of the delay time, and is conducive to optimizing the performance of the solid-state hard disk. In one embodiment, before performing a read operation of the solid-state hard disk, it also includes: setting a plurality of control parameter combinations of the solid-state hard disk controller; performing a read operation of the solid-state hard disk, including: performing the read operation of the solid-state hard disk respectively under the control of the plurality of control parameter combinations.
[0094] Optionally, the SSD controller is used to manage stored data and communicate with a computer or electronic device. When a system or device needs to read data or write data to the SSD, it interacts through the SSD controller. By setting the control parameters of the SSD controller, the read operation of the SSD can be controlled.
[0095] In an embodiment of the present invention, multiple control parameter combinations of a solid-state hard disk controller are set, and each control parameter combination is used to control the read operation of the solid-state hard disk. When executing the read operation of the solid-state hard disk, the read operation of the solid-state hard disk is executed respectively under the control of the multiple control parameter combinations, so as to obtain the number of read operations of the solid-state hard disk in each preset time interval and the delay time of each read operation under the control of each control parameter combination. In addition, the performance analysis report of the read operation generated according to the number of read operations and the delay time includes the performance analysis report of the read operation generated according to the number of read operations and the delay time of the read operation corresponding to each control parameter combination.
[0096] The embodiment of the present invention sets multiple control parameter combinations for the solid-state hard disk controller, and respectively executes the read operations of the solid-state hard disk under the control of the multiple control parameter combinations, thereby realizing the read operations under the control of the multiple control parameter combinations, thereby obtaining a performance analysis report of the read operations under the control of the multiple control parameter combinations, and providing a basis for the optimization of the control parameters.
[0097] In one embodiment, after generating a performance analysis report of a read operation based on the number of reads and the delay time, it also includes: in response to the current preset time interval not being a time interval of the preset minimum granularity, making a first adjustment to the control parameters of the solid-state hard disk controller, and reducing the preset time interval, and switching to the processing step of executing the read operation of the solid-state hard disk; wherein the first adjustment to the control parameters of the solid-state hard disk controller includes: screening multiple groups of control parameter combinations according to the performance analysis report, retaining the control parameter combinations that meet the read delay performance requirements corresponding to the current preset time interval; adjusting the value of at least one control parameter in the control parameter combination; and / or, adding a new control parameter combination.
[0098] When counting the number of read operations of the solid-state drive and the delay time of each read operation, statistics are performed for the time range corresponding to the preset time interval. If the granularity of the preset time interval is small, such as 10us, the amount of data obtained is large and the consumption of computing resources is large. Therefore, in order to balance the optimization of the solid-state drive controller parameters and the consumption of computing resources, the embodiment of the present invention sets preset time intervals of different granularities, such as 10us, 100us, and 1ms.
[0099] Different preset time intervals correspond to different read latency performance requirements, and the read latency performance requirements include the delay time. If the control parameter combination cannot meet the corresponding read latency performance requirements under the setting of the preset time interval of large granularity, then the corresponding read latency performance requirements will not be met under the setting of the preset time interval of small granularity. If the control parameter combination can meet the corresponding read latency performance requirements under the setting of the preset time interval of large granularity, then the corresponding read latency performance requirements may or may not be met under the setting of the preset time interval of small granularity.
[0100] Therefore, the preset time interval changes from large to small. In this way, the control parameters are optimized at the value of the preset time interval with large granularity first, and then the preset time interval is gradually reduced to achieve the gradual optimization of the control parameters of the solid state drive controller.
[0101] After generating a performance analysis report of the read operation based on the number of reads and the delay time of the read operation, if the current preset time interval is not a time interval with a preset minimum granularity, a first adjustment is made to the control parameters of the solid-state hard disk controller, and according to the setting of the preset time interval, the preset time interval is reduced to the next level, and the processing step of executing the read operation of the solid-state hard disk is executed, and then the number of reads of the read operation of the solid-state hard disk and the delay time of each read operation within each preset time interval are re-acquired, and a performance analysis report of the read operation is generated based on the number of reads and the delay time of the read operation.
[0102] Among them, the first adjustment of the control parameters of the solid-state hard disk controller includes at least one of the following operations: screening multiple groups of control parameter combinations according to the performance analysis report of the read operation, retaining the control parameter combinations that meet the read delay performance requirements corresponding to the current preset time interval, and discarding the control parameter combinations that do not meet the read delay performance requirements corresponding to the current preset time interval; adjusting the value of at least one control parameter in one or more control parameter combinations; adding a new control parameter combination.
[0103] The control parameters may include the maximum waiting time during a write operation pause, the maximum number of read operations that can be executed during a write command pause, the maximum ratio of read and write commands, and the maximum time for continuous read execution. The combination of multiple groups of control parameters may have different compositions of control parameters or different values of control parameters. The order of adjusting the preset time interval and the first adjustment of the control parameters of the solid-state hard disk controller may be performed in sequence according to the setting, or may be performed simultaneously.
[0104] The embodiment of the present invention achieves parameter optimization of the solid-state hard disk controller and adjustment of the preset time interval by making a first adjustment to the control parameters of the solid-state hard disk controller in response to the current preset time interval not being a time interval of the preset minimum granularity, reducing the preset time interval, and switching to the processing step of executing the read operation of the solid-state hard disk.
[0105] In one embodiment, after generating a performance analysis report of a read operation according to the number of reads and the delay time, the method further includes: in response to the current preset time interval being a time interval of a preset minimum granularity, and knowing according to the performance analysis report that at least one control parameter combination in a plurality of control parameter combinations satisfies the read delay performance requirement corresponding to the current preset time interval, terminating the execution of the solid-state hard disk life loss detection method, and recording at least one control parameter combination that satisfies the read delay performance requirement corresponding to the current preset time interval; in response to the current preset time interval being a time interval of a preset minimum granularity, and knowing according to the performance analysis report that there is no control parameter combination in a plurality of control parameter combinations that satisfies the read delay performance requirement corresponding to the current preset time interval, performing a second adjustment on the control parameters of the solid-state hard disk controller, and proceeding to the processing step of executing the read operation of the solid-state hard disk; wherein the second adjustment on the control parameters of the solid-state hard disk controller includes: adjusting the value of at least one control parameter in the control parameter combination; and / or, adding a new control parameter combination.
[0106] After generating a performance analysis report for a read operation based on the number of reads and delay time of the read operation, if the current preset time interval is the time interval of the preset minimum granularity, it means that there is no need to reduce the preset time interval, and if it is known from the performance analysis report of the read operation that there is at least one group of control parameter combinations among the multiple groups of control parameter combinations that meets the read delay performance requirements corresponding to the current preset time interval, it means that the optimized control parameters that can meet the final read delay performance requirements have been found, then the execution of the life loss detection method of the solid-state drive is terminated, and the control parameter combination that meets the read delay performance requirements corresponding to the current preset time interval is recorded.
[0107] After generating a performance analysis report of the read operation based on the number of reads and the delay time of the read operation, if the current preset time interval is the time interval with the preset minimum granularity, it means that there is no need to reduce the preset time interval, and if it is learned from the performance analysis report of the read operation that there is no control parameter combination in the multiple groups of control parameter combinations that meets the read delay performance requirements corresponding to the current preset time interval, it means that the optimized control parameters that can meet the final read delay performance requirements (the read delay performance requirements corresponding to the preset time interval with the smallest granularity) have not yet been found, then a second adjustment is made to the control parameters of the solid-state hard disk controller, and the processing step of executing the read operation of the solid-state hard disk is executed to re-obtain the number of reads of the read operation of the solid-state hard disk within each preset time interval and the delay time of each read operation, and a performance analysis report of the read operation is generated based on the number of reads and the delay time of the read operation.
[0108] The second adjustment of the control parameters of the solid state drive controller includes: adjusting the value of at least one control parameter in one or more control parameter combinations; and / or adding a new control parameter combination.
[0109] In an embodiment of the present invention, in response to the current preset time interval being a time interval of the preset minimum granularity and knowing, according to a performance analysis report of a read operation, that there is at least one control parameter combination in a plurality of control parameter combinations that satisfies the read delay performance requirement corresponding to the current preset time interval, the execution of the life loss detection method of the solid-state hard disk is terminated, and at least one control parameter combination that satisfies the read delay performance requirement corresponding to the current preset time interval is recorded; in response to the current preset time interval being a time interval of the preset minimum granularity and knowing, according to a performance analysis report of a read operation, that there is no control parameter combination in a plurality of control parameter combinations that satisfies the read delay performance requirement corresponding to the current preset time interval, a second adjustment is made to the control parameters of the solid-state hard disk controller, and the processing step of executing the read operation of the solid-state hard disk is executed, thereby terminating the program after the control parameter optimization is successful and further optimizing and testing the control parameters when the optimized control parameters that meet the final read delay performance requirement have not been found.
[0110] In one embodiment, it also includes: outputting a performance analysis report and optimized parameter settings in the form of a visual chart or a data file.
[0111] The performance analysis report of the read operation, the optimized parameter settings (the control parameter combination that meets the final SSD latency performance requirements) and the performance improvement are output to the display module or storage module in the form of a visual chart or data file for user viewing and subsequent application. Among them, the visual chart includes a histogram, a line chart, etc., which is used to intuitively display the latency performance.
[0112] The embodiment of the present invention outputs the performance analysis report of the read operation and the optimized parameter settings in the form of a visual chart or a data file, thereby realizing the information transmission of the operation performance analysis report and the optimized parameter settings.
[0113] In one embodiment, executing a read operation of a solid-state hard disk includes: performing a read operation of the solid-state hard disk according to a first preset number of read operations within a preset time interval; and / or randomly performing a read operation of the solid-state hard disk according to a second preset number of read-write mixed operations within a preset time interval.
[0114] When executing a read operation of the solid-state hard disk, the number of read operations of the solid-state hard disk within each preset time interval and the delay time of each read operation are obtained. The read operation can be controlled by setting the read operation mode of the preset time interval. For example, in a scenario where a read operation is simply performed, a first preset number of read operations within a preset time interval can be set, and the read operation of the solid-state hard disk is performed according to the first preset number of read operations within the preset time interval. In a mixed read-write scenario, a second preset number of read operations and write operations within a preset time interval can be set, that is, the sum of the number of read operations and write operations within the preset time interval is the second preset number, and the read operation of the solid-state hard disk is randomly performed according to the second preset number of mixed read-write operations within the preset time interval.
[0115] The embodiments of the present invention control the read operation of the solid-state hard disk by performing a read operation on the solid-state hard disk according to a first preset number of read operations within a preset time interval, and / or randomly performing a read operation on the solid-state hard disk according to a second preset number of read-write mixed operations within a preset time interval, thereby facilitating the acquisition of read delay performance for a variety of different read operation modes and optimizing parameters of the solid-state hard disk controller based on a variety of different read operation modes.
[0116] The life loss detection device of the solid state hard disk provided by the present invention is described below. The life loss detection device of the solid state hard disk described below and the life loss detection method of the solid state hard disk described above can be referred to each other. Figure 3 , Figure 3 : is a schematic diagram of the structure of the life loss detection device of the solid state hard disk provided by the present invention. The life loss detection device of the solid state hard disk comprises:
[0117] The acquisition module 310 is used to acquire the current operation data of the solid state drive;
[0118] The prediction module 320 is used to input the current operation data as a test data set into a target network model to obtain the predicted number of commands output by the target network model; wherein the target network model is obtained by training a training data set, a validation data set and a long-short term neural network model based on historical operation data; and the predicted number of commands is used to evaluate the life loss of the solid state drive;
[0119] A determination module 330, configured to determine a bandwidth ratio according to the predicted command quantity and a command quantity threshold;
[0120] The loss detection module 340 is used to detect the life loss of the solid state drive based on the bandwidth ratio.
[0121] The life loss detection device for a solid-state hard disk provided by the present invention accurately predicts the number of predicted commands for evaluating the life loss of the solid-state hard disk through a target network model and current operating data, further accurately evaluates the bandwidth ratio based on the predicted number of commands, and then detects the life loss of the solid-state hard disk based on the accurate bandwidth ratio, thereby improving the detection accuracy of the life loss of the solid-state hard disk.
[0122] See also Figure 4 , Figure 4 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, an embodiment of the present invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, the following steps are implemented:
[0123] Get the current operation data of the solid state drive;
[0124] Input the current operation data as a test data set into the target network model to obtain the predicted number of commands output by the target network model; wherein the target network model is obtained by training a training data set, a validation data set and a long-short term neural network model based on historical operation data; the predicted number of commands is used to evaluate the life loss of the solid state drive;
[0125] Determining a bandwidth ratio according to the predicted command quantity and a command quantity threshold;
[0126] The life loss of the solid state drive is detected based on the bandwidth ratio.
[0127] See also Figure 5 , Figure 5 Schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. Figure 5As shown, this embodiment provides a computer-readable storage medium 500, on which a computer program 411 is stored. When the computer program 411 is executed by a processor, the following steps are implemented:
[0128] Get the current operation data of the solid state drive;
[0129] Input the current operation data as a test data set into the target network model to obtain the predicted number of commands output by the target network model; wherein the target network model is obtained by training a training data set, a validation data set and a long-short term neural network model based on historical operation data; the predicted number of commands is used to evaluate the life loss of the solid state drive;
[0130] Determining a bandwidth ratio according to the predicted command quantity and a command quantity threshold;
[0131] The life loss of the solid state drive is detected based on the bandwidth ratio.
[0132] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0133] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0134] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for detecting the life loss of a solid state drive, characterized in that: include: Get the current operation data of the solid state drive; Input the current operation data as a test data set into the target network model to obtain the predicted number of commands output by the target network model; wherein the target network model is obtained by training a training data set, a validation data set and a long-short term neural network model based on historical operation data; the predicted number of commands is used to evaluate the life loss of the solid state drive; Determining a bandwidth ratio according to the predicted command quantity and a command quantity threshold; The life loss of the solid state drive is detected based on the bandwidth ratio.
2. The method for detecting the life loss of a solid state drive according to claim 1, characterized in that: The training process of the target network model is as follows: Determine a time series forward arrangement training data set and a time series reverse arrangement training data set according to the training data set; Inputting the time series forward arrangement training data set and the time series reverse arrangement training data set into the long-term and short-term neural network model respectively to obtain a bidirectional learning network model; The two-way learning network model is trained according to a preset number of training times and error accuracy to obtain an initial network model; The verification data set is input into the initial network model for model optimization to obtain the target network model.
3. The method for detecting the life loss of a solid state drive according to claim 1, characterized in that: The determining the bandwidth ratio according to the predicted command quantity and the command quantity threshold comprises: Get the amount of data written by the command and the amount of data recovered by the command; Obtaining a data volume ratio according to a ratio of the amount of data written by the command to the amount of data recovered by the command; Determining a quantity difference according to a difference between the predicted command quantity and a command quantity threshold; The bandwidth ratio is determined according to the data volume ratio and the quantity difference.
4. The method for detecting the life loss of a solid state drive according to claim 3, characterized in that: After detecting the life loss of the solid state drive based on the bandwidth ratio, the method further includes: Determine the preset ratio; Determining a relationship between the preset ratio and the bandwidth ratio; The bandwidth ratio is adjusted according to the relationship between the preset ratio and the bandwidth ratio and a dynamic optimization rule to obtain a performance optimization result of the solid state drive.
5. The method for detecting the life loss of a solid state drive according to any one of claims 1 to 4, characterized in that: The life loss detection method of the solid state hard disk also includes: Perform read operations on the solid-state drive; Obtaining the number of read operations of the solid state drive within each preset time interval and the delay time of each read operation; A performance analysis report of the read operation is generated according to the number of reads and the delay time.
6. The method for detecting the life loss of a solid state drive according to claim 5, characterized in that: Before executing the read operation of the solid state drive, the method further includes: setting a plurality of control parameter combinations of the solid state drive controller; The performing of the read operation of the solid state hard disk comprises: performing the read operation of the solid state hard disk respectively under the control of the plurality of groups of control parameter combinations; Correspondingly, after generating a performance analysis report of a read operation according to the number of reads and the delay time, the method further includes: In response to the current preset time interval not being a time interval of preset minimum granularity, a first adjustment is made to the control parameter of the solid state drive controller, and the preset time interval is reduced, and the process proceeds to the step of executing the read operation of the solid state drive; The first adjustment of the control parameters of the solid state drive controller includes: The multiple groups of control parameter combinations are screened according to the performance analysis report, and the control parameter combinations that meet the read delay performance requirements corresponding to the current preset time interval are retained; the value of at least one control parameter in the control parameter combination is adjusted; and / or, a new control parameter combination is added.
7. The method for detecting the life loss of a solid state drive according to claim 6, characterized in that: After generating a performance analysis report of the read operation according to the number of reads and the delay time, the method further includes: In response to the current preset time interval being the preset minimum granularity time interval, and knowing according to the performance analysis report that at least one of the multiple control parameter combinations satisfies the read latency performance requirement corresponding to the current preset time interval, the execution of the solid state drive life loss detection method is terminated, and the at least one control parameter combination that satisfies the read latency performance requirement corresponding to the current preset time interval is recorded; In response to the current preset time interval being the time interval of the preset minimum granularity, and knowing according to the performance analysis report that there is no control parameter combination in the multiple groups of control parameter combinations that meets the read latency performance requirement corresponding to the current preset time interval, a second adjustment is made to the control parameters of the solid-state hard disk controller, and the process proceeds to the step of executing the read operation of the solid-state hard disk; The second adjustment of the control parameters of the solid state drive controller includes: Adjusting the value of at least one control parameter in the control parameter combination; and / or adding a new control parameter combination.
8. A device for detecting the life loss of a solid state hard disk, characterized in that: include: An acquisition module is used to obtain the current operation data of the solid state drive; A prediction module, used to input the current operation data as a test data set into a target network model to obtain a predicted number of commands output by the target network model; wherein the target network model is obtained by training a training data set, a validation data set and a long-short term neural network model based on historical operation data; and the predicted number of commands is used to evaluate the life loss of the solid state drive; A determination module, configured to determine a bandwidth ratio according to the predicted command quantity and a command quantity threshold; A loss detection module is used to detect the life loss of the solid state drive based on the bandwidth ratio.
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 program, the life loss detection method of the solid state drive as described in any one of claims 1-7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting life loss of a solid state drive as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Solid state disk life prediction method
CN111309502A
Solid state disk controller, command scheduling method, solid state disk and storage medium
CN116225991A
Solid state disk life prediction method and device based on long short-term memory network model, terminal and medium
CN116631487A
Flow control method and device for solid state disk, storage medium and electronic equipment
CN118519591A
Precise data tuning method and apparatus for analog neural memory in an artificial neural network
US20210209456A1