A server failure prediction method and device
By constructing a heterogeneous graph in the server fault database and using the graph neural network to update edge weights and predict future faults, the problem of being unable to predict server faults in the existing technology is solved, enabling timely discovery and processing of faults, and reducing losses and maintenance. cost, ensuring stability.
Patent Information
- Application Number
- CN202410852079.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-06-28
AI Technical Summary
Existing technology cannot effectively predict server failures, resulting in inability to detect and handle them in time, increasing manpower consumption and economic losses.
By obtaining historical fault records and operating status data from the server's fault database, a heterogeneous graph is constructed, and the graph neural network is used to update edge weights and predict future fault conditions.
It realizes timely detection of faults, reduces economic losses and maintenance costs, and ensures the stability of the server and business.
Smart Images

Figure CN118394559B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of server monitoring, and in particular to a server fault prediction method and device. Background Art
[0002] As the scale of data centers continues to grow, the requirements for the security and stability of data centers are getting higher and higher. As an important data center, if the servers stored in the computer room fail, it will often cause problems in the operation of related businesses, resulting in data damage and economic losses.
[0003] At present, the existing technology usually monitors the failure of servers by manually testing them regularly. On the one hand, due to the large number of servers stored in the data center, manual monitoring of server failures will consume a huge amount of manpower and increase the maintenance cost of the server. On the other hand, since it is impossible to predict server failures, it is difficult to detect and handle the failures in time after they occur.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a server failure prediction method and device to solve the above technical problems.
[0006] According to one aspect of an embodiment of the present application, a server fault prediction method is provided, comprising: obtaining historical fault records within a first preset time period before prediction is performed from a fault database of the server; wherein the fault database stores first time series data corresponding to a plurality of fault records, and each fault record includes fault type data; obtaining second time series data corresponding to the operating status of the server within a second preset time period before prediction is performed; wherein the operating status of the server includes the operating status of the disk of the server, the usage rate of the central processing unit of the server, the read and write status of the database deployed on the server, and the response time of the server; determining a node association relationship based on the first time series data and the second time series data; wherein the node association relationship includes the relationship between the fault record node and the operating status node mutual relationship, the above-mentioned fault record node and the above-mentioned running status node both include multiple attributes; the multiple attributes of the above-mentioned running status node are used to represent multiple characteristics of the running status of the above-mentioned server; the multiple attributes of the above-mentioned fault record node are used to represent multiple characteristics of the above-mentioned multiple fault records; a heterogeneous graph including the above-mentioned fault record node and the above-mentioned running status node is constructed according to the above-mentioned node association relationship; wherein, in the above-mentioned heterogeneous graph, each edge between the above-mentioned fault record node and the above-mentioned running status node is determined based on the above-mentioned node association relationship; based on the graph embedding vector of the above-mentioned server, the weights of each edge between the above-mentioned fault record node and the above-mentioned running status node in the above-mentioned heterogeneous graph are updated; wherein, the graph embedding vector of the above-mentioned server is obtained by constructing the first graph neural network; according to the updated heterogeneous graph, the future fault conditions of the above-mentioned server are predicted.
[0007] According to another aspect of an embodiment of the present application, a server fault prediction device is provided, including: a historical fault record acquisition unit, used to acquire historical fault records within a first preset time period before prediction is performed from a fault database of the server; wherein the fault database stores first time series data corresponding to a plurality of fault records, and each fault record includes fault type data; a historical operation status acquisition unit, used to acquire second time series data corresponding to the operation status of the server within a second preset time period before prediction is performed; wherein the operation status of the server includes the operation status of the disk of the server, the usage rate of the central processing unit of the server, the read and write status of the database deployed on the server, and the response time of the server; a node association relationship determination unit, used to determine the node association relationship based on the first time series data and the second time series data; wherein the node association relationship includes the fault record node and the operation status The relationship between the nodes, the above-mentioned fault record node and the above-mentioned running status node both include multiple attributes; the multiple attributes of the above-mentioned running status node are used to represent multiple characteristics of the running status of the above-mentioned server; the multiple attributes of the above-mentioned fault record node are used to represent multiple characteristics of the above-mentioned multiple fault records; a heterogeneous graph construction unit, used to construct a heterogeneous graph including the above-mentioned fault record node and the above-mentioned running status node according to the above-mentioned node association relationship; wherein, in the above-mentioned heterogeneous graph, each edge between the above-mentioned fault record node and the above-mentioned running status node is determined based on the above-mentioned node association relationship; an edge weight updating unit, used to update the weights of each edge between the above-mentioned fault record node and the above-mentioned running status node in the above-mentioned heterogeneous graph based on the graph embedding vector of the above-mentioned server; wherein, the graph embedding vector of the above-mentioned server is obtained by constructing the first graph neural network; a fault prediction unit, predicting the future fault situation of the above-mentioned server according to the updated heterogeneous graph.
[0008] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the server failure prediction method through the computer program.
[0009] Based on the server fault prediction method and device provided by the present application, historical fault records within the first preset time period before prediction are obtained from the server's fault database; second time series data corresponding to the server's operating status within the second preset time period before prediction is obtained; node association relationships are determined based on the first time series data and the second time series data; a heterogeneous graph including fault record nodes and operating status nodes is constructed according to the node association relationships; based on the graph embedding vector of the server, the weights of each edge between the fault record node and the operating status node in the heterogeneous graph are updated; and future fault conditions of the server are predicted based on the updated heterogeneous graph. In other words, by predicting server faults stored in the computer room, on the one hand, faults can be discovered and resolved in a timely manner, which can avoid economic losses to a certain extent and reduce the degree of data loss; on the other hand, manpower and material resources can be saved, the maintenance cost of the server can be saved, the stability of the server operation can be ensured, and the stability of the operation of related businesses can be ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the embodiments of the present invention and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0011] Figure 1 is a flowchart of an optional server failure prediction method according to an embodiment of the present application;
[0012] Figure 2 It is a structural diagram of an optional server fault prediction device according to an embodiment of the present application.
[0013] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0014] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0015] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0016] Optionally, as an optional implementation, as Figure 1 As shown, the embodiment of the present application provides a server failure prediction method, including:
[0017] S101, obtaining historical fault records within a first preset time period before prediction from a fault database of a server; wherein the fault database stores first time series data corresponding to a plurality of fault records, and each fault record includes fault type data;
[0018] It should be understood that time series data refers to time series data. Time series data is a data column recorded in chronological order with unified indicators. Each data in the same data column is comparable. Time series data can be a number of periods or a number of time points. The purpose of time series analysis is to find out the statistical characteristics and development regularity of the time series in the sample, build a time series model, and perform out-of-sample prediction.
[0019] In the embodiment of the present application, the above-mentioned server may be any one or more servers in the computer room. The fault type data may include but is not limited to disk fault type, database fault type, network connection fault type and central processing unit fault type. Each fault record may include fault characteristic data. Taking the fault type data including the disk fault type as an example, the fault characteristic data may include but is not limited to the number of unsafe power-off times, disk bad blocks, number of hardware restarts, abnormal hard disk temperature and abnormal hard disk startup time.
[0020] S102, obtaining second time series data corresponding to the operation status of the server within a second preset time period before the prediction is performed; wherein the operation status of the server includes the operation status of the disk of the server, the usage rate of the central processing unit of the server, the read and write status of the database deployed on the server, and the response time of the server;
[0021] In some embodiments of the present application, the first preset time period and the second preset time period may be the same or different. The running status of the server may also include but is not limited to the temperature of the central processing unit and the temperature of the mainboard.
[0022] As an alternative, the server response time can be obtained based on the following steps:
[0023] Continuously sending a detection signal to the server at a first time point based on a preset period, wherein the server returns a response signal after receiving the detection signal;
[0024] Determine a second time point at which a response signal returned by the server is received;
[0025] The time period between the second time point and the first time point is taken as the response time of the server.
[0026] S103, determining a node association relationship based on the first time series data and the second time series data; wherein the node association relationship includes a mutual relationship between a fault record node and an operation status node, and the fault record node and the operation status node both include multiple attributes; the multiple attributes of the operation status node are used to represent multiple characteristics of the operation status of the server; the multiple attributes of the fault record node are used to represent multiple characteristics of multiple fault records;
[0027] S104, constructing a heterogeneous graph including fault record nodes and running status nodes according to the node association relationship; wherein, in the heterogeneous graph, each edge between the fault record node and the running status node is determined based on the node association relationship;
[0028] S105, based on the graph embedding vector of the server, updating the weight of each edge between the fault record node and the running status node in the heterogeneous graph; wherein the graph embedding vector of the server is obtained by constructing the first graph neural network;
[0029] S106, predicting future failure conditions of the server according to the updated heterogeneous graph.
[0030] Based on the embodiments provided by the present application, historical fault records within a first preset time period before prediction is made are obtained from the fault database of the server; second time series data corresponding to the operating status of the server within a second preset time period before prediction is made are obtained; node association relationships are determined based on the first time series data and the second time series data; a heterogeneous graph including fault record nodes and operating status nodes is constructed according to the node association relationships; based on the graph embedding vector of the server, the weights of each edge between the fault record node and the operating status node in the heterogeneous graph are updated; and future fault conditions of the server are predicted according to the updated heterogeneous graph. In other words, by predicting the faults of the servers stored in the computer room, on the one hand, faults can be discovered and resolved in a timely manner, which can avoid economic losses to a certain extent and reduce the degree of data loss; on the other hand, manpower and material resources can be saved, the maintenance costs of the server can be saved, the stability of the server operation can be ensured, and the stability of the operation of related businesses can be ensured.
[0031] As an optional solution, based on the graph embedding vector of the server, the weights of the edges between the fault record node and the running status node in the heterogeneous graph are updated, including:
[0032] Input multiple attributes of the running status node and multiple attributes of the fault record node into the first graph neural network, and calculate the Gaussian similarity function value of each edge between the fault record node and the running status node;
[0033] According to the Gaussian similarity function value of each edge and the graph embedding vector of the server, the association weight matrix of each edge is constructed, and the weight of each edge is updated according to the association weight matrix.
[0034] As an optional solution, the future failure conditions of the server are predicted based on the updated heterogeneous graph, including:
[0035] According to the weights of the edges and the node grouping in the updated heterogeneous graph, the current network information of the updated heterogeneous graph is determined;
[0036] When the current network information of the updated heterogeneous graph meets the preset network conditions, the weights of the nodes in each group and the weights of each edge in the updated heterogeneous graph are mapped to the generalized adjacency matrix to obtain a heterogeneous weight matrix; wherein the nodes in each group include the fault record nodes and the operation status nodes in each group;
[0037] In an embodiment of the present application, both the fault record node and the operation status node include multiple child nodes. The different groupings of the child nodes corresponding to each node included in the heterogeneous graph usually result in changes in the weights of the child nodes in different groups, and the weights of the nodes belonging to the same group are relatively larger. The node grouping can be divided based on the relevant characteristics of the multiple child nodes included in both the fault record node and the operation status node, wherein the relevant characteristics may include software-related or hardware-related; the node grouping can also be divided based on the time interval to which the multiple child nodes included in both the fault record node and the operation status node belong. The node grouping can also be divided based on both the relevant characteristics of the child nodes and the time interval to which the child nodes belong.
[0038] In some embodiments of the present application, the preset network condition is determined based on the difference between the nodes in each group and the density of neighbor nodes; if the current network information of the updated heterogeneous graph does not meet the preset network condition, the node grouping is updated until the current network information of the updated heterogeneous graph meets the preset network condition. The more neighbor nodes a node has, the higher its neighbor node density.
[0039] Based on the embodiments provided in the present application, the weights of the nodes in each group and the weights of each edge in the updated heterogeneous graph are mapped to a generalized adjacency matrix according to preset network conditions, so that a more accurate heterogeneous weight matrix can be obtained, which facilitates subsequent accurate calculations.
[0040] Obtain the updated feature vector of the fault record node and the feature vector of the running status node in the heterogeneous graph;
[0041] Use a gated graph convolutional temporal neural network to update the feature vector of the fault record node and the feature vector of the running status node; use an attention network to perform weighted summation on the updated feature vector of the fault record node and the updated feature vector of the running status node to obtain a node fusion feature vector;
[0042] Among them, the attention network forms a shared space by integrating the feature information of the fault record node with the feature information of the running status node, so that each parameter shares each feature information;
[0043] In this embodiment, the updated feature vector of the fault record node and the updated feature vector of the running status node are input into the attention network, so as to capture the dependency relationship between the context information in each node sequence.
[0044] According to the heterogeneous weight matrix, the second graph neural network is used to process the node fusion feature vector to obtain the node hidden vector;
[0045] Future failure conditions of servers are predicted based on heterogeneous weight matrices and node hidden vectors.
[0046] As an optional solution, the first graph neural network is established based on the following steps:
[0047] Acquire multiple training samples; wherein each training sample includes fault record structure data and operation status structure data; wherein the fault record structure data is graph structure data corresponding to multiple features of multiple sample fault records, and the operation status structure data is graph structure data corresponding to multiple features of the sample operation status of the server;
[0048] The first graph neural network is iteratively trained using multiple training samples until a maximum number of iterations is reached or the network parameters of the first graph neural network converge, thereby obtaining a trained first graph neural network.
[0049] As an optional solution, before obtaining the fault database of the server, the method further includes:
[0050] After the server failure is repaired, the failure record is stored in the failure database.
[0051] Optionally, as an optional implementation, as Figure 2 As shown, the present application provides a server failure prediction device, characterized in that it includes:
[0052] The historical fault record acquisition unit 201 is used to acquire historical fault records within a first preset time period before prediction from a fault database of the server; wherein the fault database stores first time series data corresponding to a plurality of fault records, and each fault record includes fault type data;
[0053] The historical operation status acquisition unit 202 is used to acquire the second time series data corresponding to the operation status of the server within the second preset time period before the prediction is made; wherein the operation status of the server includes the operation status of the disk of the server, the usage rate of the central processing unit of the server, the read and write status of the database deployed on the server, and the response time of the server;
[0054] The node association relationship determination unit 203 is used to determine the node association relationship based on the first time series data and the second time series data; wherein the node association relationship includes the mutual relationship between the fault record node and the operation status node, and the fault record node and the operation status node both include multiple attributes; the multiple attributes of the operation status node are used to represent multiple characteristics of the operation status of the server; the multiple attributes of the fault record node are used to represent multiple characteristics of multiple fault records;
[0055] A heterogeneous graph construction unit 204 is used to construct a heterogeneous graph including fault record nodes and running status nodes according to the node association relationship; wherein, in the heterogeneous graph, each edge between the fault record node and the running status node is determined based on the node association relationship;
[0056] An edge weight updating unit 205 is used to update the weight of each edge between the fault record node and the running status node in the heterogeneous graph based on the graph embedding vector of the server; wherein the graph embedding vector of the server is obtained by constructing the first graph neural network;
[0057] The fault prediction unit 206 predicts future fault conditions of the server according to the updated heterogeneous graph.
[0058] Based on the embodiments provided in the present application and in combination with the functions implemented by each unit, on the one hand, faults can be discovered and resolved in a timely manner, which can avoid economic losses and reduce the degree of data loss to a certain extent; on the other hand, it can save manpower and material resources, save server maintenance costs, ensure the stability of server operation, and thus ensure the stability of related business operations.
[0059] It should be noted that the embodiments implemented on the server fault prediction device side recorded in this application can refer to the embodiments implemented on the server fault prediction method side, and this application will not go into details one by one.
[0060] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A server failure prediction method, characterized in that: include: Acquire historical fault records within a first preset time period before prediction from a fault database of the server; wherein the fault database stores first time series data corresponding to a plurality of fault records, and each fault record includes fault type data; Acquire second time series data corresponding to the operating state of the server within a second preset time period before prediction; wherein the operating state of the server includes the operating state of the disk of the server, the usage rate of the central processing unit of the server, the read and write state of the database deployed on the server, and the response time of the server; Determine a node association relationship based on the first time series data and the second time series data; wherein the node association relationship includes a mutual relationship between a fault record node and an operation status node, and the fault record node and the operation status node both include multiple attributes; the multiple attributes of the operation status node are used to represent multiple characteristics of the operation status of the server; the multiple attributes of the fault record node are used to represent multiple characteristics of the multiple fault records; Constructing a heterogeneous graph including the fault record node and the running status node according to the node association relationship; wherein, in the heterogeneous graph, each edge between the fault record node and the running status node is determined based on the node association relationship; Inputting multiple attributes of the running status node and multiple attributes of the fault record node into a first graph neural network, and calculating the Gaussian similarity function value of each edge between the fault record node and the running status node; According to the Gaussian similarity function values of the edges and the graph embedding vector of the server, an association weight matrix of the edges is constructed, and the weights of the edges are updated according to the association weight matrix; wherein the graph embedding vector of the server is constructed according to the first graph neural network; Determine the current network information of the updated heterogeneous graph according to the weight of each edge and the node grouping in the updated heterogeneous graph; When the current network information of the updated heterogeneous graph meets the preset network condition, the weights of the nodes in each group and the weights of each edge in the updated heterogeneous graph are mapped to a generalized adjacency matrix to obtain a heterogeneous weight matrix; wherein the nodes in each group include the fault record nodes and the running status nodes in each group; Obtain a feature vector of the fault record node and a feature vector of the running status node in the updated heterogeneous graph; Using a gated graph convolutional temporal neural network to update the feature vector of the fault record node and the feature vector of the running status node; Using an attention network to perform weighted summation on the updated feature vector of the fault record node and the updated feature vector of the running status node to obtain a node fusion feature vector; wherein the attention network forms a shared space by fusing the feature information of the fault record node with the feature information of the running status node, so that each parameter shares each feature information; According to the heterogeneous weight matrix, a second graph neural network is used to process the node fusion feature vector to obtain a node hidden vector; Future failure conditions of the server are predicted based on the heterogeneous weight matrix and the node hidden vector.
2. The server failure prediction method according to claim 1, characterized in that: The preset network condition is determined based on the difference between the nodes in each group and the density of neighbor nodes; when the current network information of the updated heterogeneous graph does not meet the preset network condition, the node grouping situation is updated until the current network information of the updated heterogeneous graph meets the preset network condition.
3. The server failure prediction method according to claim 1, characterized in that: The first graph neural network is established based on the following steps: Acquire multiple training samples; wherein each of the training samples includes fault record structure data and operation status structure data; wherein the fault record structure data is graph structure data corresponding to multiple features of multiple sample fault records, and the operation status structure data is graph structure data corresponding to multiple features of the sample operation status of the server; The first graph neural network is iteratively trained using the multiple training samples until a maximum number of iterations is reached or network parameters of the first graph neural network converge, thereby obtaining a trained first graph neural network.
4. The server failure prediction method according to claim 1, characterized in that: The response time of the server is obtained based on the following steps: continuously sending a detection signal to the server at a first time point based on a preset period, wherein the server returns a response signal after receiving the detection signal; Determining a second time point at which the response signal returned by the server is received; The time period between the second time point and the first time point is used as the response time of the server.
5. The server failure prediction method according to claim 1, characterized in that: Before acquiring the fault database of the server, the method further includes: After the fault occurring in the server is repaired, the fault record is stored in the fault database.
6. A server failure prediction device, characterized in that: include: A historical fault record acquisition unit, used to acquire historical fault records within a first preset time period before prediction from a fault database of a server; wherein the fault database stores first time series data corresponding to a plurality of fault records, and each fault record includes fault type data; A historical operation status acquisition unit, used to acquire second time series data corresponding to the operation status of the server within a second preset time period before prediction is performed; wherein the operation status of the server includes the operation status of the disk of the server, the usage rate of the central processing unit of the server, the read and write status of the database deployed on the server, and the response time of the server; A node association relationship determination unit, configured to determine a node association relationship based on the first time series data and the second time series data; wherein the node association relationship includes a mutual relationship between a fault record node and an operation status node, and the fault record node and the operation status node both include multiple attributes; the multiple attributes of the operation status node are used to represent multiple characteristics of the operation status of the server; the multiple attributes of the fault record node are used to represent multiple characteristics of the multiple fault records; A heterogeneous graph construction unit, configured to construct a heterogeneous graph including the fault record node and the running status node according to the node association relationship; wherein, in the heterogeneous graph, each edge between the fault record node and the running status node is determined based on the node association relationship; An edge weight updating unit, used for inputting multiple attributes of the running status node and multiple attributes of the fault record node into the first graph neural network, calculating the Gaussian similarity function value of each edge between the fault record node and the running status node; constructing an association weight matrix of each edge according to the Gaussian similarity function value of each edge and the graph embedding vector of the server, and updating the weight of each edge according to the association weight matrix; wherein the graph embedding vector of the server is constructed according to the first graph neural network; A fault prediction unit is used to determine the current network information of the updated heterogeneous graph according to the weights of each edge in the updated heterogeneous graph and the node grouping situation; when the current network information of the updated heterogeneous graph meets the preset network condition, the weights of the nodes in each group and the weights of each edge in the updated heterogeneous graph are mapped to a generalized adjacency matrix to obtain a heterogeneous weight matrix; wherein the nodes in each group include the fault record nodes and the running status nodes in each group; obtain the feature vectors of the fault record nodes and the running status nodes in the updated heterogeneous graph; use a gated graph convolutional temporal neural network to map the feature vectors of the fault record nodes The feature vector and the feature vector of the running status node are updated; the updated feature vector of the fault record node and the updated feature vector of the running status node are weighted summed using an attention network to obtain a node fusion feature vector; wherein the attention network forms a shared space by fusing the feature information of the fault record node with the feature information of the running status node, so that each parameter shares each feature information; according to the heterogeneous weight matrix, a second graph neural network is used to process the node fusion feature vector to obtain a node hidden vector; based on the heterogeneous weight matrix and the node hidden vector, the future fault condition of the server is predicted.
