Fault cluster recovery time prediction method, device, equipment and storage medium
By performing feature dimensionality reduction and multivariate linear regression modeling on historical fault cluster data, a fault recovery time prediction model is established, which solves the problem of low accuracy prediction of fault cluster recovery time in the existing technology, and achieves more accurate recovery time prediction.
Patent Information
- Application Number
- CN202210424662.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-04-22
AI Technical Summary
The existing fault cluster recovery time prediction method has low accuracy and is difficult to accurately predict the recovery time of different clusters, mainly due to insufficient analysis of a single fault cause.
By obtaining the status parameters, fault causes and recovery time information of the historical fault cluster, a feature dimensionality reduction process is performed, a multivariate linear regression model is established, a fault recovery time prediction model is generated, and the main feature component information is used for prediction.
It improves the accuracy of prediction of recovery time of fault clusters, can analyze influencing factors in multiple dimensions, and provides more accurate prediction results for recovery time.
Smart Images

Figure CN114840357B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of linear regression technology, and in particular to a method, device, equipment and storage medium for predicting the recovery time of a fault cluster. Background Art
[0002] With the development of Internet technology, more and more tasks are executed through distributed cluster systems. Since clusters often undertake heavy tasks, if a failure occurs, the impact is wide-ranging and difficult to recover. The recovery time of the cluster is an important reference factor for cluster failure response decision-making. Accurately predicting the recovery time has far-reaching significance.
[0003] Existing recovery time prediction methods are usually obtained by simply analyzing the cause of the failure. However, due to the wide variety of configurations of different clusters, a single failure cause analysis is difficult to accurately predict the recovery time of the cluster. The existing technology has a technical problem of low accuracy in predicting the recovery time of a faulty cluster. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for predicting the recovery time of a fault cluster, which are used to improve the accuracy of predicting the recovery time of a fault cluster.
[0005] A first aspect of the present invention provides a method for predicting the recovery time of a fault cluster, comprising:
[0006] Acquire historical fault cluster recovery data, wherein the historical fault cluster recovery data includes historical status parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters;
[0007] Performing feature dimension reduction processing on the historical state parameters, the historical fault causes and the historical recovery duration information to obtain main feature component information;
[0008] A multivariate linear regression model is constructed using the main feature component information to generate a fault recovery time prediction model;
[0009] When receiving a cluster fault recovery time prediction request, obtaining target state parameters and target fault causes of a target fault cluster through the cluster fault recovery time prediction request;
[0010] The target state parameter and the target fault cause are predicted for the recovery time by using the fault recovery time prediction model to obtain target recovery time information of the target fault cluster.
[0011] Optionally, in a first implementation of the first aspect of the present invention, the acquiring of historical fault cluster recovery data, wherein the historical fault cluster recovery data includes historical status parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters, includes:
[0012] Obtain the status parameters and fault causes reported by multiple historical fault clusters at the time of fault occurrence, and obtain the historical status parameters and historical fault causes of each historical fault cluster;
[0013] Obtaining the fault recovery time of each historical fault cluster, and determining the historical recovery duration information of each historical fault cluster through the fault occurrence time and the fault recovery time of each historical fault cluster;
[0014] The historical status parameters, historical fault causes and recovery duration information of each historical fault cluster are combined to obtain the historical fault cluster recovery data.
[0015] Optionally, in a second implementation of the first aspect of the present invention, the performing feature dimensionality reduction processing on the historical state parameters, the historical fault causes, and the historical recovery duration information to obtain main feature component information includes:
[0016] Mapping the historical state parameters, the historical fault causes and the historical recovery duration information to a multidimensional feature space to obtain a plurality of feature space matrices, each feature space matrix being used to indicate a corresponding relationship between the historical recovery duration and the historical state parameters based on the historical fault causes;
[0017] Normalize each feature space matrix to obtain a scalar feature vector corresponding to each feature space matrix;
[0018] The principal characteristic component information is obtained by extracting the principal characteristic component of the scalar characteristic vector corresponding to each characteristic space matrix through a preset principal component analysis algorithm.
[0019] Optionally, in a third implementation of the first aspect of the present invention, performing multivariate linear regression modeling through the main feature component information and generating a fault recovery time prediction model includes:
[0020] An original linear regression model is constructed based on a preset machine learning framework, and a multivariate linear fitting is performed on the original linear regression model through the main feature component information to obtain a fitting result;
[0021] The residual sum of squares is calculated for the fitting result by using a preset loss function to obtain a target residual sum of squares, and a fault recovery time prediction model is determined by using the target residual sum of squares.
[0022] Optionally, in a fourth implementation manner of the first aspect of the present invention, when a cluster fault recovery time prediction request is received, obtaining a target state parameter and a target fault cause of a target fault cluster through the cluster fault recovery time prediction request includes:
[0023] Calling a scheduled scanning task, and receiving a cluster fault recovery duration prediction request through the scheduled scanning task, wherein the scheduled scanning task is used to scan the fault status of all clusters according to a preset period;
[0024] The state parameters of the target fault cluster are pulled through the cluster fault recovery time prediction request, and the fault cause of the target fault cluster is read to obtain the target state parameters and the target fault cause.
[0025] Optionally, in a fifth implementation manner of the first aspect of the present invention, the pulling of the state parameters of the target fault cluster through the cluster fault recovery time prediction request, and reading the fault cause of the target fault cluster to obtain the target state parameters and the target fault cause include:
[0026] Pulling the state parameters of the target fault cluster through the cluster fault recovery time prediction request to obtain the target state parameters;
[0027] Extracting the operating state parameters from the target state parameters, and comparing the operating state parameters with preset standard operating state parameters to obtain abnormal operating parameters, wherein the abnormal operating parameters include hardware abnormal parameters and software abnormal parameters;
[0028] The fault cause of the target fault cluster is identified by using the abnormal operation parameters to obtain the target fault cause.
[0029] Optionally, in a sixth implementation of the first aspect of the present invention, the predicting the recovery time of the target state parameter and the target fault cause by using the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster includes:
[0030] Normalizing the target state parameter and the target fault cause to obtain scalar information to be predicted;
[0031] The fault recovery time prediction model is used to predict the recovery time of the scalar information to be predicted, so as to obtain target recovery time information of the target fault cluster.
[0032] A second aspect of the present invention provides a device for predicting the recovery time of a fault cluster, comprising:
[0033] An acquisition module is used to acquire historical fault cluster recovery data, wherein the historical fault cluster recovery data includes historical state parameters, historical fault causes and historical recovery duration information of multiple historical fault clusters;
[0034] A dimension reduction module is used to perform feature dimension reduction processing on the historical state parameters, the historical fault causes and the historical recovery time information to obtain main feature component information;
[0035] A modeling module, used to perform multivariate linear regression modeling based on the main feature component information and generate a fault recovery time prediction model;
[0036] A receiving module, configured to, when receiving a cluster fault recovery time prediction request, obtain a target state parameter and a target fault cause of a target fault cluster through the cluster fault recovery time prediction request;
[0037] The prediction module is used to predict the recovery time of the target state parameter and the target fault cause through the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster.
[0038] Optionally, in a first implementation of the second aspect of the present invention, the acquisition module is specifically used to:
[0039] Obtain the status parameters and fault causes reported by multiple historical fault clusters at the time of fault occurrence, and obtain the historical status parameters and historical fault causes of each historical fault cluster;
[0040] Obtaining the fault recovery time of each historical fault cluster, and determining the historical recovery duration information of each historical fault cluster through the fault occurrence time and the fault recovery time of each historical fault cluster;
[0041] The historical status parameters, historical fault causes and recovery duration information of each historical fault cluster are combined to obtain the historical fault cluster recovery data.
[0042] Optionally, in a second implementation of the second aspect of the present invention, the dimension reduction module is specifically used to:
[0043] Mapping the historical state parameters, the historical fault causes and the historical recovery duration information to a multidimensional feature space to obtain a plurality of feature space matrices, each feature space matrix being used to indicate a corresponding relationship between the historical recovery duration and the historical state parameters based on the historical fault causes;
[0044] Normalize each feature space matrix to obtain a scalar feature vector corresponding to each feature space matrix;
[0045] The principal characteristic component information is obtained by extracting the principal characteristic component of the scalar characteristic vector corresponding to each characteristic space matrix through a preset principal component analysis algorithm.
[0046] Optionally, in a third implementation of the second aspect of the present invention, the modeling module is specifically used to:
[0047] An original linear regression model is constructed based on a preset machine learning framework, and a multivariate linear fitting is performed on the original linear regression model through the main feature component information to obtain a fitting result;
[0048] The residual sum of squares is calculated for the fitting result by using a preset loss function to obtain a target residual sum of squares, and a fault recovery time prediction model is determined by using the target residual sum of squares.
[0049] Optionally, in a fourth implementation of the second aspect of the present invention, the receiving module includes:
[0050] A calling unit, used to call a scheduled scanning task and receive a cluster fault recovery duration prediction request through the scheduled scanning task, wherein the scheduled scanning task is used to scan the fault status of all clusters according to a preset period;
[0051] The reading unit is used to pull the state parameters of the target fault cluster through the cluster fault recovery time prediction request, and read the fault cause of the target fault cluster to obtain the target state parameters and the target fault cause.
[0052] Optionally, in a fifth implementation of the second aspect of the present invention, the reading unit is specifically configured to:
[0053] Pulling the state parameters of the target fault cluster through the cluster fault recovery time prediction request to obtain the target state parameters;
[0054] Extracting the operating state parameters from the target state parameters, and comparing the operating state parameters with preset standard operating state parameters to obtain abnormal operating parameters, wherein the abnormal operating parameters include hardware abnormal parameters and software abnormal parameters;
[0055] The fault cause of the target fault cluster is identified by using the abnormal operation parameters to obtain the target fault cause.
[0056] Optionally, in a sixth implementation of the second aspect of the present invention, the prediction module is specifically used to:
[0057] Normalizing the target state parameter and the target fault cause to obtain scalar information to be predicted;
[0058] The fault recovery time prediction model is used to predict the recovery time of the scalar information to be predicted, so as to obtain target recovery time information of the target fault cluster.
[0059] The third aspect of the present invention provides a recovery time prediction device for a fault cluster, comprising: a memory and at least one processor, wherein the memory stores a computer program; the at least one processor calls the computer program in the memory so that the recovery time prediction device for the fault cluster executes the above-mentioned recovery time prediction method for the fault cluster.
[0060] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the above-mentioned method for predicting the recovery time of a fault cluster.
[0061] In the technical solution provided by the present invention, historical fault cluster recovery data is obtained, and the historical fault cluster recovery data includes historical state parameters, historical fault causes and historical recovery time information of multiple historical fault clusters; feature dimension reduction processing is performed on the historical state parameters, historical fault causes and historical recovery time information to obtain main feature component information; multivariate linear regression model building is performed through the main feature component information, and a fault recovery time prediction model is generated; when a cluster fault recovery time prediction request is received, target state parameters and target fault causes of the target fault cluster are obtained through the cluster fault recovery time prediction request; recovery time prediction is performed on the target state parameters and target fault causes through the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster. In an embodiment of the present invention, in order to analyze the impact of different variables on the cluster fault recovery time in a multi-dimensional manner, historical state parameters, historical fault causes and historical recovery time information of multiple historical fault clusters are obtained, and each variable in the historical state parameters and historical fault causes is used as a feature to extract the main feature component, thereby obtaining the main feature component information after dimensionality reduction, and then based on the main feature component information, a multivariate linear regression model is established to fit a fault recovery time prediction function, i.e., a fault recovery time prediction model. When a cluster fault recovery time prediction request is received, the recovery time is calculated for the target state parameters and the target fault causes through the fault recovery time prediction model, thereby obtaining the target recovery time information of the target fault cluster. The present invention can improve the accuracy of the fault cluster recovery time prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of an embodiment of a method for predicting the recovery time of a fault cluster in an embodiment of the present invention;
[0063] Figure 2It is a schematic diagram of another embodiment of the method for predicting the recovery time of a fault cluster in an embodiment of the present invention;
[0064] Figure 3 A schematic diagram of an embodiment of a device for predicting the recovery time of a fault cluster in an embodiment of the present invention;
[0065] Figure 4 It is a schematic diagram of another embodiment of a device for predicting the recovery time of a fault cluster in an embodiment of the present invention;
[0066] Figure 5 The figure is a schematic diagram of an embodiment of a device for predicting the recovery time of a fault cluster in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] The embodiments of the present invention provide a method, device, equipment and storage medium for predicting the recovery time of a faulty cluster, which are used to improve the accuracy of predicting the recovery time of a faulty cluster.
[0068] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "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 that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0069] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, 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 obtain the best results.
[0070] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0071] 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, etc. 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, etc. 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 through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0072] It is understandable that the execution subject of the present invention can be a recovery time prediction device for a fault cluster, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as an execution subject as an example. The server can be an independent server, or it can be 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, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0073] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of a method for predicting the recovery time of a fault cluster in an embodiment of the present invention includes:
[0074] 101. Obtain historical fault cluster recovery data, where the historical fault cluster recovery data includes historical status parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters;
[0075] It should be noted that the historical fault cluster recovery data is used to indicate the configuration information and fault recovery information of multiple historical fault clusters, including the historical status parameters, historical fault causes and historical recovery duration information of each historical fault cluster, wherein the historical fault cluster may be a cluster in the same distributed cluster system, a cluster in different distributed cluster systems, or a cluster in a non-distributed cluster system, so that the historical fault cluster recovery data can widely collect historical fault recovery information of different clusters for recovery duration analysis, thereby improving the accuracy of fault cluster recovery duration prediction.
[0076] It is understandable that the historical fault cluster is used to indicate a cluster that has failed earlier than the current moment and has been restored. Therefore, multiple historical fault clusters may be the same cluster that has failed and recovered at different moments, or different clusters that have failed and recovered at the same or different moments, which is not limited here. The historical status parameters of each historical fault cluster are used to indicate the cluster status information of the historical fault cluster at the time of the failure, including but not limited to the system version information of the cluster, the number of nodes, the node configuration parameters, the total data volume, the write speed, the number of threads, the network status parameters, the disk status parameters, the node load and other cluster-level and node-level operating status parameters and configuration status parameters. The historical fault cluster recovery data also includes the historical fault cause and historical recovery time information of each historical fault cluster, wherein the historical recovery time is used to indicate the time interval between the time when the historical fault node fails and the time when the fault is restored, and the historical fault cause is used to indicate the cause of the failure of the historical fault cluster, for example, the network failure cause, the disk failure cause, the node failure cause, etc.
[0077] 102. Perform feature dimension reduction processing on historical state parameters, historical fault causes, and historical recovery duration information to obtain main feature component information;
[0078] It should be noted that in order to observe the relevant factors of cluster recovery time from a large number of different variable dimensions, the correlation analysis of cluster recovery time is enriched by including historical state parameters and historical fault causes of a large number of different variables, so that the prediction of cluster recovery time is more accurate. There may be correlation between these variables. Therefore, in order to avoid the one-sidedness of the results caused by single variable analysis and reduce the information loss in the process of finding related variables, in one embodiment, the historical state parameters, historical fault causes and historical recovery time information are subjected to feature dimensionality reduction processing by a preset feature dimensionality reduction algorithm to obtain the main feature component information, wherein the preset feature dimensionality reduction algorithm includes a singular value decomposition (SVD) decomposition algorithm, a factor analysis (FA) algorithm, an independent component analysis (ICCA) algorithm and a principal component analysis (PCA) algorithm. Any one of the PCA (Problem Analysis, Principal Component Analysis) algorithms can convert closely related variables into new variables through the feature dimension reduction algorithm, and obtain new variables with fewer independent correlations, thereby reducing the dimension of the variables and retaining as few main feature components as possible for subsequent feature analysis and recovery time prediction, thereby improving the efficiency and accuracy of the correlation analysis of the fault recovery time.
[0079] In one implementation, since different combinations of state parameters may affect the recovery time of a cluster failure, a preset factor analysis algorithm is used to extract the main factors of historical state parameters, historical failure causes, and historical recovery time information to obtain the main factor information, and the main feature component information is determined by the main factor information. This implementation can determine the potential influencing factors of the cluster failure recovery time through the factor analysis algorithm, thereby improving the accuracy of the prediction of the failure cluster recovery time.
[0080] 103. A multivariate linear regression model is built based on the main feature component information, and a fault recovery time prediction model is generated;
[0081] It should be noted that the main feature component information is determined, that is, the variable combination in the historical state parameters that truly affects the recovery time of the fault cluster is determined, and then the main feature component information is subjected to multivariate linear regression fitting to generate a fault recovery time prediction model. In one embodiment, the fault recovery time prediction model is a multivariate linear regression function for calculating the fault recovery time, such as a binary linear regression function containing two unknown parameters, which is represented on the image as a three-dimensional spatial coordinate graph.
[0082] In one embodiment, the main feature component information is modeled by the least square function of a preset linear regression equation to obtain a multivariate linear regression model, and the loss of the multivariate linear regression model is minimized by dynamically adjusting the fitting coefficients in the multivariate linear regression model, thereby generating a fault recovery time prediction model. Furthermore, the loss between the observation point and the linear approximation prediction point in the multivariate linear regression model is calculated by the residual sum of squares, thereby improving the accuracy of the cluster recovery time prediction.
[0083] 104. When receiving a cluster fault recovery time prediction request, obtain a target state parameter and a target fault cause of a target fault cluster through the cluster fault recovery time prediction request;
[0084] In one embodiment, when a cluster fails, the target fault cluster that has failed automatically sends a cluster fault recovery time prediction request to the server. When the server receives the cluster fault recovery time prediction request, the target state parameters and target fault causes of the target fault cluster are collected through the identifier of the target fault cluster carried in the cluster fault recovery time prediction request. In another embodiment, when a cluster fails, the target fault cluster that has failed carries its own state parameters and fault causes, and automatically sends a cluster fault recovery time prediction request to the server. The server directly obtains the target state parameters and target fault causes of the target fault cluster through the cluster fault recovery time prediction request, thereby improving the efficiency of obtaining fault information, and further improving the efficiency of cluster recovery time prediction.
[0085] 105. The recovery time prediction model is used to predict the target state parameters and the target fault cause, and the target recovery time information of the target fault cluster is obtained.
[0086] In one embodiment, after obtaining the target state parameters and target fault causes of the target fault cluster, the target state parameters and target fault causes are input into a fault recovery time prediction model, so that the fault recovery time prediction model predicts the recovery time for the target state parameters and the target fault causes, and obtains the target recovery time information of the target fault cluster. Specifically, the server calculates the recovery time for the target state parameters and the target fault causes through the multivariate linear regression function in the fault recovery time prediction model, and obtains the target recovery time information of the target fault cluster.
[0087] Furthermore, the server stores the target recovery duration information in the blockchain database, which is not specifically limited here.
[0088] In an embodiment of the present invention, in order to analyze the impact of different variables on the cluster fault recovery time in a multi-dimensional manner, historical state parameters, historical fault causes and historical recovery time information of multiple historical fault clusters are obtained, and each variable in the historical state parameters and historical fault causes is used as a feature to extract the main feature component, thereby obtaining the main feature component information after dimensionality reduction, and then based on the main feature component information, a multivariate linear regression model is established to fit a fault recovery time prediction function, i.e., a fault recovery time prediction model. When a cluster fault recovery time prediction request is received, the recovery time is calculated for the target state parameters and the target fault causes through the fault recovery time prediction model, thereby obtaining the target recovery time information of the target fault cluster. The present invention can improve the accuracy of the fault cluster recovery time prediction.
[0089] See also Figure 2 Another embodiment of the method for predicting the recovery time of a fault cluster in the embodiment of the present invention includes:
[0090] 201. Obtain historical fault cluster recovery data, where the historical fault cluster recovery data includes historical status parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters;
[0091] Specifically, step 201 includes: obtaining the state parameters and fault causes reported by multiple historical fault clusters at the time of fault occurrence, and obtaining the historical state parameters and historical fault causes of each historical fault cluster; obtaining the fault recovery time of each historical fault cluster, and determining the historical recovery time information of each historical fault cluster through the fault occurrence time and the fault recovery time of each historical fault cluster; merging the historical state parameters, historical fault causes and recovery time information of each historical fault cluster to obtain the historical fault cluster recovery data. In this embodiment, when a cluster fails, the cluster reports the state parameters and fault causes at the time of fault occurrence through a preset fault reporting interface, so that the server obtains the historical state parameters and historical fault causes of each historical fault cluster, and when the cluster fault is recovered, the cluster reports the fault recovery time, so that the server determines the historical recovery time of each historical fault cluster according to the fault occurrence time and the fault recovery time. Finally, the server merges the historical state parameters, historical fault causes and recovery time information of each historical fault cluster to obtain the historical fault cluster recovery data. This implementation can accurately determine the recovery time consumed by historical failures that occurred in the cluster, making the correlation variable analysis of subsequent failure recovery time more accurate, thereby improving the accuracy of the prediction of the failure cluster recovery time.
[0092] 202. Mapping historical state parameters, historical fault causes, and historical recovery duration information to a multidimensional feature space to obtain a plurality of feature space matrices, each of which is used to indicate a corresponding relationship between historical fault causes, historical recovery durations, and historical state parameters;
[0093] In one embodiment, in order to perform feature dimensionality reduction on the recovery time, historical status parameters, historical fault causes, and historical recovery time information are first mapped to a multidimensional feature space to obtain multiple feature space matrices, wherein each feature space matrix can be used to indicate the correspondence between historical recovery time and historical status parameters based on historical fault causes, and can also be used to indicate the relationship between historical recovery time and historical fault causes and historical status parameters. The historical fault cause can be used as one of the variables affecting the recovery time and used for multidimensional variable feature analysis of the fault recovery time.
[0094] 203. Normalize each feature space matrix to obtain a scalar feature vector corresponding to each feature space matrix;
[0095] It should be noted that due to the large differences in data of different historical state parameters and historical fault causes, directly processing data through these data is likely to reduce data processing efficiency. Therefore, the historical state parameters, historical fault causes and fault recovery time in each feature space matrix are normalized to obtain the scalar feature vectors corresponding to each feature space matrix after normalization. Normalization is a way to simplify calculations, that is, to transform dimensioned values into dimensionless values to become scalars. For example, the parameters in each feature space matrix are transformed into the interval [0,1] to simplify calculations and reduce the values, so that the absolute value variables are converted into relative value variables, which improves the prediction efficiency of the fault recovery time.
[0096] 204. Extracting principal characteristic components from the scalar characteristic vectors corresponding to each characteristic space matrix by using a preset principal component analysis algorithm to obtain principal characteristic component information;
[0097] In this embodiment, the principal component analysis algorithm is used to extract the principal characteristic components of the scalar eigenvectors corresponding to each feature space matrix to obtain the principal characteristic component information. Specifically, the covariance matrix of each feature space matrix is solved by the principal component analysis algorithm to obtain multiple eigenvectors and eigenvalues corresponding to each eigenvector, each eigenvector is used to indicate a feature combination, and the eigenvalue corresponding to each eigenvector is used to indicate the correlation of each feature in the feature combination, and then the eigenvalues corresponding to each eigenvector are sorted to obtain the ranking of each eigenvector, and then the target eigenvector is determined according to the ranking of each eigenvector, for example, the top 3 eigenvectors are determined as the target eigenvector. Finally, each feature space matrix is converted to the spatial dimension of the target eigenvector to obtain the principal characteristic component information. This embodiment can accurately calculate the influence of different state parameters and fault causes on the fault recovery time based on the principal component analysis method, thereby improving the efficiency of fault recovery time prediction.
[0098] 205. A multivariate linear regression model is constructed based on the main feature component information, and a fault recovery time prediction model is generated;
[0099] Specifically, step 205 includes: constructing an original linear regression model based on a preset machine learning framework, performing multivariate linear fitting on the original linear regression model through the main feature component information to obtain a fitting result; calculating the residual sum of squares on the fitting result through a preset loss function to obtain a target residual sum of squares, and determining a fault recovery time prediction model through the target residual sum of squares. It should be noted that the linear regression model is one of the machine learning models, and an original linear regression model can be quickly constructed based on a preset machine learning framework, such as the sklearn machine learning framework, the Caffe machine learning framework, etc. After obtaining the original linear regression model, the original linear regression model is subjected to multivariate linear fitting through the main feature component information to obtain the fitting result. The purpose of fitting is to obtain a straight line with the minimum loss. The residual sum of squares is calculated for the fitting result through the preset loss function to obtain the target residual sum of squares, and it is determined whether the target residual sum of squares is less than the preset residual threshold. If the target residual sum of squares is greater than or equal to the preset residual threshold, the parameters in the original linear regression model are adjusted, and the steps of performing multivariate linear fitting on the original linear regression model through the main feature component information to obtain the fitting result are repeated until the target residual sum of squares is less than the preset residual threshold, and a fault recovery time prediction model is generated. This embodiment can learn a fault recovery time prediction model through linear regression to predict the real value of the fault recovery time as accurately as possible, thereby improving the accuracy of the fault recovery time prediction.
[0100] 206. When receiving the cluster fault recovery time prediction request, obtain the target state parameter and target fault cause of the target fault cluster through the cluster fault recovery time prediction request;
[0101] Specifically, step 206 includes: calling a scheduled scanning task, and receiving a cluster fault recovery time prediction request through the scheduled scanning task, the scheduled scanning task is used to scan the fault status of all clusters according to a preset period; pulling the state parameters of the target fault cluster through the cluster fault recovery time prediction request, and reading the fault cause of the target fault cluster to obtain the target state parameters and the target fault cause. In this embodiment, the scheduled scanning task is used to scan the fault status of the cluster regularly or according to a preset period, by calling the scheduled scanning task, receiving the cluster fault recovery time prediction request of the target fault cluster where the fault occurs, and then pulling the state parameters of the target fault cluster at the time of the fault occurrence, and reading the fault cause reported by the fault cause reporting interface, to obtain the target state parameters and the target fault cause of the target fault cluster.
[0102] Further, the state parameters of the target fault cluster are pulled through the cluster fault recovery time prediction request, and the fault cause of the target fault cluster is read to obtain the target state parameters and the target fault cause, including: pulling the state parameters of the target fault cluster through the cluster fault recovery time prediction request to obtain the target state parameters; extracting the operating state parameters in the target state parameters, and comparing the operating state parameters with the preset standard operating state parameters to obtain abnormal operating parameters, the abnormal operating parameters include hardware abnormal parameters and software abnormal parameters; identifying the fault cause of the target fault cluster through the abnormal operating parameters to obtain the target fault cause. In this embodiment, in order to more efficiently output the fault recovery time estimation data, after obtaining the target state parameters of the target fault cluster, the operating state parameters in the target state parameters are compared with the preset standard operating parameters to obtain abnormal operating parameters, and then the fault cause of the target fault cluster is identified through the abnormal operating parameters, thereby determining the target fault cause of the target fault cluster, wherein the abnormal operating parameters include hardware abnormal parameters and software abnormal parameters. For example, assuming that the abnormal operation parameters include network abnormal parameters, then the target fault cause can be "network fault cause". Assuming that the abnormal operation parameters include cluster master node disconnection, then the target fault cause can be "cluster master node failure". The specific details are not limited here.
[0103] 207. The recovery time prediction model is used to predict the target state parameters and the target fault cause, and the target recovery time information of the target fault cluster is obtained.
[0104] Specifically, step 207 includes: normalizing the target state parameters and the target fault causes to obtain scalar information to be predicted; predicting the recovery time of the scalar information to be predicted through the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster. In this embodiment, in order to improve the prediction efficiency of the fault recovery time, the target state parameters and the target fault causes are normalized according to the data input standard of the fault recovery time prediction model to obtain scalar data to be predicted, such as transforming the target state parameters and the target fault causes to the interval of [0,1], and then inputting the scalar data to be predicted into the fault recovery time prediction model to predict the recovery time to obtain the target recovery time information of the target fault cluster.
[0105] In an embodiment of the present invention, in order to analyze the impact of different variables on the cluster fault recovery time in a multi-dimensional manner, historical state parameters, historical fault causes and historical recovery time information of multiple historical fault clusters are obtained, and each variable in the historical state parameters and historical fault causes is used as a feature to generate multiple feature space matrices, and main feature components are extracted for each feature space matrix to obtain the main feature component information after dimensionality reduction, and then a multivariate linear regression model is established based on the main feature component information to fit a fault recovery time prediction function, i.e., a fault recovery time prediction model. When a cluster fault recovery time prediction request is received, the recovery time is calculated for the target state parameters and the target fault causes through the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster. The present invention can improve the accuracy of fault cluster recovery time prediction.
[0106] The above describes the method for predicting the recovery time of a fault cluster in an embodiment of the present invention. The following describes the device for predicting the recovery time of a fault cluster in an embodiment of the present invention. Figure 3 , an embodiment of a device for predicting the recovery time of a fault cluster in an embodiment of the present invention includes:
[0107] An acquisition module 301 is used to acquire historical fault cluster recovery data, where the historical fault cluster recovery data includes historical state parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters;
[0108] A dimension reduction module 302 is used to perform feature dimension reduction processing on the historical state parameters, the historical fault causes and the historical recovery time information to obtain main feature component information;
[0109] A modeling module 303 is used to perform multivariate linear regression modeling based on the main feature component information and generate a fault recovery time prediction model;
[0110] The receiving module 304 is configured to, when receiving a cluster fault recovery time prediction request, obtain a target state parameter and a target fault cause of a target fault cluster through the cluster fault recovery time prediction request;
[0111] The prediction module 305 is used to predict the recovery time of the target state parameter and the target fault cause by using the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster.
[0112] Furthermore, the target recovery time information is stored in the blockchain database, which is not specifically limited here.
[0113] In an embodiment of the present invention, in order to analyze the impact of different variables on the cluster fault recovery time in a multi-dimensional manner, historical state parameters, historical fault causes and historical recovery time information of multiple historical fault clusters are obtained, and each variable in the historical state parameters and historical fault causes is used as a feature to extract the main feature component, thereby obtaining the main feature component information after dimensionality reduction, and then based on the main feature component information, a multivariate linear regression model is established to fit a fault recovery time prediction function, i.e., a fault recovery time prediction model. When a cluster fault recovery time prediction request is received, the recovery time is calculated for the target state parameters and the target fault causes through the fault recovery time prediction model, thereby obtaining the target recovery time information of the target fault cluster. The present invention can improve the accuracy of the fault cluster recovery time prediction.
[0114] See also Figure 4 Another embodiment of the device for predicting the recovery time of a fault cluster in the embodiment of the present invention includes:
[0115] An acquisition module 301 is used to acquire historical fault cluster recovery data, where the historical fault cluster recovery data includes historical state parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters;
[0116] A dimension reduction module 302 is used to perform feature dimension reduction processing on the historical state parameters, the historical fault causes and the historical recovery time information to obtain main feature component information;
[0117] A modeling module 303 is used to perform multivariate linear regression modeling based on the main feature component information and generate a fault recovery time prediction model;
[0118] The receiving module 304 is configured to, when receiving a cluster fault recovery time prediction request, obtain a target state parameter and a target fault cause of a target fault cluster through the cluster fault recovery time prediction request;
[0119] The prediction module 305 is used to predict the recovery time of the target state parameter and the target fault cause by using the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster.
[0120] Optionally, the acquisition module 301 is specifically used for:
[0121] Obtain the status parameters and fault causes reported by multiple historical fault clusters at the time of fault occurrence, and obtain the historical status parameters and historical fault causes of each historical fault cluster;
[0122] Obtaining the fault recovery time of each historical fault cluster, and determining the historical recovery duration information of each historical fault cluster through the fault occurrence time and the fault recovery time of each historical fault cluster;
[0123] The historical status parameters, historical fault causes and recovery duration information of each historical fault cluster are combined to obtain the historical fault cluster recovery data.
[0124] Optionally, the dimension reduction module 302 is specifically used for:
[0125] Mapping the historical state parameters, the historical fault causes and the historical recovery duration information to a multidimensional feature space to obtain a plurality of feature space matrices, each feature space matrix being used to indicate a corresponding relationship between the historical recovery duration and the historical state parameters based on the historical fault causes;
[0126] Normalize each feature space matrix to obtain a scalar feature vector corresponding to each feature space matrix;
[0127] The principal characteristic component information is obtained by extracting the principal characteristic component of the scalar characteristic vector corresponding to each characteristic space matrix through a preset principal component analysis algorithm.
[0128] Optionally, the modeling module 303 is specifically used for:
[0129] An original linear regression model is constructed based on a preset machine learning framework, and a multivariate linear fitting is performed on the original linear regression model through the main feature component information to obtain a fitting result;
[0130] The residual sum of squares is calculated for the fitting result by using a preset loss function to obtain a target residual sum of squares, and a fault recovery time prediction model is determined by using the target residual sum of squares.
[0131] Optionally, the receiving module 304 includes:
[0132] The calling unit 3041 is used to call a scheduled scanning task and receive a cluster fault recovery duration prediction request through the scheduled scanning task, wherein the scheduled scanning task is used to scan the fault status of all clusters according to a preset period;
[0133] The reading unit 3042 is used to pull the state parameters of the target fault cluster through the cluster fault recovery time prediction request, and read the fault cause of the target fault cluster to obtain the target state parameters and the target fault cause.
[0134] Optionally, the reading unit 3042 is specifically used for:
[0135] Pulling the state parameters of the target fault cluster through the cluster fault recovery time prediction request to obtain the target state parameters;
[0136] Extracting the operating state parameters from the target state parameters, and comparing the operating state parameters with preset standard operating state parameters to obtain abnormal operating parameters, wherein the abnormal operating parameters include hardware abnormal parameters and software abnormal parameters;
[0137] The fault cause of the target fault cluster is identified by using the abnormal operation parameters to obtain the target fault cause.
[0138] Optionally, the prediction module 305 is specifically used for:
[0139] Normalizing the target state parameter and the target fault cause to obtain scalar information to be predicted;
[0140] The fault recovery time prediction model is used to predict the recovery time of the scalar information to be predicted, so as to obtain target recovery time information of the target fault cluster.
[0141] In an embodiment of the present invention, in order to analyze the impact of different variables on the cluster fault recovery time in a multi-dimensional manner, historical state parameters, historical fault causes and historical recovery time information of multiple historical fault clusters are obtained, and each variable in the historical state parameters and historical fault causes is used as a feature to generate multiple feature space matrices, and main feature components are extracted for each feature space matrix to obtain the main feature component information after dimensionality reduction, and then a multivariate linear regression model is established based on the main feature component information to fit a fault recovery time prediction function, i.e., a fault recovery time prediction model. When a cluster fault recovery time prediction request is received, the recovery time is calculated for the target state parameters and the target fault causes through the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster. The present invention can improve the accuracy of fault cluster recovery time prediction.
[0142] above Figure 3 and Figure 4 The apparatus for predicting the recovery time of a fault cluster in an embodiment of the present invention is described in detail from the perspective of modular functional entities. The following describes in detail the apparatus for predicting the recovery time of a fault cluster in an embodiment of the present invention from the perspective of hardware processing.
[0143] Figure 51 is a schematic diagram of the structure of a device for predicting the recovery time of a fault cluster provided by an embodiment of the present invention. The device 500 for predicting the recovery time of a fault cluster may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more massive storage devices) storing application programs 533 or data 532. Among them, the memory 520 and the storage medium 530 may be short-term storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of computer program operations in the device 500 for predicting the recovery time of a fault cluster. Furthermore, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of computer program operations in the storage medium 530 on the device 500 for predicting the recovery time of a fault cluster.
[0144] The fault cluster recovery time prediction device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 5 The structure of the device for predicting the recovery time of a fault cluster shown does not constitute a limitation on the device for predicting the recovery time of a fault cluster, and may include more or less components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0145] The present invention also provides a computer device, which includes a memory and a processor, wherein a computer-readable computer program is stored in the memory, and when the computer-readable computer program is executed by the processor, the processor executes the steps of the method for predicting the recovery time of a fault cluster in the above-mentioned embodiments.
[0146] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program runs on a computer, the computer executes the steps of the method for predicting the recovery time of a fault cluster.
[0147] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0148] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0150] 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 invention is essentially 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. The computer software product is stored in a storage medium, including several computer programs to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0151] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the recovery time of a faulty cluster, characterized in that: The method for predicting the recovery time of a fault cluster includes: Acquire historical fault cluster recovery data, wherein the historical fault cluster recovery data includes historical status parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters; Performing feature dimension reduction processing on the historical state parameters, the historical fault causes and the historical recovery duration information to obtain main feature component information; A multivariate linear regression model is constructed using the main feature component information to generate a fault recovery time prediction model; When receiving a cluster fault recovery time prediction request, obtaining a target state parameter and a target fault cause of a target fault cluster through the cluster fault recovery time prediction request; The target state parameter and the target fault cause are predicted for the recovery time by using the fault recovery time prediction model to obtain target recovery time information of the target fault cluster.
2. The method for predicting the recovery time of a fault cluster according to claim 1, characterized in that: The obtaining of historical fault cluster recovery data, wherein the historical fault cluster recovery data includes historical status parameters, historical fault causes, and historical recovery duration information of multiple historical fault clusters, includes: Obtain the status parameters and fault causes reported by multiple historical fault clusters at the time of fault occurrence, and obtain the historical status parameters and historical fault causes of each historical fault cluster; Obtaining the fault recovery time of each historical fault cluster, and determining the historical recovery duration information of each historical fault cluster through the fault occurrence time and the fault recovery time of each historical fault cluster; The historical status parameters, historical fault causes and recovery duration information of each historical fault cluster are combined to obtain the historical fault cluster recovery data.
3. The method for predicting the recovery time of a fault cluster according to claim 1, characterized in that: The performing feature dimension reduction processing on the historical state parameters, the historical fault causes and the historical recovery duration information to obtain main feature component information includes: Mapping the historical state parameters, the historical fault causes and the historical recovery duration information to a multidimensional feature space to obtain a plurality of feature space matrices, each feature space matrix being used to indicate a corresponding relationship between the historical recovery duration and the historical state parameters based on the historical fault causes; Normalize each feature space matrix to obtain a scalar feature vector corresponding to each feature space matrix; The principal characteristic component information is obtained by extracting the principal characteristic component of the scalar characteristic vector corresponding to each characteristic space matrix through a preset principal component analysis algorithm.
4. The method for predicting the recovery time of a fault cluster according to claim 1, characterized in that: The multivariate linear regression model is constructed by using the main feature component information to generate a fault recovery time prediction model, including: An original linear regression model is constructed based on a preset machine learning framework, and a multivariate linear fitting is performed on the original linear regression model through the main feature component information to obtain a fitting result; The residual sum of squares is calculated for the fitting result by using a preset loss function to obtain a target residual sum of squares, and a fault recovery time prediction model is determined by using the target residual sum of squares.
5. The method for predicting the recovery time of a fault cluster according to claim 1, characterized in that: When receiving the cluster fault recovery time prediction request, obtaining the target state parameter and target fault cause of the target fault cluster through the cluster fault recovery time prediction request includes: Calling a scheduled scanning task, and receiving a cluster fault recovery duration prediction request through the scheduled scanning task, wherein the scheduled scanning task is used to scan the fault status of all clusters according to a preset period; The state parameters of the target fault cluster are pulled through the cluster fault recovery time prediction request, and the fault cause of the target fault cluster is read to obtain the target state parameters and the target fault cause.
6. The method for predicting the recovery time of a fault cluster according to claim 5, characterized in that: The method of pulling the state parameters of the target fault cluster through the cluster fault recovery time prediction request, and reading the fault cause of the target fault cluster to obtain the target state parameters and the target fault cause includes: Pulling the state parameters of the target fault cluster through the cluster fault recovery time prediction request to obtain the target state parameters; Extracting the operating state parameters from the target state parameters, and comparing the operating state parameters with preset standard operating state parameters to obtain abnormal operating parameters, wherein the abnormal operating parameters include hardware abnormal parameters and software abnormal parameters; The fault cause of the target fault cluster is identified by using the abnormal operation parameters to obtain the target fault cause.
7. The method for predicting the recovery time of a faulty cluster according to any one of claims 1 to 6, characterized in that: The performing recovery time prediction on the target state parameter and the target fault cause by using the fault recovery time prediction model to obtain target recovery time information of the target fault cluster includes: Normalizing the target state parameter and the target fault cause to obtain scalar information to be predicted; The fault recovery time prediction model is used to predict the recovery time of the scalar information to be predicted, so as to obtain target recovery time information of the target fault cluster.
8. A device for predicting the recovery time of a fault cluster, characterized in that: The recovery time prediction device of the fault cluster includes: An acquisition module is used to acquire historical fault cluster recovery data, wherein the historical fault cluster recovery data includes historical state parameters, historical fault causes and historical recovery duration information of multiple historical fault clusters; A dimension reduction module is used to perform feature dimension reduction processing on the historical state parameters, the historical fault causes and the historical recovery time information to obtain main feature component information; A modeling module, used to perform multivariate linear regression modeling based on the main feature component information and generate a fault recovery time prediction model; A receiving module, configured to, when receiving a cluster fault recovery time prediction request, obtain a target state parameter and a target fault cause of a target fault cluster through the cluster fault recovery time prediction request; The prediction module is used to predict the recovery time of the target state parameter and the target fault cause through the fault recovery time prediction model to obtain the target recovery time information of the target fault cluster.
9. A device for predicting the recovery time of a fault cluster, characterized in that: The restoration time prediction device for a fault cluster comprises: a memory and at least one processor, wherein a computer program is stored in the memory; The at least one processor calls the computer program in the memory to enable the fault cluster recovery time prediction device to execute the fault cluster recovery time prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting the recovery time of a fault cluster as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Power business-oriented fault trend information obtaining method for information application system
CN106779221A
Cluster failure recovery time length estimation method, device, apparatus, and storage medium
CN109284220A
