Solid state disk testing method, device and equipment and storage medium
By regularly acquiring and evaluating the SSD log information and disk capacity on all servers and combining it with multi-dimensional analysis, the problems of limited coverage and low efficiency in traditional testing methods are resolved, enabling efficient and accurate SSD testing.
Patent Information
- Application Number
- CN202510883891.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-10
Smart Images

Figure CN120766746A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage testing technology, and in particular to a solid-state hard drive testing method, apparatus, device, and storage medium. Background Art
[0002] In the era of big data, data storage has become a bottleneck for improving system performance. Solid-state drives (SSDs) are becoming widely used due to their fast read and write speeds, low energy consumption, and the gradual decline in the price of NAND Flash. Among them, NVME (Non-Volatile Memory Express) SSDs, as a new generation of storage devices, feature high interface speeds and fast IO (Input / Output) throughput. They carry the critical task of data storage, making it crucial to test the health of SSDs.
[0003] Traditional SSD testing methods design test cases specifically for health testing. This involves selecting one or more SSDs from among those currently performing routine testing, pausing ongoing testing on these SSDs, and allowing them to execute specialized test cases. This testing approach not only covers a small number of SSDs, but also covers a relatively limited number of test scenarios per test cycle, creating the risk of missed tests. Furthermore, the need to pause routine SSD testing results in low testing efficiency. Summary of the Invention
[0004] The present application provides a solid-state hard drive testing method, apparatus, device, and storage medium to at least solve the problems of missed detection risk and low testing efficiency in related technologies.
[0005] This application provides a solid-state drive testing method, including:
[0006] For each server, obtain all solid-state drives under test located in the server;
[0007] Regularly obtain multiple log information and disk capacity of each solid-state drive;
[0008] After obtaining log information and disk capacity each time, the health status of each solid-state drive is determined based on the multiple log information and disk capacity of each solid-state drive;
[0009] When the health status of the solid state drive is abnormal, an abnormality analysis is performed based on multiple log information of the solid state drive to obtain an abnormality analysis result, and the abnormality analysis result and the disk capacity are used as the abnormality test result of the solid state drive.
[0010] The present application also provides a solid state drive testing device, comprising:
[0011] The first obtaining module is configured to obtain all solid state disks being tested located on the server for each server;
[0012] The second obtaining module is configured to obtain multiple log information and disk capacity of each solid state disk at a time;
[0013] The judging module is configured to judge the health status of each solid state disk based on the multiple log information and disk capacity of each solid state disk after obtaining the log information and disk capacity each time;
[0014] The analyzing module is configured to perform abnormal analysis based on the multiple log information of the solid state disk when the health status of the solid state disk is an abnormal status, to obtain an abnormal analysis result, and to take the disk capacity and the abnormal analysis result as an abnormal test result of the solid state disk.
[0015] The application further provides an electronic device, including a memory configured to store a computer program and a processor configured to execute the computer program to implement the steps of any of the solid state disk test methods.
[0016] The application further provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of any of the solid state disk test methods are implemented.
[0017] The application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of any of the solid state disk test methods are implemented.
[0018] According to the application, all solid state disks being tested located on the server are obtained, which can cover more test scenarios and does not need to design additional test cases, and the log information and disk capacity are obtained without interrupting the test, so that the test of the solid state disk can be implemented, and the data is obtained at a time to find problems in the test. The health status of the solid state disk is judged after obtaining the log information and disk capacity each time, which can more accurately evaluate the solid state disk compared to a single judgment index, and abnormal analysis is performed when the health status of the solid state disk is an abnormal status to determine the specific abnormal reason, which is helpful for subsequent targeted processing of the abnormality. Therefore, the technical problems of the risk of missing the test and low test efficiency can be solved, and the technical effect of comprehensively, accurately and efficiently implementing the test of the solid state disk can be achieved. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0020] Figure 1 A flowchart of a solid-state drive testing method provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of a solid-state hard disk provided in an embodiment of the present application;
[0022] Figure 3 A flowchart of another solid-state drive testing method provided in an embodiment of the present application;
[0023] Figure 4 A schematic diagram of a solid-state drive testing device provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0026] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0027] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0028] The embodiment of the present application provides a solid state drive testing method, Figure 1 A flow chart of a solid state drive testing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the process includes the following steps:
[0029] Step S101 : For each server, obtain all solid-state hard disks under test located in the server.
[0030] Specifically, traditional SSD testing methods require the design of specialized test cases and the selection of one or more SSDs from all currently tested SSDs, requiring these SSDs to pause ongoing tests and execute the test cases instead, resulting in low testing efficiency. For example, a fio (Flexible I / O Tester) read / write command is issued to the selected SSD. After the read / write is completed, it is confirmed that fio is normal and the fields related to the read / write quantity in the intelligent log are as expected. The test is considered to have passed and the SSD's health status is normal. Since the number of these selected SSDs among all SSDs is very small, the test scenarios covered by these SSDs are very limited, resulting in a high risk of missed tests. In view of this, the embodiments of the present invention perform testing based on the SSDs' daily testing, so that all SSDs do not need to stop the current daily testing. The number of disks tested in daily testing is large, typically dozens or even hundreds, and each SSD performs different operations, such as database reading and writing, large data caching, log storage, etc., which increases the coverage of test scenarios. More importantly, in the existing daily testing environment, solid-state drives are mostly tested 24 / 7, and testing during this process is more in line with customers' actual usage scenarios.
[0031] In some optional embodiments, Figure 2 A schematic diagram of a solid-state drive provided in an embodiment of the present application is shown. Daily testing is usually performed simultaneously by multiple servers. Each server is provided with multiple slots, each of which can accommodate a solid-state drive. Figure 2 In this example, three servers, each with four slots, are used. Each slot is labeled with the SSD's bus number, making it easy to uniquely identify and manage each SSD.
[0032] Step S102 , periodically obtaining multiple log information and disk capacity of each solid state drive.
[0033] Specifically, since log information and disk capacity can reflect the health status of the solid-state drive, based on the characteristics of obtaining log information and disk capacity, that is, obtaining log information and disk capacity does not affect any business in daily testing, there is no need for the solid-state drive to stop the current business, and log information and disk capacity can be obtained at any time through commands. In addition, the traditional solid-state drive testing method only obtains log information before the start or after the test, resulting in the inability to timely discover problems occurring during the test, causing a waste of testing resources, and causing a lag in the discovery of test problems. If the test site is damaged, it cannot be correctly located and analyzed. Therefore, by automatically obtaining log information and disk capacity at a regular interval, not only can the efficiency of daily testing be improved and test problems be discovered as early as possible, but it is also more helpful to locate test problems.
[0034] Step S103 : After obtaining log information and disk capacity each time, the health status of each solid state drive is determined based on the multiple log information and disk capacity of each solid state drive.
[0035] Specifically, the SSD's health status is determined by automatically evaluating log information and disk capacity. If the SSD's health status is abnormal, the following steps are used for abnormality analysis to identify problems early. If the SSD's health status is normal, the original test is continued, and log information and disk capacity are obtained again during the next period. This cycle not only tests the SSD's health status but also allows for early detection of problems during testing.
[0036] Step S104: When the health status of the solid state drive is abnormal, an abnormality analysis is performed based on multiple log information of the solid state drive to obtain an abnormality analysis result, and the abnormality analysis result and the disk capacity are used as the abnormality test result of the solid state drive.
[0037] Specifically, when the SSD's health status is abnormal, an anomaly analysis of the log information is performed. Because the log information covers multiple dimensions, the specific cause of the SSD anomaly can be analyzed from multiple perspectives, achieving comprehensive and accurate anomaly analysis. Finally, the anomaly analysis results, along with the drive capacity, are used as the SSD's abnormal test results for this test. This information can be sent to relevant personnel to remind them to promptly address the abnormal SSD.
[0038] Through this application, since all solid-state drives that are being tested and located on the server are obtained, compared to the related art that only selects some solid-state drives from the currently tested solid-state drives to execute special test cases, it can cover more test scenarios and does not require the design of additional test cases. The acquisition characteristics of log information and disk capacity make it possible to test solid-state drives without interrupting the test like the related art. In addition, regular acquisition of data can also timely discover problems in the test. The health status of the solid-state drive is judged after obtaining log information and disk capacity each time. Compared with a single judgment indicator, it can achieve more accurate evaluation. When the health status of the solid-state drive is abnormal, an abnormality analysis is performed to clarify the specific cause of the abnormality, which is helpful for the targeted handling of subsequent abnormalities. Therefore, the technical problems of the risk of missed detection and low test efficiency can be solved, and the technical effect of comprehensive, accurate and efficient solid-state drive testing can be achieved.
[0039] An embodiment of the present application provides a solid-state drive testing method, which specifically includes the following steps:
[0040] Step S201: For each server, obtain all the solid-state hard disks under test located in the server. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0041] Step S202 , periodically obtaining multiple log information and disk capacity of each solid state drive.
[0042] Specifically, the above step S202 includes:
[0043] Step S2021: remote technology is used to periodically obtain multiple log information and disk capacity of each solid-state drive.
[0044] Specifically, for each server, all storage slots of the server are scanned through a remote management protocol, such as IPMI (Intelligent Platform Management Interface), SSH (Secure Shell) or a server management software interface, to identify solid state disks that are currently inserted and in a test state, and log information and disk capacity are collected from the solid state disks according to a preset time period. When data is acquired in a remote manner, a multi-level data acquisition architecture needs to be constructed to acquire different log information and disk capacity: smart logs are acquired through an nvme smart-log / dev / nvme0n1 command; vendor logs are acquired by calling a vendor private interface; system diagnostic information is acquired in real time through dmesg-T|grep nvme; and disk capacity of the solid state disk is acquired by parsing the output of lsblk-b|grep nvme. In addition, because different log information adopts different protocols, such as an NVMe (Non-Volatile Memory Express) protocol, a vendor private protocol and an operating system kernel mechanism, there are differences in the timestamp formats. An alignment algorithm needs to first convert the timestamps of various logs into a consistent time, and then match log events in the same time period through a sliding window mechanism (window size is 500 ms). When data is acquired, the mapping relationship of "disk number-log information + disk capacity" can be established based on the disk number shown in FIG. 1, to ensure that the log information and disk capacity of each solid state disk can be accurately acquired. Figure 2
[0045] In some optional embodiments, the data acquisition period can be dynamically adjusted. By maintaining a health state history table, the state changes of each solid state disk in the past 24 hours are recorded. If the health states of all solid state disks are normal during the last test, the data acquisition period can be set to 1 hour. If there is a solid state disk in an abnormal state, the data acquisition period is automatically shortened to 5 minutes, so that test problems can be found in time. Optionally, the above data acquisition period is only an example, and embodiments of the present application do not limit this.
[0046] Step S203, after the log information and disk capacity are acquired each time, the health state of each solid state disk is determined based on the multiple log information and disk capacity of each solid state disk.
[0047] Specifically, the above step S203 includes:
[0048] Step S2031, for each solid state disk, when there is an abnormal field in any log information of the solid state disk or the disk capacity is an abnormal value, the health state of the solid state disk is determined to be an abnormal state.
[0049] Specifically, for each SSD, a dual determination mechanism of log semantic analysis and capacity value verification is employed: when any log message contains abnormal fields such as err, timeout, or critical warning, or when the disk capacity is an abnormal value, the health status of the SSD is determined to be abnormal. For example, if an SSD experiences a momentary timeout under high load but the disk capacity is normal, it will still be determined to be in an abnormal state. Optionally, an abnormal disk capacity value can occur when the deviation between the disk capacity and the nominal value exceeds a threshold. For example, if the measured disk capacity of a SSD with a nominal value of 1.6TB is 1.5TB, and the deviation is 6.25%, exceeding a threshold (e.g., 5%), an abnormality is triggered. Alternatively, a sudden change in disk capacity, such as a decrease of more than 10% in the disk capacity of a SSD within one hour with no normal write operation records, is determined to be abnormal. If the disk capacity of a SSD suddenly changes from 1.6TB to 1.4TB without any large data writes during this period, there may be a surge in bad blocks. Other methods for determining abnormal values can also be used, and the embodiments of the present invention are not limited in this regard. More specifically, when judging abnormal status, regular expressions are used to detect whether any of the above-mentioned abnormal fields exist in multiple log information, and the disk capacity is checked numerically to see whether it is an abnormal value. This dual judgment mechanism for abnormal status solves the problems of missed judgment and wrong judgment caused by a single judgment indicator, and effectively improves the abnormality detection rate and the accuracy of abnormality judgment.
[0050] Step S2032: When there is no abnormal field in all log information of the solid state drive and the disk capacity is not an abnormal value, it is determined that the health status of the solid state drive is normal.
[0051] Specifically, if none of the aforementioned abnormal fields exist in any log information and the disk capacity is also within normal limits, the SSD is considered to be in a normal health state. The abnormal state determination mechanism in this embodiment of the present invention combines log semantic analysis with disk capacity, improving judgment accuracy while effectively filtering out false positives caused by temporary I / O congestion.
[0052] Step S204, when the health status of the solid-state drive is abnormal, an abnormal analysis is performed based on multiple log information of the solid-state drive to obtain an abnormal analysis result, and the abnormal analysis result and the disk capacity are used as the abnormal test result of the solid-state drive. The multiple log information includes intelligent logs, manufacturer logs and system diagnostic information.
[0053] Specifically, in step S204, when the health status of the solid state drive is abnormal, an abnormality analysis is performed based on multiple log information of the solid state drive to obtain abnormality analysis results, including:
[0054] Step S2041: When the health status of the solid state drive is abnormal, an abnormality analysis is performed based on the smart log of the solid state drive to obtain real-time status information of the solid state drive. The smart log includes a serious warning field and an abnormal power-off field.
[0055] In some optional implementations, the above step S2041 includes:
[0056] Step a1: Determine the alarm information of the solid state drive based on the value of the severe warning field in the intelligent log of the solid state drive.
[0057] Specifically, the smart log (smart-log) includes multiple fields, each reflecting the real-time status of the SSD from different perspectives. The critical warning field (critical_warning) uses a binary bit encoding mechanism, representing the SSD's alarm status in real time through the combination of different bit states. This field is stored as a bit mask, with each bit corresponding to a specific physical or firmware layer anomaly. If critical_warning bit 1 is set to 1, a temperature anomaly alarm is triggered, indicating that the drive temperature has exceeded the operating threshold (typically 70°C). The real-time temperature value can be obtained using the temperature field. High or low temperatures can significantly increase the bit error rate of NAND flash memory, potentially causing SSD operation errors. If critical_warning bit 3 is set to 1, a read-only mode alarm is activated, locking the SSD's write channel at the hardware level and allowing only read operations. This state is commonly caused by insufficient power supply stability, firmware detection of media damage, or the triggering of the temperature protection mechanism. It prevents data consistency issues caused by write failures. If critical_warning bit 2 is set to 1, a controller error alarm is triggered. By analyzing the serious warning field, we can determine the corresponding alarm type and whether the alarm is triggered. Then, for the triggered alarm, we can collect the corresponding alarm information to facilitate subsequent abnormality location and processing.
[0058] Step a2: determining the number of abnormal power-offs of the solid-state drive based on the value of the abnormal power-off field in the intelligent log of the solid-state drive.
[0059] Specifically, the "unsafe shutdown" field in the intelligent log is a 16-bit unsigned integer. This counter records the number of SSD power outages caused by unplanned power outages and voltage drops, among other scenarios. This counter has a power-loss retention feature and automatically increments after each abnormal power outage. This unsafe shutdown count can be used for hardware damage assessment and power module diagnostics.
[0060] Step a3: Use the alarm information, abnormal status, and abnormal power-off times as real-time status information of the solid-state drive.
[0061] Specifically, the alarm information and the number of abnormal power-off times are structured and integrated to form real-time status information containing multi-dimensional information. The integrated real-time status information can be pushed to relevant personnel in real time, which helps to quickly locate the abnormality of the solid-state drive.
[0062] Step S2042 : performing an exception analysis based on the manufacturer's log of the solid-state drive to obtain historical exception information of the solid-state drive. The manufacturer's log includes a historical warning bit field.
[0063] Step b1: determining historical abnormality information of the solid-state drive based on the historical warning bit field in the manufacturer log of the solid-state drive.
[0064] Specifically, the history warning bit field (history_warning_bit) in the vendor log (vendor-log) uses a non-volatile storage mechanism to record abnormal events throughout the SSD's lifecycle in the form of binary bit combinations, compensating for the limitation of the intelligent log that only reflects the SSD's real-time status. Because the fields in the vendor log and the meaning of each bit in the field are customized by the manufacturer, the following is only an example:
[0065] history_warning_bit1: indicates that the SSD temperature exceeded the threshold (≥75°C) in the past 30 days;
[0066] history_warning_bit2: indicates that the solid-state drive has entered read-only mode;
[0067] history_warning_bit3: indicates that the number of SSD errors exceeds the threshold;
[0068] history_warning_bit6: indicates that the SSD capacitor check failed (may cause data loss due to power failure);
[0069] history_warning_bit8: indicates the record of failed firmware upgrade of the solid-state drive.
[0070] By analyzing the manufacturer's logs, historical abnormal information is obtained, which complements the real-time alarm information of the smart log, facilitating a comprehensive analysis of the health trends and potential failure hazards of the solid-state drive.
[0071] Step S2043 : performing an abnormality analysis based on the system diagnostic information of the solid state drive to obtain system abnormality information of the solid state drive.
[0072] Specifically, the system diagnostic information (dmesg) as the core carrier of the operating system kernel log carries the underlying signals of hardware interaction, and the implicit exceptions contained in it are often ignored by traditional testing schemes. By real-time analysis of system diagnostic information, transmission errors that exist at the bottom layer after the completion of read and write operations can be captured. For example, when a solid state disk performs a 10GB sequential write and returns a successful status code, if the [nvme0n1] Uncorrectable ECC error record appears in the system diagnostic information, it indicates that there is an uncorrectable bit error in the NAND flash memory, and the actual data integrity has been damaged. In this case, although the application layer operation shows success, the underlying hardware has hidden dangers. In terms of exception signal capture, by monitoring the frequency of the occurrence of nvmecommand timeout field, the controller response exception can be predicted before the intelligent log triggers an alarm. For example, if any solid state disk has 5 command timeout records in 1 hour, the intelligent log has not triggered the serious warning field, but the system diagnostic information has reflected that the controller processing capacity has decreased, and early analysis can shorten the exception discovery time to minutes. The traditional scheme only checks the system diagnostic information after the completion of read and write tasks, resulting in a lag in the discovery of exceptions, which may miss the best opportunity for exception positioning. Therefore, the embodiment of the present application adopts a timing acquisition mechanism to obtain system diagnostic information with accurate time stamp (time format such as 2025-06-26 14:30:22.123) through dmesg-T command, and combines a sliding window algorithm (window size is 10 minutes) to calculate the frequency of abnormal events. For example, when there are ≥3 I / O error-Aborting command records in the window, a pre-warning is triggered immediately. By acquiring and analyzing system diagnostic information in real time, the testing efficiency and exception discovery rate can be significantly improved.
[0073] In step S2044, the real-time state information, historical abnormal information and system abnormal information are obtained as the abnormal analysis result of the solid state disk.
[0074] Specifically, by fusing the three types of log information to construct a complete abnormal analysis system, the one-sidedness problem of single log analysis is avoided, and accurate and efficient abnormal analysis of the solid state disk is realized.
[0075] In some optional implementations, the above steps S201 to S204 are a test process described using a solid-state drive as an example. In the actual test process, all solid-state drives for daily testing on all servers are tested simultaneously, and the parallel processing method can significantly improve the test efficiency. In addition, when obtaining log information, taking intelligent logs, manufacturer logs, and system diagnostic information as examples, the corresponding log information can be obtained as needed in actual applications. If the health status of the solid-state drive is abnormal, the fields in the log information can be selected for abnormal analysis according to actual needs, and are not limited to the fields mentioned in the above step S204.
[0076] In some optional embodiments, Figure 3 A flowchart of another solid-state drive testing method provided in an embodiment of the present application first obtains all SSDs currently being tested in all servers, allowing SSD testing to be performed on top of routine testing without interrupting routine testing. Next, multiple log information and disk capacity information are obtained for each SSD. Based on the multiple log information and disk capacity information, a determination is made as to whether the SSD is in an abnormal state. The specific determination is as follows: if any log information contains an abnormal field or the disk capacity has an abnormal value, the SSD health status is determined to be abnormal; if no abnormal field exists in any log information and the disk capacity is not an abnormal value, the SSD health status is determined to be normal. If the SSD health status is normal, log information and disk capacity information for each SSD are continuously obtained in the next time period to implement a scheduled test. If the SSD health status is abnormal, an abnormality analysis is performed on the intelligent log, manufacturer log, and system diagnostic information. During the abnormality analysis of each log information, a judgment is performed on each field and each bit of each field to more specifically identify the cause of the abnormality. The abnormality analysis results of these three items, along with the disk capacity, are combined as the abnormality test result, and log information and disk capacity information for each SSD are continuously obtained in the next time period.
[0077] Step S205: Obtain historical log information, historical abnormality test results, historical disk capacity, and historical health status within a historical time period.
[0078] Specifically, historical data of all solid-state drives within a historical time period (for example, the past 7 days or 30 days) is automatically collected through automated scripts to construct sample data for model training, providing complete historical change data for subsequent model training. For solid-state drives whose historical health status is normal, their historical log information and historical disk capacity are obtained; for solid-state drives whose historical health status is abnormal, their historical log information, historical disk capacity, and historical abnormal test results are obtained. If only abnormal data is used for training, the model may misjudge normal fluctuations as abnormalities; if only normal data is used, the model cannot identify true abnormal patterns. Mixed data can balance the two types of samples and improve the generalization ability of the model. After obtaining historical data, preprocessing can be performed, such as missing value processing, outlier filtering, unit unification, etc., to improve data availability.
[0079] In some optional embodiments, if the proportion of abnormal samples is lower than a preset ratio (for example, 20%), the SMOTE (Synthetic Minority Over-sampling Technique) algorithm is used to generate synthetic abnormal samples, and the historical time period can be appropriately extended to avoid prediction bias caused by sample imbalance during model training.
[0080] Step S206 , extracting multiple training features from historical log information, historical abnormality test results, and historical disk capacity.
[0081] Specifically, feature extraction methods, such as regular expressions, natural language processing models, and random forests, are used to extract training features related to health status from the above historical data. Taking a historical time period of 7 days as an example, the training features that can be obtained are: capacity category: weekly capacity decline rate: (today's capacity - capacity 7 days ago) / capacity 7 days ago × 100%, remaining life percentage: (nominal capacity - used capacity) / nominal capacity × 100%; temperature category: average temperature, daily temperature fluctuation range: daily maximum temperature - minimum temperature, number of days with high temperature: number of days with temperature ≥ 65°C in the past 7 days, temperature change rate; reliability category: number of erase and write times: media_wearout_indicator in the smart log, error rate, abnormal power-off frequency: number of power-offs in the past 7 days / 7. Optional, the above training features are only examples, and representative training features can be selected according to actual needs. The embodiments of the present invention are not limited to this.
[0082] Step S207 , using multiple training features as input and historical health status as labels, trains a health status prediction model to obtain a target health status prediction model.
[0083] Specifically, a fusion model of LSTM (Long Short-Term Memory) and random forest is selected as an initial health state prediction model. The LSTM branch is used to process time features. The input layer receives time features first, and then the hidden layer captures long-term dependencies through a gating mechanism, for example, to identify the association pattern of "capacity continues to decline at an accelerated rate" and "future anomaly". Finally, the output layer outputs an anomaly probability between 0 and 1 through a sigmoid activation function. The random forest branch is used to process nonlinear features. First, the features other than time features in the training features are converted into binary vectors through one-hot encoding. Then, a forest is composed of 100 decision trees, each tree randomly samples 70% of the features and samples for training, and the final output is determined through a "voting mechanism", for example, 80 trees determine "abnormal" and output a probability of 0.8. The LSTM branch and the random forest branch are assigned weights, and the anomaly probabilities of the two branches are weighted and summed to obtain the final anomaly probability. By setting a threshold, the anomaly probability is compared with the threshold to determine whether it corresponds to a normal state or an abnormal state. Then, based on the difference between the predicted state and the historical health state, the Adam optimizer is used to minimize the binary cross-entropy loss to update the model parameters. Repeat the above process until the model parameters converge to obtain the target health state prediction model. Optionally, the above model structure is only an example, and other existing models can also be selected according to the training requirements, and the specific structure can also be set by itself, and the embodiments of the present application do not limit this. Through model training, the model learns the rules between the abnormal state and the related data of the solid state disk, so as to accurately predict the anomaly probability of the model.
[0084] Step S208, when the health state of the solid state disk is normal, the target health state prediction model is used to predict the solid state disk to obtain the anomaly probability of the solid state disk.
[0085] Specifically, if the health status of the solid-state drive has been determined to be abnormal in the above steps, there is no need to predict its abnormal probability. Therefore, for a solid-state drive whose health status is normal, refer to the above step S206 to extract features from the log information and disk capacity of the solid-state drive in the historical time period. The extracted features are input into the target health status prediction model. The model can output the abnormal probability of the solid-state drive based on the current data and the learned abnormal change trend, such as the abnormal probability of the solid-state drive in the next 48 hours. Optionally, a curve of abnormal probability change over time can be drawn, and the predicted occurrence time of abnormal events such as temperature exceeding the threshold and capacity mutation is marked to intuitively display the changes in the health status of the solid-state drive. Optionally, the abnormal probability curves of all solid-state drives in the same server are displayed side by side, which helps to quickly locate individual solid-state drives with a sudden increase in abnormal probability. Alternatively, any time period within the past month is selected to compare the difference between the current probability trend and the historical normal cycle, which helps to identify seasonal anomalies (for example, high temperatures in summer cause an overall increase in abnormal probability).
[0086] In some optional implementations, a mapping table is created between predictions and actual anomalies, recording the probability of anomalies for each SSD and the actual occurrence of anomalies within the subsequent 48 hours. The model's prediction accuracy is calculated, requiring it to exceed a preset threshold. If the prediction accuracy falls below the threshold for a period of time, a model retraining process is automatically triggered.
[0087] In some optional implementations, multiple graded warning intervals are set for abnormality probability. Based on the interval in which the abnormality probability falls, the corresponding handling method is determined, which helps implement preventive maintenance. For example, low risk: normal testing; medium risk: increased testing frequency; high risk: immediate alarm.
[0088] Through this application, since all solid-state drives that are being tested and located on the server are obtained, compared to the related art that only selects some solid-state drives from the currently tested solid-state drives to execute special test cases, it can cover more test scenarios and does not require the design of additional test cases. The acquisition characteristics of log information and disk capacity make it possible to test solid-state drives without interrupting the test like the related art. In addition, regular acquisition of data can also timely discover problems in the test. The health status of the solid-state drive is judged after obtaining log information and disk capacity each time. Compared with a single judgment indicator, it can achieve more accurate evaluation. When the health status of the solid-state drive is abnormal, an abnormality analysis is performed to clarify the specific cause of the abnormality, which is helpful for the targeted handling of subsequent abnormalities. Therefore, the technical problems of the risk of missed detection and low test efficiency can be solved, and the technical effect of comprehensive, accurate and efficient solid-state drive testing can be achieved.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0090] The embodiment of the present application also provides a solid state hard disk testing device, such as Figure 4 Shown, including:
[0091] The first acquisition module 401 is configured to acquire, for each server, all solid-state hard disks currently being tested and located in the server.
[0092] The second acquisition module 402 is used to periodically acquire multiple log information and disk capacity of each solid state drive.
[0093] The judgment module 403 is configured to judge the health status of each solid-state drive based on the multiple log information and the disk capacity of each solid-state drive after obtaining the log information and the disk capacity each time.
[0094] The analysis module 404 is used to perform an abnormality analysis based on multiple log information of the solid state drive when the health status of the solid state drive is abnormal, obtain an abnormality analysis result, and use the disk capacity and the abnormality analysis result as the abnormality test result of the solid state drive.
[0095] In some optional implementations, the determination module 403 includes:
[0096] The first determining unit is configured to determine, for each solid state drive, that the health status of the solid state drive is an abnormal state when there is an abnormal field in any log information of the solid state drive or the disk capacity is an abnormal value.
[0097] The second determining unit is configured to determine that the health status of the solid state drive is normal when no abnormal field exists in all log information of the solid state drive and the disk capacity is not an abnormal value.
[0098] In some optional implementations, the plurality of log information includes intelligent logs, manufacturer logs, and system diagnostic information;
[0099] The analysis module 404 includes:
[0100] The first analysis unit is used to perform an abnormality analysis based on the intelligent log of the solid-state hard disk when the health status of the solid-state hard disk is abnormal, so as to obtain real-time status information of the solid-state hard disk.
[0101] The second analysis unit is configured to perform an anomaly analysis based on the manufacturer's log of the solid-state drive to obtain historical anomaly information of the solid-state drive.
[0102] The third analysis unit is configured to perform abnormality analysis based on the system diagnostic information of the solid state disk to obtain system abnormality information of the solid state disk.
[0103] The third determination unit is configured to determine the real-time state information, the historical abnormality information and the system abnormality information as the abnormality analysis result of the solid state disk.
[0104] In some optional embodiments, the intelligent log includes a serious warning field and an abnormal power-off field.
[0105] The first analysis unit includes:
[0106] The first determination sub-unit is configured to determine alarm information of the solid state disk based on the value of the serious warning field in the intelligent log of the solid state disk.
[0107] The second determination sub-unit is configured to determine the number of abnormal power-offs of the solid state disk based on the value of the abnormal power-off field in the intelligent log of the solid state disk.
[0108] The third determination sub-unit is configured to determine the alarm information and the number of abnormal power-offs as the real-time state information of the solid state disk.
[0109] In some optional embodiments, the vendor log includes a historical warning bit field.
[0110] The second analysis unit includes:
[0111] The fourth determination sub-unit is configured to determine historical abnormality information of the solid state disk based on the historical warning bit field in the vendor log of the solid state disk.
[0112] In some optional embodiments, the second acquisition module 402 includes:
[0113] The acquisition unit is configured to acquire the multiple log information and the disk capacity of each solid state disk in a timely manner by using a remote technology.
[0114] In some optional embodiments, the device further includes:
[0115] The third acquisition module is configured to acquire historical log information, historical abnormality test results, historical disk capacity and a historical health state in a historical time period.
[0116] The extraction module is configured to extract multiple training features from the historical log information, the historical abnormality test results and the historical disk capacity.
[0117] The training module is configured to train the health state prediction model by taking the multiple training features as input and taking the historical health state as a label to obtain a target health state prediction model.
[0118] The prediction module is used to predict the solid state drive using the target health state prediction model when the health state of the solid state drive is normal, so as to obtain the abnormal probability of the solid state drive.
[0119] For the description of the features in the embodiment corresponding to the solid-state hard disk testing device, reference can be made to the relevant description of the embodiment corresponding to the solid-state hard disk testing method, and no further details will be given here.
[0120] The embodiment of the present application also provides an electronic device, such as Figure 5 As shown, it includes a memory 10 and a processor 20, the memory 10 stores a computer program, and the processor 20 is configured to run the computer program to execute the steps in any of the above-mentioned solid state drive testing method embodiments.
[0121] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned solid-state hard disk testing method embodiments when run.
[0122] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0123] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned solid-state hard disk testing method embodiments are implemented.
[0124] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned solid-state hard disk test method embodiments.
[0125] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0126] The above is a detailed introduction to the solid-state hard disk testing method, device, equipment and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A solid state drive testing method, characterized in that: include: For each server, obtain all solid-state drives under test located in the server; Regularly obtain multiple log information and disk capacity of each solid-state drive; After obtaining log information and disk capacity each time, the health status of each solid-state drive is determined based on the multiple log information and disk capacity of each solid-state drive; When the health status of the solid state drive is abnormal, an abnormality analysis is performed based on multiple log information of the solid state drive to obtain an abnormality analysis result, and the abnormality analysis result and the disk capacity are used as an abnormality test result of the solid state drive.
2. The solid state drive testing method according to claim 1, wherein: The determining of the health status of each solid-state drive based on the plurality of log information of each solid-state drive includes: For each solid-state drive, when there is an abnormal field in any log information of the solid-state drive or the disk capacity is an abnormal value, determining that the health status of the solid-state drive is an abnormal state; When no abnormal field exists in all log information of the solid state hard disk and the disk capacity is not an abnormal value, it is determined that the health status of the solid state hard disk is a normal status.
3. The solid state drive testing method according to claim 1, wherein: The plurality of log information includes intelligent log, manufacturer log and system diagnostic information; When the health status of the solid state drive is abnormal, performing abnormality analysis based on multiple log information of the solid state drive to obtain abnormality analysis results includes: When the health status of the solid state drive is abnormal, performing abnormality analysis based on the intelligent log of the solid state drive to obtain real-time status information of the solid state drive; Performing an exception analysis based on the manufacturer log of the solid-state drive to obtain historical exception information of the solid-state drive; Performing an abnormality analysis based on the system diagnostic information of the solid-state drive to obtain system abnormality information of the solid-state drive; The real-time status information, the historical abnormality information and the system abnormality information are used as abnormality analysis results of the solid state drive.
4. The solid state drive testing method according to claim 3, wherein: The intelligent log includes a serious warning field and an abnormal power-off field; The performing of abnormality analysis based on the intelligent log of the solid-state hard disk to obtain real-time status information of the solid-state hard disk includes: Determining alarm information of the solid-state drive based on a value of a severe warning field in the intelligent log of the solid-state drive; Determining the number of abnormal power-offs of the solid-state drive based on a value of an abnormal power-off field in the intelligent log of the solid-state drive; The alarm information and the number of abnormal power-offs are used as real-time status information of the solid-state hard disk.
5. The solid state drive testing method according to claim 3, wherein: The manufacturer log includes a historical warning bit field; The abnormality analysis based on the manufacturer log of the solid-state drive to obtain historical abnormality information of the solid-state drive includes: Based on the historical warning bit field in the manufacturer log of the solid-state drive, historical abnormality information of the solid-state drive is determined.
6. The solid state drive testing method according to claim 1, wherein: The method of periodically obtaining multiple log information and disk capacity of each solid state drive includes: Remote technology is used to periodically obtain multiple log information and disk capacity of each solid-state drive.
7. The solid state drive testing method according to claim 2, wherein: The method further comprises: Obtain historical log information, historical abnormality test results, historical disk capacity, and historical health status within a historical time period; extracting a plurality of training features from the historical log information, the historical abnormality test results, and the historical disk capacity; Using the plurality of training features as input and the historical health status as a label, training a health status prediction model to obtain a target health status prediction model; When the health status of the solid state drive is normal, the target health status prediction model is used to predict the solid state drive to obtain an abnormality probability of the solid state drive.
8. A solid state drive testing device, characterized in that: include: A first acquisition module is configured to acquire, for each server, all solid-state hard disks under test located in the server; The second acquisition module is used to periodically obtain multiple log information and disk capacity of each solid state drive; a judgment module, configured to judge the health status of each solid-state drive based on the multiple log information and the disk capacity of each solid-state drive after obtaining the log information and the disk capacity each time; The analysis module is used to perform an abnormality analysis based on multiple log information of the solid-state hard disk when the health status of the solid-state hard disk is abnormal, obtain an abnormality analysis result, and use the disk capacity and the abnormality analysis result as the abnormality test result of the solid-state hard disk.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the solid state drive testing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the solid-state drive testing method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Terminal storage function detection method and system, terminal and storage medium
CN121528287A
A terminal storage function detection method and system, a terminal, and a storage medium
CN121528287B
