Disk failure prediction method and device, electronic device and storage medium
By extracting time series features and calculating similarity on the disk failure prediction model, the imbalance problem of positive and negative samples in the disk failure prediction model is solved, the accuracy of disk failure prediction is improved, and the reliability of data storage and cloud services is ensured.
Patent Information
- Application Number
- CN202310720375.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2043-06-16
AI Technical Summary
In the existing technology, the disk failure prediction model has an unbalanced distribution of positive and negative samples, which leads to reduced disk failure prediction accuracy and affects the reliability of cloud services.
By obtaining sample data of faulty disks and healthy disks, time series feature extraction is performed, the similarity of abnormal features is calculated, the start time of the abnormality is determined, and the sample data is split into sub-sample data. The parameters of the neural network model are optimized to train the disk failure prediction model.
It improves the accuracy of disk failure prediction, reduces the risk of banking data loss, and improves the reliability of data storage and cloud services.
Smart Images

Figure CN116680602B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to a disk failure prediction method and device, electronic device, and storage medium. Background Art
[0002] With the rapid development of cloud computing and the Internet, banking business data such as archives, credit, and electronic bills have increased exponentially, and the demand for storage of banking business data has also increased exponentially.
[0003] Disks are often used as storage media for banking data, but disks have a short lifespan and a high probability of failure. Cloud services are based on cloud storage. A disk failure can permanently lose the banking data stored on disk in the cloud environment, impacting the reliability of cloud services. To reduce data loss caused by disk failures and improve cloud service reliability, disk failure prediction is necessary.
[0004] In related technologies, disk failure prediction is performed using deep learning models. This often requires constructing positive and negative samples using disk status data from healthy and faulty disks. However, the number of healthy disk status data samples is often much greater than the number of faulty disk samples, resulting in an uneven distribution of positive and negative samples. Directly training the disk failure prediction model using these positive and negative samples will reduce the model's accuracy. Therefore, improving the accuracy of disk failure prediction has become a pressing issue. Summary of the Invention
[0005] The main purpose of the embodiments of the present application is to propose a disk failure prediction method and its device, electronic device and storage medium, aiming to improve the accuracy of disk failure prediction, reduce the risk of banking business data loss, and improve the reliability of data storage and cloud services.
[0006] To achieve the above objectives, a first aspect of an embodiment of the present application provides a disk failure prediction method, the disk failure prediction method comprising:
[0007] Obtain first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample; wherein the first disk sample data includes status data of the faulty disk sample in a preset period, the preset period includes the time when the fault occurred, the second disk sample data includes status data of the healthy disk sample, the disk category of the faulty disk sample is a faulty category, and the disk category of the healthy disk sample is a healthy category;
[0008] Performing time series feature extraction on the first disk sample data to obtain abnormal features of the faulty disk sample;
[0009] Calculating similarity data between the abnormal features;
[0010] Determine the abnormal start time of the faulty disk sample according to the similarity data;
[0011] Splitting the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time;
[0012] Optimizing parameters of a preset neural network model according to the first sub-sample data and the second disk sample data to train the neural network model and obtain a disk failure prediction model;
[0013] The target state data of the target disk is obtained, and the target state data is input into the disk failure prediction model for failure prediction to obtain a failure prediction result of the target disk, wherein the failure prediction result is used to indicate whether the disk category of the target disk is the failure category or the healthy category.
[0014] In some embodiments, the failed disk sample includes a first failed disk sample and a second failed disk sample, the abnormal feature includes a first abnormal feature of the first failed disk sample and a second abnormal feature of the second failed disk sample, and calculating similarity data between the abnormal features includes:
[0015] Comparing the first abnormal feature and the second abnormal feature to obtain error data between the first abnormal feature and the second abnormal feature;
[0016] Calculating first discreteness data of the first abnormality feature and second discreteness data of the second abnormality feature;
[0017] The similarity data is obtained according to the error data, the first dispersion data, and the second dispersion data.
[0018] In some embodiments, determining the abnormal start time of the faulty disk sample according to the similarity data includes:
[0019] If the similarity data is greater than a preset similarity threshold, determining a first initial time according to a preset period of the first faulty disk sample, and determining a second initial time according to a preset period of the second faulty disk sample;
[0020] The abnormality starting time is determined according to the first initial time and the second initial time.
[0021] In some embodiments, splitting the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the failure occurrence time includes:
[0022] Performing abnormality location on the first disk sample data according to the abnormality start time and the fault occurrence time to obtain abnormal sample data;
[0023] The abnormal sample data is sampled through a preset sliding window to obtain a plurality of first sub-sample data.
[0024] In some embodiments, after splitting the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the failure occurrence time, the disk failure prediction method further includes:
[0025] Randomly selecting two first sub-sample data from the plurality of first sub-sample data as second sub-sample data and third sub-sample data;
[0026] Data enhancement is performed based on the second sub-sample data and the third sub-sample data to obtain the data-enhanced first sub-sample data.
[0027] In some embodiments, performing data enhancement based on the second sub-sample data and the third sub-sample data to obtain the data-enhanced first sub-sample data includes:
[0028] Determining a target threshold value based on the second sub-sample data and a preset initial threshold value;
[0029] Data enhancement is performed according to the target threshold, the second sub-sample data, and the third sub-sample data to obtain the first sub-sample data after data enhancement.
[0030] In some embodiments, the target threshold includes a first threshold and a second threshold, and performing data enhancement according to the target threshold, the second subsample data, and the third subsample data to obtain the data-enhanced first subsample data includes:
[0031] performing weighted calculation on the second sub-sample data according to the first threshold to obtain first weighted data;
[0032] performing weighted calculation on the third sub-sample data according to the second threshold to obtain second weighted data;
[0033] The first weighted data and the second weighted data are fused to obtain the first subsample data after data enhancement.
[0034] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a disk failure prediction device, the disk failure prediction device comprising:
[0035] an acquisition module, configured to acquire first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample; wherein the first disk sample data includes status data of the faulty disk sample during a preset period, the preset period including the time of occurrence of the fault; the second disk sample data includes status data of the healthy disk sample; the disk category of the faulty disk sample is a faulty category, and the disk category of the healthy disk sample is a healthy category;
[0036] a feature extraction module, configured to extract time series features from the first disk sample data to obtain abnormal features of the faulty disk sample;
[0037] A calculation module, used for calculating similarity data between the abnormal features;
[0038] a determination module, configured to determine an abnormality start time of the faulty disk sample according to the similarity data;
[0039] A splitting module, configured to split the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time;
[0040] A training module, configured to optimize parameters of a preset neural network model based on the first sub-sample data and the second disk sample data, so as to train the neural network model and obtain a disk failure prediction model;
[0041] A fault prediction module is used to obtain target status data of the target disk and input the target status data into the disk fault prediction model for fault prediction to obtain a fault prediction result of the target disk. The fault prediction result is used to indicate whether the disk category of the target disk is the fault category or the healthy category.
[0042] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the disk failure prediction method described in the first aspect above.
[0043] To achieve the above objectives, the fourth aspect of the embodiments of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the disk failure prediction method described in the first aspect.
[0044] The disk failure prediction method, disk failure prediction device, electronic device, and computer-readable storage medium proposed in this application obtain first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample. Before a disk failure occurs, multiple abnormal features are present. Time series feature extraction is performed on the first disk sample data to obtain the abnormal features of the faulty disk sample, which are then used to locate the onset time of the abnormality. Furthermore, similarity data between the abnormal features is calculated, and the onset time of the abnormality of the faulty disk sample is determined based on the similarity data. The state data of the faulty disk sample is then augmented with the abnormal onset time. Furthermore, the first disk sample data is split into multiple first sub-samples based on the abnormal onset time and the time of failure. This increases the state data of the faulty disk sample and ensures a uniform distribution of positive and negative samples. Compared to sampling the state data of healthy disk samples and increasing the number of faulty disk samples, increasing the number of faulty disk samples based on the abnormal onset time is more accurate. Parameters of a preset neural network model are optimized based on the first sub-sample data and the second disk sample data to train the neural network model and obtain a disk failure prediction model. This improves the accuracy of the disk failure prediction model in predicting disk failures. Finally, the target disk's target state data is obtained and fed into the disk failure prediction model for failure prediction. This results in a prediction result for the target disk, improving the accuracy of disk failure prediction for the target disk, reducing the risk of banking data loss, and improving data storage reliability. Furthermore, by promptly detecting failed disks, virtual machine issues caused by disk failures can be avoided, improving the reliability of cloud services. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flowchart of a disk failure prediction method provided by an embodiment of the present application;
[0046] Figure 2 yes Figure 1 Flowchart of step S130 in FIG.
[0047] Figure 3 yes Figure 1 Flowchart of step S140 in FIG.
[0048] Figure 4 yes Figure 1 Flowchart of step S150 in FIG.
[0049] Figure 5 is another flow chart of the disk failure prediction method provided by an embodiment of the present application;
[0050] Figure 6 yes Figure 5 Flowchart of step S520 in FIG.
[0051] Figure 7 yes Figure 6 Flowchart of step S620 in FIG.
[0052] Figure 8 This is a schematic diagram of the structure of a disk failure prediction device provided by an embodiment of the present application;
[0053] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0055] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and so on, in the specification, claims, and drawings, are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0057] First, let’s analyze some of the terms used in this application:
[0058] Artificial intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.
[0059] Self-Monitoring Analysis and Reporting Technology (SMART): is a technical standard that automatically monitors the health of disk drives and reports potential problems. The purpose of SMART is to monitor disk reliability, predict disk failures, and perform various types of disk self-tests.
[0060] With the rapid development of cloud computing and the Internet, banking business data such as archives, credit, and electronic bills have increased exponentially, and the demand for storage of banking business data has also increased exponentially.
[0061] Disks are often used as storage media for banking data, but disks have a short lifespan and a high probability of failure. Cloud services are based on cloud storage. A disk failure can permanently lose the banking data stored on disk in the cloud environment, impacting the reliability of cloud services. To reduce data loss caused by disk failures and improve cloud service reliability, disk failure prediction is necessary.
[0062] In related technologies, disk failure prediction is performed using deep learning models. When predicting disk failure, it is often necessary to construct positive and negative samples using disk status data from healthy and faulty disks. However, the number of healthy disk status data is often far greater than that of faulty disks. Using the faulty disk status data as positive samples and the healthy disk status data as negative samples will result in a significantly larger number of negative samples than positive samples, leading to a severe imbalance in the distribution of positive and negative samples. Directly training a disk failure prediction model using positive and negative samples will reduce the model's accuracy in predicting disk failures. Therefore, improving the accuracy of disk failure prediction has become a pressing issue.
[0063] Based on this, the embodiments of the present application provide a disk failure prediction method, a disk failure prediction device, an electronic device and a computer-readable storage medium, aiming to improve the accuracy of disk failure prediction, timely detect faulty disks, reduce the risk of data loss due to disk failure, and improve the reliability of data storage and cloud services.
[0064] The disk failure prediction method, disk failure prediction device, electronic device and computer-readable storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the disk failure prediction method in the embodiments of the present application is described.
[0065] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0066] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0067] The disk failure prediction method provided in the embodiment of the present application relates to the field of financial technology. The disk failure prediction method provided in the embodiment of the present application can be applied to the terminal, can be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the disk failure prediction method, etc., but is not limited to the above forms.
[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0069] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0070] Figure 1 This is an optional flowchart of the disk failure prediction method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S110 to S170.
[0071] Step S110: obtaining first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample; wherein the first disk sample data includes status data of the faulty disk sample during a preset period, the preset period including the time of occurrence of the fault; the second disk sample data includes status data of the healthy disk sample; the disk category of the faulty disk sample is faulty, and the disk category of the healthy disk sample is healthy;
[0072] Step S120, extracting time series features from the first disk sample data to obtain abnormal features of the faulty disk sample;
[0073] Step S130, calculating similarity data between abnormal features;
[0074] Step S140, determining the abnormal start time of the faulty disk sample based on the similarity data;
[0075] Step S150, splitting the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time;
[0076] Step S160, optimizing parameters of a preset neural network model based on the first sub-sample data and the second disk sample data to train the neural network model and obtain a disk failure prediction model;
[0077] Step S170 , obtaining target state data of the target disk, and inputting the target state data into a disk failure prediction model for failure prediction to obtain a failure prediction result of the target disk. The failure prediction result is used to indicate whether the disk category of the target disk is a failure category or a healthy category.
[0078] In steps S110 to S170 illustrated in the embodiment of the present application, by obtaining first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample, multiple abnormal features are present before a disk failure occurs. By extracting time series features from the first disk sample data, the abnormal features of the faulty disk sample are obtained, and the abnormal start time of the abnormality is located using the abnormal features. Furthermore, similarity data between the abnormal features is calculated, and the abnormal start time of the faulty disk sample is determined based on the similarity data, so that the status data of the faulty disk sample is increased based on the abnormal start time. Furthermore, the first disk sample data is split into multiple first sub-sample data based on the abnormal start time and the time of failure. This can increase the status data of the faulty disk sample and evenly distribute positive and negative samples. Compared with sampling the status data of healthy disk samples and increasing the number of faulty disk samples, increasing the number of faulty disk samples based on the abnormal start time is more accurate. Parameters of a preset neural network model are optimized based on the first sub-sample data and the second disk sample data to train the neural network model and obtain a disk failure prediction model, which can improve the accuracy of the disk failure prediction model in predicting disk failures. Finally, the target state data of the target disk is obtained, and the target state data is input into the disk failure prediction model for failure prediction, thereby obtaining the failure prediction result of the target disk, thereby improving the accuracy of disk failure prediction for the target disk.
[0079] In step S110 of some embodiments, business data is crucial to the banking system. In order to avoid business data loss due to disk failure, it is necessary to obtain disk sample data to train a disk failure prediction model based on the disk sample data, and to promptly detect faulty disks through the disk failure prediction model. Within a preset time period, a data acquisition task is performed to obtain first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample from the data center. The first disk sample data includes status data of at least two faulty disk samples at multiple times within a preset time period. The preset time period includes the time when the fault occurred and multiple times before the time when the fault occurred. The preset time period is a hyperparameter and can be set according to actual conditions. For example, the preset time period can be 168 hours. The second disk sample data includes status data of multiple healthy disk samples at multiple times within a preset time period. The disk category of the faulty disk sample is the faulty category, and the disk category of the healthy disk sample is the healthy category. The faulty disk samples and the healthy disk samples are numbered to obtain the number of the disk samples. Taking the disk sample numbered i as an example, the status data of the disk sample at time t is in Indicates the server number where the disk sample is located. Indicates the SMART test parameters of the disk sample. Indicates the system parameters of the server where the disk sample is located. Indicates the drive parameters required for the server to drive the disk. SMART detection parameters include the operating status parameters of the disk hardware and the statistical information of the disk hardware. The operating status parameters include the operating status parameters of the head, disk, motor, and circuit. The statistical information includes parameters such as the seek error rate and read error rate of the disk hardware. System parameters include operating system events and operating system errors. The operating system can be Windows or Linux. The server includes a display, data interface, processor, and disk. The processor includes an arithmetic unit and a controller. The drive parameters include parameters such as data interface delay (IO delay), display refresh rate, and controller reset operation.
[0080] In some embodiments, in step S120, the first disk sample data of the failed disk sample is used as a positive sample, and the second disk sample data of the healthy disk sample is used as a negative sample. The number of positive samples is counted to obtain a first number, and the number of negative samples is counted to obtain a second number. Based on the first number and the second number, the ratio of the first number to the second number can be calculated to be 1:N. Since the first number of positive samples is small and the second number of negative samples is large, the value of N is often very large, typically greater than 1,000 or 10,000. When the disk failure prediction model is trained using the first number of positive samples and the second number of negative samples, the first number is much smaller than the second number, resulting in an uneven distribution of positive and negative samples, which leads to low accuracy in disk failure prediction by the disk failure prediction model. It should be noted that disk failures include predictable and unpredictable failures. Predictable failures are caused by slow processes, such as electrical shock and bearing wear, and can be predicted by the disk failure prediction model. Unpredictable failures are sudden failures of electronic components caused by improper handling, such as sudden failure of disk chips or mechanical impact. Unpredictable failures cannot be predicted.
[0081] In order to improve the problem of serious imbalance in the ratio of positive and negative samples, the number of positive samples is increased by downsampling the negative samples. However, this method will cause a significant increase in the false recognition rate of positive samples, affecting the accuracy of fault prediction by the fault prediction model. Before a disk fails, there will be multiple instances showing abnormal characteristics. How to obtain these instances with abnormal characteristics requires finding the abnormal start time. The embodiment of the present application uses a time series neural network model to extract the time series features of the first disk sample data to obtain the abnormal features of the faulty disk sample, so as to locate the abnormal start time through the abnormal features. The data input to the time series neural network model is a fixed-length time series data, which is instance data, that is, the disk status data of the faulty disk in a preset time period. The time series neural network model can be a recurrent neural network (RNN) or a long short-term memory network (LSTM).
[0082] Taking the RNN network as an example, the process of extracting abnormal features is described. The RNN network consists of an input layer, a hidden layer, and an output layer. There is a first weight matrix U between the input layer and the hidden layer. The output x of the hidden layer at the previous time is t-1 There is a second weight matrix W between the first input of the hidden layer at the current time t, and a third weight matrix V between the hidden layer and the output layer. The first weight matrix U, the second weight matrix V and the third weight matrix W of the same hidden layer are the same. The input S of the input layer at the current time t Multiply it with the first weight matrix U to get the second input of the hidden layer at the current time t, and convert the output x of the hidden layer at the previous time t-1 into t-1 Multiply it with the second weight matrix W to obtain the first input of the hidden layer at the current time t, add the first input, the second input and the preset first bias to obtain the first mapping data, activate the first mapping data according to the hyperbolic tangent function tanh, and obtain the output x of the hidden layer at the current time t t , the third weight matrix V and the output x of the hidden layer at the current time t t Multiply them to get the second mapping data, activate the second mapping data according to the softmax function, and get the current time input S t Abnormal characteristics of o t , the abnormal features at each time t within the preset period are taken as the abnormal features of the faulty disk sample.
[0083] Taking the LSTM network as an example, the process of extracting abnormal features is described. The LSTM network includes a forget gate, an input gate, and an output gate. t-1 and the input S at the current time t tInput to the forget gate for weighted calculation to obtain the forget vector, and the hidden state h of the previous time t-1 is t-1 and the input S at the current time t t Input to the input gate for weighted calculation to obtain the reference value vector and the candidate value vector. Multiply the reference value vector and the candidate value vector to obtain the output parameter of the input gate. t-1 Multiply the forget vector point by point to get the first parameter, add the first parameter to the output parameter of the input gate point by point to get the cell state C at the current time t t , the hidden state h of the previous time t-1 t-1 and the input S at the current time t t The input is weighted to the output gate to obtain the output vector, and the cell state C at the current time t is calculated by the hyperbolic tangent function tanh t Perform activation processing to obtain the second parameter, multiply the output vector by the second parameter to obtain the hidden state h at the current time t t , the hidden state h t Enter S as the current time t abnormal characteristics, and the cell state C at the current time t t and hidden state h t Passed to the next time t+1.
[0084] See also Figure 2 In some embodiments, the failed disk sample includes a first failed disk sample and a second failed disk sample, and the abnormal feature includes a first abnormal feature of the first failed disk sample and a second abnormal feature of the second failed disk sample. Step S130 may include, but is not limited to, steps S210 to S230:
[0085] Step S210, comparing the first abnormal feature and the second abnormal feature to obtain error data between the first abnormal feature and the second abnormal feature;
[0086] Step S220, calculating first discreteness data of the first abnormal feature and second discreteness data of the second abnormal feature;
[0087] Step S230 , obtaining similarity data according to the error data, the first dispersion data, and the second dispersion data.
[0088] In step S210 of some embodiments, the disk status data of the first faulty disk sample m within a preset period and the disk status data of the second faulty disk sample n within a preset period are input into a time series neural network model for time series feature processing to obtain a first abnormal feature u of the first faulty disk sample. m , the second abnormal feature v of the second faulty disk sample nThe covariance function is used to measure the error between the first abnormal feature and the second abnormal feature to obtain the covariance matrix, which is used to represent the error data between the first abnormal feature and the second abnormal feature. If the covariance function is expressed as conv(), then conv(u m ,v n ) is the error data.
[0089] In step S220 of some embodiments, the first discreteness data of the first abnormal feature and the second discreteness data of the second abnormal feature are measured using a variance function. If the variance function is represented by var(), the first discreteness data is var(u m ), the second discreteness data is expressed as var(v n ).
[0090] In step S230 of some embodiments, according to the error data conv(u m ,v n ), the first discreteness data var(u m ) and the second discreteness data var(v n ) to perform similarity calculation to obtain similarity data. The calculation method of similarity data is shown in formula (1).
[0091]
[0092] Among them, p(u m ,v n ) is the first abnormal feature u m and the second abnormal feature v n The similarity data between .
[0093] In the above steps S210 to S230, from the start time of the abnormality to the time when the fault occurs, the abnormal patterns of the disk detection parameters, system parameters, and drive parameters are very similar. By calculating the similarity data between the abnormal features, more abnormal samples can be obtained based on the similarity data, thereby increasing the number of positive samples.
[0094] See also Figure 3 In some embodiments, step S140 may include but is not limited to steps S310 to S320:
[0095] Step S310 , if the similarity data is greater than a preset similarity threshold, determining a first initial time according to a preset period of time of the first faulty disk sample, and determining a second initial time according to a preset period of time of the second faulty disk sample;
[0096] Step S320: determining the abnormality start time according to the first initial time and the second initial time.
[0097] In some embodiments, in step S310, if the similarity data is greater than a similarity threshold, indicating that the similarity between the anomaly features of the two consecutive instances is high, the anomaly start time is determined based on the initial time of the first faulty disk sample and the initial time of the second faulty disk sample. Specifically, the first initial time is determined to be t1 based on the preset time period [t1, t2] of the first faulty disk sample, and the second initial time is determined to be t3 based on the preset time period [t3, t4] of the second faulty disk sample, where the time difference between t2 and t1 is equal to the time difference between t4 and t3.
[0098] It should be noted that the values of t1 and t3 can be the same or different, and the values of t2 and t4 can be the same or different. The first faulty disk sample and the second faulty disk sample can be the same faulty disk or different faulty disks. If the first faulty disk sample and the second faulty disk sample are the same faulty disk, then t3>t1 and t4>t2, and both [t1, t2] and [t3, t4] include the time of the fault. If the first faulty disk sample and the second faulty disk sample are different faulty disks, then t3≥t1 and t4≥t2, and both [t1, t2] and [t3, t4] include the time of the fault.
[0099] In step S320 of some embodiments, if the first initial time is t1 and the second initial time is t3, the abnormal start time is obtained according to the first initial time t1 and the second initial time t3.
[0100] Through the above steps S310 to S320, the abnormality start time when the faulty disk is abnormal can be obtained, so as to increase the number of positive samples according to the abnormality start time.
[0101] See also Figure 4 In some embodiments, step S150 may include but is not limited to steps S410 to S420:
[0102] Step S410, performing abnormal location on the first disk sample data according to the abnormality start time and the fault occurrence time to obtain abnormal sample data;
[0103] Step S420: sampling the abnormal sample data through a preset sliding window to obtain a plurality of first sub-sample data.
[0104] In step S410 of some embodiments, the disk status data from the abnormality start time to the failure occurrence time is used as abnormal sample data.
[0105] In step S420 of some embodiments, N sliding windows with a preset length are used to sample the abnormal sample data, obtaining N first sub-sample data. N is an integer greater than 1. The data length of each first sub-sample data is equal to the length of the sliding window. Each first sub-sample data has a serial number s, and 1 ≤ s ≤ N.
[0106] Through the above steps S410 to S420, the number of positive samples can be increased, and the problem of serious imbalance in the ratio of positive and negative samples can be improved.
[0107] Please refer to Figure 5 , in some embodiments, after step S150, the disk failure prediction method may further include but is not limited to steps S510 to S520:
[0108] Step S510: Randomly select two first sub-sample data from the multiple first sub-sample data as the second sub-sample data and the third sub-sample data;
[0109] Step S520: Perform data augmentation according to the second sub-sample data and the third sub-sample data to obtain the first sub-sample data after data augmentation.
[0110] In step S510 of some embodiments, randomly select two first sub-sample data from the N first sub-sample data as the second sub-sample data and the third sub-sample data
[0116] In step S610 of some embodiments, the target threshold includes a first threshold and a second threshold, and the sequence number p of the second sub-sample data is divided by the number N of the first sub-sample data to obtain an intermediate value The minimum value of the initial threshold and the intermediate value is used as the first threshold α, and the second threshold 1-α is obtained by subtracting the first threshold from 1, where the initial threshold is 0.5.
[0117] In step S620 of some embodiments, the second sub-sample data is weighted according to the first threshold to obtain first weighted data, the third sub-sample data is weighted according to the second threshold to obtain second weighted data, and the first weighted data and the second weighted data are fused to obtain the data-enhanced first sub-sample data.
[0118] In the above steps S610 to S620, data enhancement is performed through the target threshold, the second sub-sample data, and the third sub-sample data, which can improve the expression capability of abnormal features of positive samples.
[0119] See also Figure 7 In some embodiments, the target threshold includes a first threshold and a second threshold. Step S620 may include, but is not limited to, steps S710 to S730:
[0120] Step S710, performing weighted calculation on the second sub-sample data according to the first threshold to obtain first weighted data;
[0121] Step S720, performing weighted calculation on the third sub-sample data according to the second threshold to obtain second weighted data;
[0122] Step S730: performing data fusion on the first weighted data and the second weighted data to obtain first subsample data after data enhancement.
[0123] In step S710 of some embodiments, the first threshold α and the second sub-sample data Multiply them to obtain the first weighted data.
[0124] In step S720 of some embodiments, the closer the sample characteristics are to the time of fault occurrence, the more obvious they are. q is greater than p, and the third subsample data is closer to the time of fault occurrence. Therefore, the weight of the third subsample data needs to be increased. Multiply them to obtain the second weighted data.
[0125] In step S730 of some embodiments, the first weighted data and the second weighted data are added to obtain the first subsample data after data enhancement, that is,
[0126] In the above steps S710 to S730, the weight of the third sub-sample data close to the time of fault occurrence is increased, and the weight is multiplied by the third sub-sample data to obtain the second weighted data. By adding the first weighted data and the second weighted data, the sample characteristics of the first sub-sample data are enhanced, thereby improving the expressiveness of the sample characteristics.
[0127] In step S160 of some embodiments, the second disk sample data is processed into data with the same data length as the first sub-sample data, and the parameters of the preset neural network model are optimized based on the data-enhanced first sub-sample data and the processed second disk sample data to train the neural network model. The loss value is calculated using the loss function. When the loss value reaches the minimum or the number of model training reaches the iteration threshold, the model training is stopped to obtain a disk failure prediction model, where the loss function can be a cross entropy loss function, a mean square error loss function, etc.
[0128] In step S170 of some embodiments, target status data of the target disk is obtained from the data center, the data length of the target status data is equal to the data length of the first sub-sample data, and the target status data is input into the disk failure prediction model for failure prediction to determine whether the disk category of the target disk is a healthy disk or a faulty disk.
[0129] See also Figure 8 The present application also provides a disk failure prediction device that can implement the above disk failure prediction method. The disk failure prediction device includes:
[0130] An acquisition module 810 is configured to acquire first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample; wherein the first disk sample data includes status data of the faulty disk sample during a preset period, the preset period including the time of occurrence of the fault; the second disk sample data includes status data of the healthy disk sample; the disk category of the faulty disk sample is faulty, and the disk category of the healthy disk sample is healthy;
[0131] A feature extraction module 820 is configured to extract time series features from the first disk sample data to obtain abnormal features of the faulty disk sample;
[0132] A calculation module 830 is used to calculate similarity data between abnormal features;
[0133] A determination module 840 is configured to determine an abnormal start time of the faulty disk sample based on the similarity data;
[0134] A splitting module 850 is configured to split the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time;
[0135] A training module 860 is configured to optimize parameters of a preset neural network model based on the first subsample data and the second disk sample data to train the neural network model and obtain a disk failure prediction model;
[0136] The fault prediction module 870 is used to obtain the target status data of the target disk and input the target status data into the disk fault prediction model for fault prediction to obtain the fault prediction result of the target disk. The fault prediction result is used to indicate whether the disk category of the target disk is a fault category or a healthy category.
[0137] The specific implementation of the disk failure prediction device is substantially the same as the specific embodiment of the disk failure prediction method described above, and will not be described in detail here.
[0138] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the disk failure prediction method when executing the computer program. The electronic device can be any smart terminal, such as a tablet computer or an in-vehicle computer.
[0139] See also Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0140] The processor 910 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0141] The memory 920 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 920 and is called by the processor 910 to execute the disk failure prediction method of the embodiments of this application.
[0142] Input / output interface 930, used to implement information input and output;
[0143] Communication interface 940, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0144] bus 950 , which transmits information between various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );
[0145] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .
[0146] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned disk failure prediction method is implemented.
[0147] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0148] The disk failure prediction method, disk failure prediction device, electronic device, and computer-readable storage medium provided by the present application are based on obtaining first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample. Before a disk failure occurs, multiple abnormal features are present. Time series feature extraction is performed on the first disk sample data to obtain the abnormal features of the faulty disk sample, and the abnormal start time of the fault is located using the abnormal features. Furthermore, similarity data between the abnormal features is calculated, and the abnormal start time of the faulty disk sample is determined based on the similarity data, thereby increasing the status data of the faulty disk sample using the abnormal start time. Furthermore, the first disk sample data is split into multiple first sub-sample data based on the abnormal start time and the fault occurrence time. This increases the status data of the faulty disk sample and evenly distributes positive and negative samples. Compared to sampling the status data of healthy disk samples and increasing the number of faulty disk samples, increasing the number of faulty disk samples using the abnormal start time is more accurate. Parameters of a preset neural network model are optimized based on the first sub-sample data and the second disk sample data to train the neural network model and obtain a disk failure prediction model, which can improve the accuracy of the disk failure prediction model in predicting disk failures. Finally, the target state data of the target disk is obtained, and the target state data is input into the disk failure prediction model for failure prediction, thereby obtaining the failure prediction result of the target disk, thereby improving the accuracy of disk failure prediction for the target disk.
[0149] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0150] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0151] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0152] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0153] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0154] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0155] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0156] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0157] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0159] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A disk failure prediction method, characterized in that: The disk failure prediction method comprises: Obtain first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample; wherein the first disk sample data includes status data of the faulty disk sample in a preset period, the preset period includes the time when the fault occurred, the second disk sample data includes status data of the healthy disk sample, the disk category of the faulty disk sample is a faulty category, and the disk category of the healthy disk sample is a healthy category; Performing time series feature extraction on the first disk sample data to obtain abnormal features of the faulty disk sample; Calculating similarity data between the abnormal features; Determine the abnormal start time of the faulty disk sample according to the similarity data; Splitting the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time; Optimizing parameters of a preset neural network model according to the first sub-sample data and the second disk sample data to train the neural network model and obtain a disk failure prediction model; The target state data of the target disk is obtained, and the target state data is input into the disk failure prediction model for failure prediction to obtain a failure prediction result of the target disk, wherein the failure prediction result is used to indicate whether the disk category of the target disk is the failure category or the healthy category.
2. The disk failure prediction method according to claim 1, wherein: The faulty disk sample includes a first faulty disk sample and a second faulty disk sample, the abnormal feature includes a first abnormal feature of the first faulty disk sample and a second abnormal feature of the second faulty disk sample, and calculating similarity data between the abnormal features includes: Comparing the first abnormal feature and the second abnormal feature to obtain error data between the first abnormal feature and the second abnormal feature; Calculating first discreteness data of the first abnormality feature and second discreteness data of the second abnormality feature; The similarity data is obtained according to the error data, the first dispersion data, and the second dispersion data.
3. The disk failure prediction method according to claim 2, characterized in that: Determining the abnormal start time of the faulty disk sample according to the similarity data includes: If the similarity data is greater than a preset similarity threshold, determining a first initial time according to a preset period of the first faulty disk sample, and determining a second initial time according to a preset period of the second faulty disk sample; The abnormality starting time is determined according to the first initial time and the second initial time.
4. The disk failure prediction method according to claim 1, wherein: The step of splitting the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time includes: Performing abnormality location on the first disk sample data according to the abnormality start time and the fault occurrence time to obtain abnormal sample data; The abnormal sample data is sampled through a preset sliding window to obtain a plurality of first sub-sample data.
5. The disk failure prediction method according to any one of claims 1 to 4, characterized in that: After splitting the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time, the disk failure prediction method further includes: Randomly selecting two first sub-sample data from the plurality of first sub-sample data as second sub-sample data and third sub-sample data; Data enhancement is performed based on the second sub-sample data and the third sub-sample data to obtain the data-enhanced first sub-sample data.
6. The disk failure prediction method according to claim 5, characterized in that: The performing data enhancement according to the second sub-sample data and the third sub-sample data to obtain the data-enhanced first sub-sample data includes: Determining a target threshold value based on the second sub-sample data and a preset initial threshold value; Data enhancement is performed according to the target threshold, the second sub-sample data, and the third sub-sample data to obtain the first sub-sample data after data enhancement.
7. The disk failure prediction method according to claim 6, characterized in that: The target threshold includes a first threshold and a second threshold, and performing data enhancement according to the target threshold, the second sub-sample data, and the third sub-sample data to obtain the first sub-sample data after data enhancement includes: performing weighted calculation on the second sub-sample data according to the first threshold to obtain first weighted data; performing weighted calculation on the third sub-sample data according to the second threshold to obtain second weighted data; The first weighted data and the second weighted data are fused to obtain the first subsample data after data enhancement.
8. A disk failure prediction device, characterized in that: The disk failure prediction device comprises: an acquisition module, configured to acquire first disk sample data of a faulty disk sample and second disk sample data of a healthy disk sample; wherein the first disk sample data includes status data of the faulty disk sample during a preset period, the preset period including the time of occurrence of the fault; the second disk sample data includes status data of the healthy disk sample; the disk category of the faulty disk sample is a faulty category, and the disk category of the healthy disk sample is a healthy category; a feature extraction module, configured to extract time series features from the first disk sample data to obtain abnormal features of the faulty disk sample; A calculation module, used for calculating similarity data between the abnormal features; a determination module, configured to determine an abnormality start time of the faulty disk sample according to the similarity data; A splitting module, configured to split the first disk sample data into a plurality of first sub-sample data according to the abnormality start time and the fault occurrence time; A training module, configured to optimize parameters of a preset neural network model based on the first sub-sample data and the second disk sample data, so as to train the neural network model and obtain a disk failure prediction model; A fault prediction module is used to obtain target status data of the target disk and input the target status data into the disk fault prediction model for fault prediction to obtain a fault prediction result of the target disk. The fault prediction result is used to indicate whether the disk category of the target disk is the fault category or the healthy category.
9. An electronic device, characterized in that The electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following is achieved: The disk failure prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it realizes: The disk failure prediction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Monitoring index threshold determination method and device, electronic equipment and storage medium
CN116089240A
Container fault prediction method and device, electronic equipment and storage medium
CN116107859A