Method for constructing mechanical hard disk fault diagnosis model and method for fault diagnosis
Patent Information
- Application Number
- CN202310681815.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2043-06-09
AI Technical Summary
[0004]本发明提供一种机械硬盘故障诊断模型的构建方法、及故障诊断的方法,以解决现有技术中没有充分挖掘机械硬盘监测数据中蕴含的真实退化状态并将这些状态信息用于故障预警,导致预警精度不佳的问题
[0076]本发明通过获取机械硬盘全寿命的样本数据,根据所述样本数据以及预设的退化评估模型,对所述退化评估模型进行训练,预设的退化评估模型以样本数据作为输入,以机械硬盘的退化度数据作为期望输出,得到训练好的退化评估模型,再根据所述样本数据以及机械硬盘的退化度数据,形成第一数据,再根据所述第一数据以及预设的基于集成树模型的故障预警模型,对所述故障预警模型进行训练,其中,所述第一数据为输入,故障预警数据作为输出,如此构建的机械硬盘故障诊断模型具有预测精度更高、稳定性更好、鲁棒性更强。
Smart Images

Figure CN116701936B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of storage technology, specifically relating to a method for constructing a fault diagnosis model for a mechanical hard disk and a method for fault diagnosis. Background Technology
[0002] The advent of the information age has facilitated the rapid accumulation of industrial and social data, while also placing more stringent demands on the security and reliability of data storage systems. Hard disk drives (HDDs) are the most widely used information storage medium today and for a long time to come, and their operational status directly affects the information security and reliability of data storage systems. HDDs inevitably experience failures during their long service life. Failure to provide early warnings and prevent sudden HDD failures can lead to severe data loss and computer system crashes, causing irreparable losses to businesses and users. Therefore, HDD failure early warning systems have significant practical importance and application value.
[0003] Current hard drive failure prediction methods rely on Self-Monitoring, Analysis, and Reporting (SMART) technology. SMART monitors and records various hard drive performance parameters, triggering alarms when thresholds are exceeded. However, relying solely on threshold-based alarm triggering yields extremely low accuracy, failing to meet practical application needs. Existing machine learning-based hard drive failure early warning methods suffer from the following problems that urgently need to be addressed: current methods merely utilize binary classification models to identify whether a hard drive will fail after a period of time, failing to fully mine the true degradation state contained in the hard drive monitoring data and apply this state information to failure early warning, resulting in poor early warning accuracy. Summary of the Invention
[0004] This invention provides a method for constructing a fault diagnosis model for mechanical hard drives and a method for fault diagnosis, in order to solve the problem in the prior art that the actual degradation state contained in the monitoring data of mechanical hard drives is not fully explored and these state information is not used for fault early warning, resulting in poor early warning accuracy.
[0005] To achieve the above objectives, the present invention provides a method for constructing a fault diagnosis model for a mechanical hard disk, the method comprising:
[0006] Obtain sample data of the entire lifespan of the mechanical hard drive;
[0007] Based on the sample data and the preset degradation assessment model, the degradation assessment model is trained, wherein the preset degradation assessment model takes the sample data as input and the degradation degree data of the hard disk as the expected output.
[0008] Based on the sample data and the degradation data of the hard disk drive, the first data is formed;
[0009] The fault warning model is trained based on the first data and a preset fault warning model based on an ensemble tree model, wherein the first data is the input and the fault warning data is the output.
[0010] Preferably, in the method for constructing the mechanical hard drive fault diagnosis model, before the step of training the degradation assessment model based on the sample data and a preset degradation assessment model, the construction method further includes:
[0011] A degradation assessment model based on an ensemble tree model is established, and the degradation assessment model is as follows:
[0012]
[0013] in,
[0014] A set of regression trees;
[0015] K represents the number of regression trees;
[0016] f(·) represents the input-output function relationship of the regression tree;
[0017] q(·) represents the structure of each tree, which maps the sample S to the leaf node corresponding to the prediction result;
[0018] w q(S) This represents the value of the q(S)th leaf node;
[0019] N T This represents the number of tree nodes in the regression tree.
[0020] Preferably, in the method for constructing the mechanical hard disk fault diagnosis model, after the step of establishing the degradation assessment model based on the ensemble tree model, the construction method further includes:
[0021] A first objective function is established to limit overfitting and model complexity. The first objective function is as follows:
[0022]
[0023] in,
[0024] This is a model complexity penalty term used to smooth the weights learned by the model, prevent overfitting, and limit the total number of leaf nodes. Here, γ and λ represent hyperparameters controlling the strength of the penalty. j This represents the value of the j-th leaf node;
[0025] l(·) is a differentiable loss function used to measure the difference between predicted values and degradation data C. i Differences;
[0026] An asymmetric loss function is established, as follows:
[0027]
[0028] Preferably, in the method for constructing the mechanical hard drive fault diagnosis model, the step of training the degradation assessment model based on the sample data and a preset degradation assessment model includes:
[0029] Using the forward distribution algorithm, based on the sample data and the preset degradation assessment model, K iterations are performed. Each iteration learns a regression tree model, and the k-th iteration is used to learn the k-th regression tree f. k (·), and the first k-1 regression trees are no longer adjusted, and the kth regression tree is trained.
[0030] Preferably, in the method for constructing the mechanical hard drive fault diagnosis model, the step of training the degradation assessment model based on the sample data and a preset degradation assessment model includes:
[0031] The first objective function is simplified to:
[0032]
[0033] in,
[0034] The objective of solving the regression tree is rewritten as:
[0035]
[0036] in, This represents the optimal value of leaf node j;
[0037] Loss function L D (θ) (k)* The minimum value is:
[0038]
[0039] Based on the sample data, the structure of the regression tree is determined using the maximum optimization algorithm, and a trained degradation assessment model is obtained.
[0040] Preferably, in the method for constructing the mechanical hard drive fault diagnosis model, the step of forming the first data based on the sample data and the mechanical hard drive degradation data includes:
[0041] The sample data and the degradation data of the hard drive are concatenated, and the expression is as follows:
[0042]
[0043] Among them, {C i} represents degradation level data;
[0044] (S i} represents sample data.
[0045] Preferably, in the method for constructing the mechanical hard drive fault diagnosis model, the step of training the fault warning model based on the first data and a preset fault warning model based on an ensemble tree model includes:
[0046] For the fault warning data A in the first data i Data with a value of 1 is subjected to Gaussian upsampling;
[0047] The Gaussian-upsampled data is updated to the first data set to obtain the second data used to train the fault warning model;
[0048] The second data is input into a preset fault warning model based on an ensemble tree model, and the fault warning model is trained. The fault warning model is as follows:
[0049]
[0050] in, The set representing the regression trees;
[0051] K represents the number of regression trees;
[0052] f(·) represents the input-output function relationship of the regression tree;
[0053] q(·) represents the structure of each tree, which maps the second data SC' to the leaf node corresponding to the prediction result;
[0054] w q(SC') This represents the value of the q-th (SC')th leaf node;
[0055] N T This represents the number of tree nodes in the regression tree;
[0056] A' i This is fault warning data.
[0057] Preferably, in the method for constructing the mechanical hard drive fault diagnosis model, before the step of inputting the second data into a preset fault warning model based on an ensemble tree model and training the fault warning model, the construction method further includes:
[0058] A second objective function is established to limit overfitting and model complexity. The first objective function is as follows:
[0059]
[0060] in, This is a model complexity penalty term used to smooth the weights learned by the model, prevent overfitting, and limit the total number of leaf nodes. Here, γ and λ represent hyperparameters controlling the strength of the penalty. j This represents the value of the j-th leaf node;
[0061] l(·) is a differentiable loss function used to measure the predicted value and fault warning data A'. i Differences;
[0062] The logarithmic loss function is defined as follows:
[0063]
[0064] Among them, A' i This is fault warning data.
[0065] To achieve the above objectives, the present invention also provides a method for diagnosing mechanical hard disk (HDD) faults, the method comprising:
[0066] Obtain the current operating status data of the hard disk drive;
[0067] The operating status data is input into the trained degradation assessment model to obtain degradation degree data, wherein the degradation assessment model is established in the construction method of the mechanical hard disk fault diagnosis model according to any one of claims 1 to 8;
[0068] The second data is obtained based on the operating status data and the degradation degree data;
[0069] The second data is input into the trained fault warning model to obtain the fault warning result of the hard disk drive, wherein the fault warning model is established in the construction method of the hard disk drive fault diagnosis model according to any one of claims 1 to 8.
[0070] To achieve the above objectives, the present invention also provides a terminal, the terminal comprising:
[0071] At least one processor; and,
[0072] A memory communicatively connected to the at least one processor; wherein,
[0073] The memory stores instructions that can be executed by the at least one processor, which enable the at least one processor to perform the above-described method for constructing a mechanical hard disk fault diagnosis model, or the above-described method for diagnosing mechanical hard disk faults.
[0074] To achieve the above objectives, the present invention also provides a computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the above-described method for constructing a mechanical hard disk fault diagnosis model, or the above-described method for diagnosing mechanical hard disk faults.
[0075] The technical solution provided by this invention has the following advantages:
[0076] This invention acquires sample data of the entire lifespan of a hard disk drive (HDD), trains the degradation assessment model based on the sample data and a preset degradation assessment model, using the sample data as input and the HDD degradation degree data as the expected output to obtain a trained degradation assessment model. Then, based on the sample data and the HDD degradation degree data, first data is formed. Finally, based on the first data and a preset fault warning model based on an ensemble tree model, the fault warning model is trained, with the first data as input and the fault warning data as output. The HDD fault diagnosis model constructed in this way has higher prediction accuracy, better stability, and stronger robustness.
[0077] Furthermore, the present invention utilizes fault warning data A from the first data. i Gaussian upsampling of data with a value of 1 can effectively eliminate severe sample imbalance during the training of mechanical hard disk fault diagnosis models, thus avoiding missed or false alarms.
[0078] Furthermore, the mechanical hard drive fault diagnosis model constructed in this invention, compared with the existing technology that only uses a binary classification model to identify whether a mechanical hard drive has failed over a period of time, can fully explore the true degradation state contained in the mechanical hard drive monitoring data and use this state information for fault early warning, resulting in high early warning accuracy. Attached Figure Description
[0079] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0080] Figure 1A schematic diagram of the first embodiment of the method for constructing a mechanical hard disk diagnostic model provided by the present invention;
[0081] Figure 2 A schematic diagram of a second embodiment of the method for constructing a mechanical hard disk diagnostic model provided by the present invention;
[0082] Figure 3 A schematic diagram of the third embodiment of the method for constructing a mechanical hard disk diagnostic model provided by the present invention;
[0083] Figure 4 A schematic diagram of the first embodiment of the mechanical hard disk fault diagnosis method provided by the present invention;
[0084] Figure 5 This is a schematic diagram of an embodiment of the terminal of the present invention;
[0085] Figure 6 This is a schematic diagram illustrating the comparison of test results in this invention.
[0086] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0087] In this embodiment of the invention, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0088] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0089] In this embodiment of the invention, the term "multiple" refers to two or more, and other quantifiers are similar.
[0090] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the embodiments of the present invention to facilitate a better understanding of the invention. However, the technical solutions claimed in the present invention can be implemented even without these technical details and various variations and modifications based on the following embodiments. The division of the following embodiments is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.
[0091] The following describes the implementation details of the method for constructing the mechanical hard disk diagnostic model according to the first embodiment of the present invention. The following implementation details are provided for ease of understanding only and are not necessary for implementing this solution.
[0092] The specific process of this implementation method is as follows: Figure 1 As shown, it specifically includes:
[0093] Step S100: Obtain sample data of the entire lifespan of the mechanical hard drive;
[0094] It should be understood that the sample data for the entire lifespan of a mechanical hard drive is the data from the hard drive's operation to its failure. In this embodiment, the sample data is SMART (Self-Monitoring, Analysis and Reporting Technology) data.
[0095] The following uses {S} i} represents the set of sample data for the entire lifespan of different hard disk drives, where S i ={S i,1 ,S i,2 ,......,S i,F}∈R F The sample data for the entire lifespan of the hard drive at sampling time i is identified, F represents the number of SMART attributes selected for fault warning, and S represents the number of samples at sampling time i. i,t This represents the t-th SMART attribute value at sampling time i.
[0096] Where the sampling time i is the time from when the hard drive is put into use to when the sampling data S is collected. i The amount of time spent using it.
[0097] It should be noted that the sample data obtained by acquiring the entire lifespan of mechanical hard drives are the full lifespan SMART data of different mechanical hard drives from operation to failure, which makes the training model more accurate and realistic.
[0098] Among them, the SMART attributes include underlying data read error rate, disk startup time, motor start-stop count, relocation sector count, etc. The following table shows the SMART attributes used for degradation assessment and fault warning, taking a certain hard drive as an example.
[0099] Table 1 SMART Attributes
[0100]
[0101]
[0102] Step S200: Train the degradation assessment model based on the sample data and the preset degradation assessment model, wherein the preset degradation assessment model takes the sample data as input and the degradation degree data of the hard disk as the expected output.
[0103] It should be noted that the degradation data uses {C} i} indicates that, among which, C i ∈R represents the degradation data (e.g., degradation label) taken at time i, expressed as follows:
[0104]
[0105] Where L is the total usage time of the hard drive from when it is put into use until it fails, that is, the lifespan of the hard drive.
[0106] a d This is the warning time for mechanical hard drive failure, i.e., the mechanical hard drive will fail in time when a... d The Queen experienced a malfunction;
[0107] Typically, La d The samples from the previous day were marked as "safe," meaning the fault warning data was 0. d The sample of the queen is marked as "about to fail", that is, the fault warning data is 1. In other embodiments, other marking rules may also be used.
[0108] Step S300: Based on the sample data and the degradation data of the hard disk, first data is generated;
[0109] It should be understood that the first data is formed based on the sample data and the degradation data of the mechanical hard drive, thus forming the input for constructing the fault early warning model.
[0110] In a specific implementation, step S300 includes:
[0111] The sample data and the degradation data of the hard drive are concatenated, and the expression is as follows:
[0112]
[0113] Among them, {C i} represents degradation level data;
[0114] {S i} represents sample data;
[0115] concat(·) represents a concatenation function;
[0116] This way, {SC i} is used as input to the fault early warning model, with fault early warning data {A} iThe expected output of the model is used for model training.
[0117] Step S400: Train the fault warning model based on the first data and a preset fault warning model based on an ensemble tree model, wherein the first data is the input and the fault warning data is the output.
[0118] It should be noted that fault warning data can be represented using the following expression:
[0119]
[0120] That is, La d The sample from the previous day was marked as "safe," meaning the fault warning label was 0. d The sample from the previous day was marked as "about to fail", which means the fault warning label was 1.
[0121] This invention acquires sample data of the entire lifespan of a hard disk drive (HDD), trains the degradation assessment model based on the sample data and a preset degradation assessment model, using the sample data as input and the HDD degradation degree data as the expected output to obtain a trained degradation assessment model. Then, based on the sample data and the HDD degradation degree data, first data is formed. Finally, based on the first data and a preset fault warning model based on an ensemble tree model, the fault warning model is trained, with the first data as input and the fault warning data as output. The HDD fault diagnosis model constructed in this way has higher prediction accuracy, better stability, and stronger robustness.
[0122] like Figure 2 As shown in the second embodiment of the method for constructing a mechanical hard disk fault diagnosis model provided by the present invention, before step S200, the construction method further includes:
[0123] Step S210: Establish a degradation assessment model based on the ensemble tree model, wherein the degradation assessment model is as follows:
[0124]
[0125] in,
[0126] A set of regression trees;
[0127] K represents the number of regression trees;
[0128] f(·) represents the input-output function relationship of the regression tree;
[0129] q(·) represents the structure of each tree, which maps the sample S to the leaf node corresponding to the prediction result;
[0130] w q(S) This represents the value of the q(S)th leaf node;
[0131] N T This represents the number of tree nodes in the regression tree.
[0132] The degradation assessment model is trained using sample data from different hard disk drives throughout their entire lifespan; alternatively, an asymmetric loss function can be constructed for training the degradation assessment model. The specific methods are as follows:
[0133] Step S220: Establish a first objective function to limit overfitting and model complexity. The first objective function is as follows:
[0134]
[0135] in,
[0136] This is a model complexity penalty term used to smooth the weights learned by the model, prevent overfitting, and limit the total number of leaf nodes. Here, γ and λ represent hyperparameters controlling the strength of the penalty. j This represents the value of the j-th leaf node;
[0137] l(·) is a differentiable loss function used to measure the difference between predicted values and degradation data C. i Differences;
[0138] Step S230: Establish an asymmetric loss function, which is as follows:
[0139]
[0140] It should be noted that when the predicted value of the degradation degree is less than the label value, it is easy for the mechanical hard drive to fail without being identified. In order to avoid this phenomenon of late warning of failure, the present invention constructs an asymmetric loss function as shown in equation (3). In specific training, the degradation evaluation model can be trained according to the first objective function and the asymmetric loss function.
[0141] More specifically, a forward distribution algorithm is used, and based on the sample data and a preset degradation evaluation model, K iterations are performed. Each iteration learns a regression tree model, and the k-th iteration is used to learn the k-th regression tree f. k (·), and the first k-1 regression trees are no longer adjusted, and the kth regression tree is trained.
[0142] The specific steps of the training include:
[0143] (1) The first objective function can be written as:
[0144]
[0145] In the formula, I j ={i|q{S i )=j} represents the sample set corresponding to leaf node j; the above equation can be simplified by Taylor second-order expansion to obtain:
[0146]
[0147] In the formula These represent the first and second gradient statistics of the loss function, respectively;
[0148] It can be further simplified to:
[0149]
[0150] in,
[0151] (2) The objective of solving the regression tree is rewritten as:
[0152]
[0153] in, This represents the optimal value of leaf node j;
[0154] Loss function L D (θ) (k)* The minimum value is:
[0155]
[0156] (3) Based on the sample data, the maximum optimization algorithm is used to determine the structure of the regression tree and obtain the trained degradation evaluation model.
[0157] Specifically, adopt
[0158] 1) Initialize the gain score:
[0159] Score = 0;
[0160] 2) Traverse the input data {S i All features of the group (F features in total, including F SMART attributes) are used to form a regression tree for each feature. The specific steps are as follows:
[0161] a) Initialize the G and H of the regression tree:
[0162] G = 0;
[0163] H = 0;
[0164] b) Sort all samples according to the current feature, take the node value as the sorted feature value in turn, and update the Score and G of different branch nodes. L GR H, H R :
[0165] G L =G L +g i ;
[0166] G R =GG L ;
[0167] H L =H L +h i ;
[0168] H R =HH L ;
[0169]
[0170] 3) Based on the above steps, the trained degradation assessment model is finally obtained.
[0171] like Figure 3 As shown, in the third embodiment of the method for constructing a mechanical hard disk fault diagnosis model provided by the present invention, step S400 includes:
[0172] Step S410, fault warning data A in the first data i Data with a value of 1 is subjected to Gaussian upsampling;
[0173] It should be noted that, in real-world applications, the amount of faulty hard drives is far less than the amount of normal data, leading to severe sample imbalance when training machine learning models. Existing methods cannot effectively handle this problem, frequently resulting in false negatives and false negatives. However, in actual data, the samples marked as "about to fail" are extremely small, i.e., fault warning data A. i The extremely small number of samples with a value of 1 leads to severe imbalance in the training data of the fault warning model. To address this, Gaussian upsampling is first applied to the training data input to the fault warning model to eliminate the impact of severe imbalance on the performance of the fault warning model and avoid imbalance during training.
[0174] In specific implementation, the specific expression of step S410 is as follows:
[0175] {(SC new,i A new,i =1)}resample({(SC i +gau,A i =1)});
[0176] {(SC new,i A new,i=1)}=resample({(SC i +gau,A i =1)});
[0177] Among them, {(SC new,i A new,i =1)} represents the fault warning data A i The sample set obtained after oversampling the sample set with a value of 1, in order to ensure a balance between the number of "safe" samples and "soon-to-expire" samples, {(SC new,i A new,i =1)}|=|{(SC i A i =0)}|,(SC i A i =1) represents a sample with a fault warning label of 1, resample(·) represents a random oversampling function, gau={gau1,gau2,…gau F Let} be a Gaussian random matrix, P(gau i ) represents the i-th element gau in gau. i The probability density.
[0178] Step S420: Update the Gaussian-upsampled data to the set of first data to obtain second data for training the fault warning model;
[0179] In specific implementation, the expression for step S420 is as follows:
[0180] {(SC' i ,A' i )}={(SC i A i =0)}+{(SC new,i A new,i =1)}.
[0181] It should be noted that the fault warning data A in the first data set... i Gaussian upsampling of data with a value of 1 is applied to fault warning data A in the first dataset. i Data with a value of 0 does not need to be processed. This effectively eliminates the severe imbalance of samples during the training of the mechanical hard drive fault diagnosis model, thus avoiding the problems of missed or false alarms.
[0182] Step S430: Input the second data into a preset fault warning model based on an ensemble tree model, and train the fault warning model. The fault warning model is as follows:
[0183]
[0184] in, The set representing the regression trees;
[0185] K represents the number of regression trees;
[0186] f(·) represents the input-output function relationship of the regression tree;
[0187] q(·) represents the structure of each tree, which maps the second data SC' to the leaf node corresponding to the prediction result;
[0188] w q(SC') This represents the value of the q-th (SC')th leaf node;
[0189] N T This represents the number of tree nodes in the regression tree;
[0190] A' i This is fault warning data.
[0191] It should be understood that by {(SC') i ,A' i The input of the fault warning model is used to train the fault warning model.
[0192] It should be noted that, in order to train the fault early warning model more accurately, the construction method also includes:
[0193] Step S431: Establish a second objective function to limit overfitting and model complexity. The first objective function is as follows:
[0194]
[0195] in, This is a model complexity penalty term used to smooth the weights learned by the model, prevent overfitting, and limit the total number of leaf nodes. Here, γ and λ represent hyperparameters controlling the strength of the penalty. j This represents the value of the j-th leaf node;
[0196] l(·) is a differentiable loss function used to measure the predicted value and fault warning data A'. i Differences;
[0197] The logarithmic loss function is defined as follows:
[0198]
[0199] Among them, A' i This is fault warning data.
[0200] The fault early warning model can employ a forward distribution algorithm, performing K iterations. Each iteration learns a regression tree model, with the k-th iteration used to learn the k-th regression tree f.k (·), and the first k-1 regression trees are no longer adjusted. The kth regression tree is then trained. The specific training process includes:
[0201] (1) The second objective function for training can be written as:
[0202]
[0203] In the formula, I j ={i|q(SC' i )=j} represents the sample set corresponding to leaf node j; the above equation can be simplified by Taylor second-order expansion to obtain:
[0204]
[0205] In the formula, These represent the first and second gradient statistics of the loss function, respectively;
[0206] The above formula can be further simplified to:
[0207]
[0208] In the formula,
[0209] (2) The objective of solving the regression tree can be written as:
[0210]
[0211] In the formula, Represents the optimal value of leaf node j; loss function L A (φ) (k)* The minimum value is
[0212]
[0213] (3) The structure of the regression tree is determined using an exact greedy algorithm. The specific steps are as follows:
[0214] 1) Initialize the gain score:
[0215] Score = 0;
[0216] 2) Traverse the input data {SC i All features of the group (F+1 features in total, including F SMART attributes and one degradation degree) are used to form a regression tree for each feature. The specific steps are as follows:
[0217] a) Initialize the G and H of the regression tree:
[0218] G = 0;
[0219] H = 0;
[0220] b) Sort all samples according to the current feature, take the node value as the sorted feature value in turn, and update the Score and G of different branch nodes. L G R H, H R :
[0221] G L =G L +g i ;
[0222] G R =GG L ;
[0223] H L =H L +h i ;
[0224] H R =HH L ;
[0225]
[0226] (4) After the above steps, the trained fault early warning model φ(·) is finally obtained.
[0227] The implementation details of the mechanical hard disk fault diagnosis method according to the first embodiment of the present invention are described below. The following implementation details are provided for ease of understanding only and are not necessary for implementing this solution.
[0228] The specific process of this implementation method is as follows: Figure 4 As shown, it specifically includes:
[0229] Step S510: Obtain the current operating status data of the mechanical hard drive;
[0230] It should be understood that the current operating status data of the hard drive is the hard drive's SMART data, which can be represented as...
[0231] It should be noted that the current operating status data of a mechanical hard drive is usually the SMART data of the mechanical hard drive that needs to be monitored.
[0232] Step S520: Input the running status data into the trained degradation assessment model to obtain degradation degree data, wherein the degradation assessment model is established in the construction method of the mechanical hard disk fault diagnosis model according to any one of claims 1 to 8;
[0233] It should be understood that, in this embodiment, the operating status data is SMART data from the mechanical hard drive.
[0234] More specifically, the SMART data of the mechanical hard drive The degradation assessment value Y of the hard disk drive is obtained by inputting it into the trained degradation assessment model θ(·), and the mathematical expression is as follows:
[0235] Y = θ(X).
[0236] Step S530: Obtain second data based on the operating status data and the degradation degree data;
[0237] It should be understood that the second data can be formed by splicing together, or by other methods. In this embodiment,
[0238] The SMART data of the mechanical hard drive is X = {X1, X2, ... X} F} and the degradation assessment value Y output by the degradation assessment model are concatenated
[0239] Step S540: Input the second data into the trained fault warning model to obtain the fault warning result of the hard disk drive, wherein the fault warning model is established in the construction method of the hard disk drive fault diagnosis model according to any one of claims 1 to 8.
[0240] It should be understood that the second data is used as the output of the fault warning model φ(·) to obtain the fault warning result of the hard drive. The mathematical expression is as follows:
[0241] R = φ(XY);
[0242] In the formula, R represents the fault warning result, R=0 indicates that the hard drive is operating safely, and R=1 indicates that the hard drive is a days away from failure. d Every day, it's necessary to back up data and replace the hard drive promptly.
[0243] Example 1:
[0244] Taking a certain ST4000DM000 and ST8000NM0055 hard drive as examples, the effectiveness of the method of this invention was verified using 12 sets of SMART data on the entire lifespan of each hard drive. During the experimental verification, the number of warning days a... dThe SMART attribute, set to 14, for degradation assessment and fault warning is shown in Table 1. 75% of the hard drives for each model (9 hard drives per model with full lifespan data) were selected to construct the training set, and the remaining 25% of the hard drive lifespan data (3 hard drives per model with full lifespan data) were used as the test set to test the effectiveness of the method of this invention. The degradation assessment and fault warning results of the test set hard drives of models ST4000DM000 and ST8000NM0055 were presented. Experimental results demonstrate that the degradation assessment value and fault warning result of the method of this invention are highly close to the true value, indicating that the method of this invention can effectively assess the degradation degree of mechanical hard drives and can accurately make fault warnings by comprehensively considering degradation indicators and monitoring data, effectively reducing the problems of missed and false alarms. To further verify the superiority of this invention, an embodiment compared the single-model driven method using only the fault warning model of this invention with the fault warning method based on Gradient Boosting Decision Tree (GBDT). The results on the test set hard drive data of the two models are shown below. Figure 6 As shown. From Figure 6 As can be seen, the performance of the method of the present invention is better than the other two prediction methods, indicating that the method of the present invention has higher accuracy, better stability and stronger robustness in assessing the health of mechanical hard drives.
[0245] Furthermore, through the above hard disk drive (HDD) fault warning results and performance comparisons with the two methods, it can be found that the method of the present invention, by modeling the degradation degree of the HDD and comprehensively considering degradation degree indicators and SMART monitoring data for HDD fault warning, effectively reduces the problems of missed and false alarms, effectively improves the accuracy of HDD fault warning, and achieves superior warning performance.
[0246] To achieve the above objectives, such as Figure 5 As shown, the present invention also provides a terminal, including at least one processor 601; and a memory 602 communicatively connected to the at least one processor; wherein the memory 602 stores instructions executable by the at least one processor 601, the instructions being executed by the at least one processor 601 to enable the at least one processor 601 to execute the above-described method for constructing a mechanical hard disk fault diagnosis model, or the above-described method for diagnosing mechanical hard disk faults.
[0247] The memory 602 and processor 601 are connected via a bus, which may include any number of interconnecting buses and bridges. The bus connects various circuits of one or more processors 601 and memory 602 together. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 601 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 601.
[0248] Processor 601 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 602 can be used to store data used by processor 601 during operation.
[0249] To achieve the above objectives, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for constructing a mechanical hard disk fault diagnosis model or the above-described method for diagnosing mechanical hard disk faults.
[0250] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0251] Obviously, the embodiments described above are merely some, not all, embodiments of the present invention. Based on the embodiments of the present invention, those skilled in the art can make other variations or modifications without creative effort, and all such variations should fall within the scope of protection of the present invention.
Claims
1. A method for constructing a fault diagnosis model for a mechanical hard disk, characterized in that, include: Obtain sample data of the entire lifespan of the mechanical hard drive; Based on the sample data and the preset degradation assessment model, the degradation assessment model is trained, wherein the preset degradation assessment model takes the sample data as input and the degradation degree data of the hard disk as the expected output. Based on the sample data and the degradation data of the hard disk drive, the first data is formed; The fault warning model is trained based on the first data and a preset fault warning model based on an ensemble tree model, wherein the first data is the input and the fault warning data is the output. Prior to the step of training the degradation assessment model based on the sample data and the preset degradation assessment model, the construction method further includes: A degradation assessment model based on an ensemble tree model is established, and the degradation assessment model is as follows: ;(1) in, A set of regression trees; K represents the number of regression trees; This represents the input-output function relationship of a regression tree; This represents the structure of each tree, which will contain samples. Map to the leaf node corresponding to the prediction result; Indicates the first The values of the leaf nodes; This represents the number of tree nodes in the regression tree.
2. The method for constructing a mechanical hard disk fault diagnosis model as described in claim 1, characterized in that, Following the step of establishing a degradation assessment model based on an ensemble tree model, the construction method further includes: A first objective function is established to limit overfitting and model complexity. The first objective function is as follows: ;(2) in, This is a model complexity penalty term used to smooth the weights learned by the model, prevent overfitting, and limit the total number of leaf nodes. and This represents the hyperparameter used to control the intensity of the penalty. This represents the value of the j-th leaf node; It is a differentiable loss function used to measure the predicted values and degradation data. Differences; An asymmetric loss function is established, as follows: ;(3)。 3. The method for constructing a mechanical hard disk fault diagnosis model as described in claim 2, characterized in that, The step of training the degradation assessment model based on the sample data and the preset degradation assessment model includes: Using the forward distribution algorithm, based on the sample data and the preset degradation assessment model, K iterations are performed. Each iteration learns a regression tree model, and the k-th iteration is used to learn the k-th regression tree. Furthermore, the first k-1 regression trees are not adjusted, and the kth regression tree is trained.
4. The method for constructing a mechanical hard disk fault diagnosis model as described in claim 3, characterized in that, The step of training the degradation assessment model based on the sample data and the preset degradation assessment model includes: The first objective function is simplified to: ;(4) in, , ; , These represent the first and second gradient statistics of the loss function, respectively; The objective of solving the regression tree is rewritten as: ;(5) in, This represents the optimal value of leaf node j; loss function The minimum value is: ; Based on the sample data, the structure of the regression tree is determined using the maximum optimization algorithm, and a trained degradation assessment model is obtained.
5. The method for constructing a mechanical hard disk fault diagnosis model as described in claim 1, characterized in that, The step of training the fault warning model based on the first data and a preset fault warning model based on an ensemble tree model includes: For the fault warning data A in the first data i Gaussian upsampling is performed on data where the value is 1; The Gaussian-upsampled data is updated to the first data set to obtain the second data used to train the fault warning model; The second data is input into a preset fault warning model based on an ensemble tree model, and the fault warning model is trained. The fault warning model is as follows: ;(7) in, The set representing the regression trees; K represents the number of regression trees; This represents the input-output function relationship of a regression tree; This represents the structure of each tree, which will contain the second data. Map to the leaf node corresponding to the prediction result; Indicates the first The values of the leaf nodes; This represents the number of tree nodes in the regression tree; This is fault warning data.
6. The method for constructing a mechanical hard disk fault diagnosis model as described in claim 5, characterized in that, Before the step of inputting the second data into a preset fault early warning model based on an ensemble tree model and training the fault early warning model, the construction method further includes: A second objective function is established to limit overfitting and model complexity. The second objective function is as follows: ;(7) in, This is a model complexity penalty term used to smooth the weights learned by the model, prevent overfitting, and limit the total number of leaf nodes. and This represents the hyperparameter used to control the intensity of the penalty. This represents the value of the j-th leaf node; It is a differentiable loss function used to measure predicted values and fault warning data. Differences; The logarithmic loss function is defined as follows: ;(8) in, This is fault warning data.
7. A method for diagnosing mechanical hard disk faults, characterized in that, include: Obtain the current operating status data of the hard disk drive; The operating status data is input into the trained degradation assessment model to obtain degradation degree data, wherein the degradation assessment model is established in the construction method of the mechanical hard disk fault diagnosis model according to any one of claims 1 to 6; The second data is obtained based on the operating status data and the degradation degree data; The second data is input into the trained fault warning model to obtain the fault warning result of the hard disk drive, wherein the fault warning model is established in the construction method of the hard disk drive fault diagnosis model according to any one of claims 1 to 6.
8. A terminal, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method for constructing a hard disk fault diagnosis model as described in any one of claims 1 to 6, or the method for diagnosing hard disk faults as described in claim 7.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for constructing a mechanical hard disk fault diagnosis model as described in any one of claims 1 to 6, or the method for diagnosing mechanical hard disk faults as described in claim 7.
Citation Information
Patent Citations
Enterprise-level solid state disk fault early warning method based on multi-instance adversarial learning
CN115658401A