Fault location method and device, electronic device and storage medium
By obtaining the server's hardware, software and network operation data, conducting causal relationship analysis and building a Bayesian network model, the problem of low fault positioning accuracy is solved, and more accurate fault positioning and rapid repair is achieved.
Patent Information
- Application Number
- CN202510669886.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-05-23
AI Technical Summary
The accuracy of fault location in the prior art is low, and the root cause of server failure cannot be fully revealed.
Obtain the server's hardware, software and network operation data, identify the mutual influence between different types of data through causal analysis, and build a Bayesian network model for fault location.
Improve the accuracy of fault location, avoid blind troubleshooting, reduce the time for troubleshooting, and ensure that the server quickly resumes normal operation.
Smart Images

Figure CN120196514B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a fault location method and device, an electronic device, and a storage medium. Background Art
[0002] A server failure may cause service interruption or performance degradation. To quickly repair the server failure, it is necessary to locate the server failure.
[0003] In related fault location technologies, fault location is usually performed using a single type of data (for example, hardware indicators in a server). Due to the mutual influence between different types of data, a single type of fault data is not necessarily the root cause of the fault, resulting in low fault location accuracy. Summary of the Invention
[0004] The present application provides a fault location method and device, an electronic device, and a storage medium to at least solve the problem of low fault location accuracy in related technologies.
[0005] This application provides a fault location method, including:
[0006] In the event of a server failure, obtaining historical operation data of the server; the historical operation data includes at least two of hardware operation data, software operation data, and network operation data;
[0007] Conduct causal relationship analysis between different historical operation data to obtain the causal relationship between different historical operation data;
[0008] Perform fault location analysis on the cause-effect relationship to obtain the server fault location result.
[0009] The present application also provides a fault location device, comprising:
[0010] an acquisition unit, configured to acquire historical operation data of the server in the event of a server failure; the historical operation data including at least two of hardware operation data, software operation data, and network operation data;
[0011] A first analysis unit is used to analyze the causal relationship between different historical operation data to obtain the causal relationship between the different historical operation data;
[0012] The second analysis unit is used to perform fault location analysis on the cause-effect relationship to obtain a fault location result of the server.
[0013] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned fault location methods when executing the computer program.
[0014] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned fault location methods are implemented.
[0015] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned fault location methods when executed by a processor.
[0016] Through this application, by obtaining the historical operation data of the server, which includes at least two of the hardware operation data, software operation data, and network operation data, and performing causal relationship analysis on the historical operation data, the mutual influence between different types of historical operation data can be revealed, helping to locate the fault more comprehensively. Through the causal relationship analysis of multi-dimensional historical operation data, the root cause of the server failure can be more accurately identified, thereby improving the accuracy of fault location. Therefore, the technical problem of low fault location accuracy can be solved, achieving the technical effect of improving the accuracy of fault location. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 A flowchart of a fault location method provided in an embodiment of the present application;
[0019] Figure 2 A flowchart of a method for obtaining historical operation data provided in an embodiment of the present application;
[0020] Figure 3 A causal diagram of an undetermined causal relationship provided in an embodiment of the present application;
[0021] Figure 4 A causal diagram that determines a causal relationship provided in an embodiment of the present application;
[0022] Figure 5 A schematic structural diagram of a fault location device provided in an embodiment of the present application;
[0023] Figure 6 A schematic structural diagram of another fault location device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0025] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0026] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0027] The specific application environment architecture or specific hardware architecture on which the execution of the fault location method depends is described herein.
[0028] The embodiments of the present application provide a fault location method, which is described in detail in conjunction with the execution flow of the fault location method.
[0029] Figure 1 A flowchart of a fault location method provided in an embodiment of the present application.
[0030] like Figure 1 As shown, the method comprises the following steps:
[0031] Step 101: When a server fails, obtain historical operation data of the server; the historical operation data includes at least two of hardware operation data, software operation data, and network operation data.
[0032] Historical operation data refers to various types of recorded information generated by a server during past normal or abnormal operation. It covers the server's hardware, software, and network operations. Historical operation data can be used to analyze the server's operating status and diagnose faults. Hardware operation data refers to the operating parameters and status information related to the server's hardware devices. Hardware operation data includes, but is not limited to, the temperature, utilization, and frequency degradation status of the Central Processing Unit (CPU); memory usage and Error Checking and Correcting (ECC); the Self-Monitoring, Analysis, and Reporting Technology (SMART) status of storage hard drives; power and cooling input voltage, fan speed, and chassis air inlet temperature. Hardware operation data is collected by the Baseboard Management Controller (BMC) and collected at a sub-second frequency through the Intelligent Platform Management Interface (IPMI) or Application Programming Interface (API). Software operation data includes operation status information of various software applications running on the server, including but not limited to system logs and application logs. System logs collect kernel logs and hardware trace logs through the dynamic message buffer (dmesg). Application logs output structured application operation logs (JavaScript Object Notation (JSON) format) through the log viewing tool (journalctl), which include error codes, thread identifiers (IDs), and stack traces.Network operation data refers to data related to server network communications, including but not limited to switch data and host network metrics. Switch data uses the Simple Network Management Protocol (SNMP) to obtain port status (such as Cyclic Redundancy Check (CRC) errors and packet loss rate). Host network metrics use the Transmission Control Protocol Top (TCP TOP) or Extended Berkeley Packet Filter (EBPF) to capture Transmission Control Protocol (TCP) retransmission rate and number of connections.
[0033] By acquiring at least two types of historical operational data, you can gain a comprehensive understanding of the server's operating status from multiple perspectives. While a single data type may not reveal the root cause of a server failure, a comprehensive analysis of hardware, software, and network data can improve the accuracy of fault location.
[0034] Step 102 : Analyze the causal relationship between different historical operation data to obtain the causal relationship between different historical operation data.
[0035] Causal analysis examines whether there are influencing relationships between different historical server operational data. For example, if a server's CPU utilization increases (the cause), it may lead to longer software application response times (the result). Causal analysis can identify this potential impact, providing a deeper understanding of the interrelationships between server operational data and providing a basis for accurately identifying the root cause of the problem.
[0036] Use the monitoring system to collect historical operational data across multiple dimensions in real time, including but not limited to: hardware operational data such as CPU usage, memory usage, hard drive read / write speeds, and device temperature; software operational data such as operating system load, application performance metrics, process execution, and system error logs; and network operational data such as network bandwidth, network latency, packet loss rate, and number of connections. Preprocess the collected historical operational data, including: data cleaning (eliminating missing values, outliers, and noise); data normalization (unifying the dimensions of different data items to facilitate cross-dimensional comparative analysis); and time synchronization (aligning data from different sources to ensure data consistency during analysis). Use causal inference techniques to establish a causal relationship model between historical operating data. Causal relationship analysis methods include but are not limited to: causal relationship testing, Bayesian networks, and structural equation models: Causal relationship testing is used to detect causal relationships in time series data. By checking whether the past value of a variable can help predict the future value of another variable, the causal relationship between variables can be inferred; Bayesian networks represent the dependencies between data by constructing conditional probability models, thereby identifying possible causal paths; structural equation models model the relationships between multiple variables by constructing structural equations, thereby identifying causal relationships between variables. Based on the established causal relationship model, the causal relationship between different historical operating data is analyzed. For example, through causal relationship testing, it can be determined whether fluctuations in CPU usage have caused changes in memory usage, or whether network latency is related to hard disk read performance.
[0037] Causal relationships include, but are not limited to, the causal relationship between high CPU load and memory consumption, the relationship between high memory usage and disk read and write speed, and the correlation between network bandwidth usage and response time delay.
[0038] By analyzing the causal relationships between different historical operational data, we can go beyond superficial symptoms and delve deeper into the root causes of server failures. For example, when service response time is prolonged, examining software operational data alone may not accurately determine the cause. However, causal analysis reveals a causal relationship with hardware CPU and memory utilization. This allows targeted hardware resource optimization or upgrades, fundamentally resolving the issue and avoiding blind and one-sided troubleshooting.
[0039] Step 103: Perform fault location analysis on the cause-effect relationship to obtain a fault location result of the server.
[0040] A causal relationship refers to a correlation between different server operational data. Changes in one operational data point (the cause) can lead to changes in another (the effect). For example, increased CPU utilization in server hardware (the cause) can lead to increased software service response time (the effect). Fault location analysis is the process of determining the specific location or root cause of a server failure by applying specific analytical methods and models based on the causal relationships between various types of server operational data. The goal is to precisely pinpoint the source of server performance degradation or service interruption, enabling rapid remediation. The fault location result is the final output of the fault location analysis, identifying the component, module, historical operational data, or specific cause of the server failure. For example, this could determine whether the failure is caused by a hardware memory leak, a software code defect, or insufficient network bandwidth.
[0041] Based on the previously determined causal relationships, a Bayesian network model is constructed. For example, suppose causal analysis reveals a causal relationship between hardware CPU utilization and software service response time, and that network bandwidth utilization is also correlated with service response time. These variables (CPU utilization, network bandwidth utilization, and service response time) are used as nodes in the Bayesian network. Based on the causal relationships, directed edges are identified between the nodes, from the cause node to the effect node. For each node, possible states are defined. For example, CPU utilization can be categorized as "normal," "high," and "excessive," and service response time can be categorized as "normal," "slightly long," and "excessively long." Based on collected historical operating data, the conditional probabilities of each node under different combinations of its parent node states are statistically determined. For example, the service response time node has CPU utilization and network bandwidth utilization as its parent nodes. By analyzing historical data, we calculate the probability of a "slightly long" service response time when CPU utilization is "high" and network bandwidth utilization is "normal"; the probability of an "excessively long" service response time when CPU utilization is "excessively high" and network bandwidth utilization is "excessively high"; and so on, thereby constructing a complete conditional probability table. Prior probabilities are probabilistic estimates of node states based on past experience or prior knowledge, without considering specific observational data. For example, based on past server operating experience, the prior probability of a "normal" CPU utilization state is 0.6, a "high" state is 0.3, and a "excessively high" state is 0.1; the prior probability of a "normal" network bandwidth utilization state is 0.7, a "high" state is 0.2, and a "excessively high" state is 0.1, and so on. When a server failure occurs, current observational data is collected, such as the probability of an "excessively long" service response time. According to Bayes' theorem, using conditional probability tables and prior probabilities, calculate the posterior probability of each possible cause node (such as CPU utilization, network bandwidth utilization) in different states. For example, calculate the posterior probability that the CPU utilization is in the "too high" state and the network bandwidth utilization is in the "too high" state when the service response time is "extra long". Compare the posterior probabilities corresponding to the states of each cause node, and determine the cause node state with the largest posterior probability as the fault location result. If the calculation results show that the posterior probability of the CPU utilization being in the "too high" state and the network bandwidth utilization being in the "too high" state is the largest, it is preliminarily judged that the server failure is caused by excessive use of the hardware CPU and insufficient network bandwidth. However, it should be clear that this statement is not intended to limit fault location to the above-mentioned implementation, and it can also be achieved through other means.
[0042] Fault location analysis based on causal relationships comprehensively considers the complex relationships between various server operational data and accurately pinpoints the root cause of the fault. Compared to traditional fault location methods that rely solely on single data points or simple threshold judgments, this method improves fault location accuracy, avoids blind troubleshooting, reduces fault repair time, and quickly restores normal server operations.
[0043] Through this application, by obtaining the historical operation data of the server, which includes at least two of the hardware operation data, software operation data, and network operation data, and performing causal relationship analysis on the historical operation data, the mutual influence between different types of historical operation data can be revealed, helping to locate the fault more comprehensively. Through the causal relationship analysis of multi-dimensional historical operation data, the root cause of the server failure can be more accurately identified, thereby improving the accuracy of fault location. Therefore, the technical problem of low fault location accuracy can be solved, achieving the technical effect of improving the accuracy of fault location.
[0044] As a refinement of step 101, when executing to obtain the historical operation data of the server, it can be implemented in the following ways but not limited to: Figure 2 As shown, Figure 2 A flowchart of a method for obtaining historical operation data provided in an embodiment of the present application includes:
[0045] Step 201: Obtain historical operation data to be processed.
[0046] Pending historical operation data refers to various historical operation data recorded during the server's past operation, which has not been preprocessed or is in its original state. This includes pending hardware operation data (such as CPU utilization and memory usage), pending software operation data (such as process information, transaction volume, error logs, and service response time), and pending network operation data (such as network bandwidth utilization, network latency, and network packet loss rate). Pending historical operation data is directly obtained from the server's operation records and may contain noise, missing values, inconsistent timestamps, and other issues. Further processing is required for fault location analysis.
[0047] Methods for acquiring the historical operating data to be processed include, but are not limited to, monitoring tools, sensors, logging systems, or API interfaces. Automated collection methods are implemented to obtain historical operating data in real time or on a regular basis, reducing manual intervention and improving the efficiency and accuracy of data acquisition.
[0048] Step 202 , preprocessing the historical operation data to be processed to obtain historical operation data; the preprocessing includes at least one of time alignment, mean calculation, variance calculation, rate of change calculation, and conversion of non-numeric data into numeric data.
[0049] Time alignment involves converting operational data from different sources, with different timestamp formats or sampling frequencies, into a unified timestamp format and arranging them in chronological order to ensure consistency and comparability across the time dimension. Mean calculation involves averaging operational data over a period of time, smoothing data fluctuations and reflecting the overall trend and average level of the data. Variance calculation measures the dispersion of the historical operational data being processed, specifically the degree of difference between the data and the mean. A larger variance indicates greater data volatility, potentially indicating instability in server operations. Rate of change calculation involves calculating the rate of change between adjacent time periods or data points in the historical operational data being processed. This reflects the dynamic trends of the data being processed and helps identify sudden changes or abnormal fluctuations in the data. Converting non-numeric data to numerical data involves converting non-numeric historical data (such as text status information and category labels) into numerical form using specific encoding methods or mapping rules to facilitate mathematical operations and data analysis.
[0050] To better understand preprocessing, an example is provided. All historical operational data to be processed is timestamped with high precision (synchronized using the Network Time Protocol (NTP) with an accuracy of <1ms). Data is aligned within fixed time windows (e.g., 1 minute) and aggregated into feature vectors within the window. For example, second-level samples from the BMC (60 records / minute) and millisecond-level events from application logs (e.g., 100 errors / minute) are aligned within the same time window. Hardware features include calculating the mean / variance of CPU temperature and the rate of change of fan speed (Δ revolutions per minute (RPM) / minute). Discrete events (e.g., "abnormal power input voltage") are converted into binary flags. Software features include log templating: using standardized processing, raw logs are parsed to represent specific event types. The number of error logs and service startups per minute is calculated. Network features include statistics on port CRC error counts, TCP retransmission rates, and sudden increases in bandwidth utilization.
[0051] Data preprocessing can standardize data, ensure data quality, reduce errors in the analysis process, and improve the reliability of results.
[0052] As a refinement of step 102, when performing causal relationship analysis between different historical operating data to obtain the causal relationship between different historical operating data, it can be implemented in but not limited to the following ways, including: defining variables for different historical operating data to obtain variables of different historical operating data; performing conditional independence tests between different variables to obtain independence results between different variables; determining the causal relationship between different variables based on the independence results, and determining the causal relationship between different variables as the causal relationship between the historical operating data corresponding to the different variables.
[0053] Variable definition refers to designating each data item in historical operation data as a variable. For example, in historical operation data, CPU utilization can be defined as one variable and memory usage as another variable. Conditional independence test is a statistical method used to determine whether two variables are independent of each other given other variables. For example, testing whether variables A and B are independent given variable C. The independence result refers to the output of the conditional independence test, which indicates whether the two variables are independent under given conditions. If two variables are independent under given conditions, there is no direct causal relationship between them; if they are dependent, there may be a causal relationship. A causal relationship refers to a relationship in which one historical operation data (cause) causes changes in another historical operation data (effect). In server operation data, for example, high CPU utilization may lead to increased service response time.
[0054] First, define the variables and map the preprocessed features (i.e., historical operation data) into nodes in the causal graph. Each node represents a variable, and the observation value at each time point in the historical operation data corresponds to the value of these variables.
[0055] To facilitate understanding, an example is provided for the hardware nodes: CPU temperature (CPU_Temp), fan speed (Fan_RPM), and ambient temperature (Ambient_Temp). At time t1, Fan_RPM = 3000, CPU_Temp = 65, and Ambient_Temp = 25; at time t2, Fan_RPM = 2800, CPU_Temp = 70, and Ambient_Temp = 28; at time t3, Fan_RPM = 2500, CPU_Temp = 80, and Ambient_Temp = 30. These data points constitute the time series of each variable.
[0056] Then initialize the fully connected graph, assuming that there is a potential causal relationship between all variables, that is, each variable is connected to other variables by edges. For example, the three variables Fan_RPM, CPU_Temp, and Ambient_Temp are composed of Figure 1Initially there will be three edges: Fan_RPM-CPU_Temp, Fan_RPM-Ambient_Temp, CPU_Temp-Fan_RPM, forming a fully connected graph.
[0057] However, in reality, there may be bidirectional edges between each variable, or all possible edges exist, but usually in a directed graph, there will be edges in two directions between each pair of variables, but we first initialize it to an undirected fully connected graph and then determine the direction.
[0058] Perform a conditional independence test, testing independence in the order of increasing number of variables in the conditional set (zero variable → single variable → double variable...). For each pair of variables X and Y, first test whether they are independent under the zero variable condition (that is, without any other variables). If they are independent, delete the edge between them; if they are not independent, continue testing under the condition of giving one variable... until the minimum conditional set that makes X and Y independent is found. Here, the zero variable and single variable conditional set are used as examples. As for how to calculate whether two variables are independent, it can be determined by using a statistical test method based on the likelihood ratio. The calculation formula of the statistical test method can be implemented by formula (1):
[0059] (1)
[0060] in, is a statistic, is the observed frequency (X= in actual data (historical operation data) And Y= frequency), is the expected frequency (the theoretical frequency assuming X and Y are independent), is the natural logarithm, For the summation symbol, Used to traverse all possible combinations of X and Y categories, where X and Y are different variables.
[0061] The formula is based on the likelihood ratio comparing the observed data to the expected data under the independence assumption. A large difference between the two indicates that the independence assumption is not true. The likelihood ratio statistic (LR) is defined as: LR = -2ln(saturated model likelihood / independence model likelihood), so the multiplication by 2 is to make the statistic approximately follow a chi-square distribution.
[0062] To facilitate understanding, an example is provided. When testing whether X (Fan_RPM) and Y (CPU_Temp) are independent under the empty set condition, a contingency table is first constructed. Assuming that at a historical moment, variable X has m data and variable Y has n data, the contingency table is shown in Table 1:
[0063] Table 1
[0064]
[0065] in, are different observation frequencies, X and Y are variables, is the number of categories of X, is the number of categories of Y, is the sum of the observation frequencies of different rows, is the sum of the observation frequencies of different columns, is the sum of all observed frequencies.
[0066] Then under the expectation that X and Y are independent, the expected frequency ( ) can be calculated using formula (2):
[0067] (2)
[0068] The expected frequency of each cell is the product of the corresponding row total and column total, divided by the total number of samples. Then substitute into formula (1) to get Then determine the degrees of freedom (Degrees of Freedom, ), the calculation formula of the degree of freedom can be realized by formula (3):
[0069] (3)
[0070] For ease of understanding, an example is provided. For example, for a 2x2 contingency table (such as fan speed high / low versus CPU temperature normal / high), the degrees of freedom .
[0071] The significance level α is selected as 0.05 based on the degree of freedom used. Because α is the allowable type I error probability (i.e., the risk of incorrectly rejecting H0 (assuming that X and Y are independent)), α = 0.05 means accepting a 5% risk of misjudgment. Using the table lookup method, in the chi-square distribution table, according to and α find the corresponding critical value when =1, α=0.05, the critical value is 3.841. Value and critical value, if ≥ critical value, reject the original hypothesis (keep the edge, X and Y are not independent); if < critical value, accept the null hypothesis (delete the edge, X and Y are independent).
[0072] When testing for independence under a single variable condition, for the edges that have not been eliminated, gradually add the conditional variable Z and test whether X and Y are independent when Z is given. Take the edges X (Fan_RPM) and Y (CPU_Temp) as an example, and test whether they are independent when Z (Ambient_Temp) is given. Assume that X and Y are independent. Follow the above steps to calculate The data is divided into Z bins (such as Z≤28 degrees Celsius and Z>28 degrees Celsius), and the conditional independence of X and Y is calculated separately. Assume that the calculated =1.2, according to the table lookup method <critical value, accept the null hypothesis → accept H0, delete the edge, X and Y are independent.
[0073] By combining multiple types of historical operation data for causal analysis, we can more comprehensively understand the mechanism of server failure and avoid misjudgments that may be caused by a single data type.
[0074] As a refinement of the above embodiment, when performing conditional independence tests between different variables and obtaining independence results between different variables, it can be implemented in but not limited to the following ways, including: obtaining a condition set of at least two variables among any different variables; the condition set is all variables except at least two variables among the different variables; in the direction of increasing number of variables in the condition set, using the variables in the condition set to perform conditional independence tests on at least two variables until the target variable with the least number of variables in the condition set that causes the independence of at least two variables is found; and determining the target variable as the independence result of at least two variables.
[0075] A condition set refers to a set of variables that may affect the target variable, in addition to the target variable being tested, when performing a conditional independence test. The variables in the condition set are used to help determine whether there is an independence relationship between the target variables. The target variables are the variables that are screened out from the condition set in the least number of ways that can make at least two of the different variables meet the independence condition during the conditional independence test; wherein, the number of target variables can be zero or the sum of the number of variables in the condition set. The embodiment of the present application does not limit the number of target variables.
[0076] Extract the required variables from historical run data, such as CPU load, memory usage, and disk read / write rates. Select at least two variables to be analyzed (for example, CPU load and memory usage) for conditional independence testing. For the selected at least two variables, first construct a preliminary condition set that includes all other variables that may affect them (such as network bandwidth and disk usage). Gradually add more variables to the condition set in increasing order of the number of variables in the condition set and perform conditional independence testing. Start with the smallest condition set (for example, no variables) and perform conditional independence testing on the variables to be tested. If the test results show that the target variable is still not independent, gradually add more variables to the condition set and continue conditional independence testing. In each conditional independence test, if a combination of variables in a condition set can make at least two of the tested variables independent, the variables in that condition set are considered the target variable. Determine the minimum target variable, that is, the variables in the smallest condition set that can make the target variable independent. The final determined target variable is taken as the independence result, which is the conclusion of the independence test between two or more variables, indicating that these variables are independent under specific conditions and no longer affect each other.
[0077] By testing in the direction of increasing the number of variables in the conditional set, it is possible to find the target variables that meet the conditions at an earlier stage, avoiding unnecessary complex testing of more variables, improving test efficiency, and saving computing resources and time costs.
[0078] As a refinement of the above embodiment, when determining the causal relationship between different variables based on the independence results, it can be implemented in the following ways, but not limited to: establishing a causal relationship between the target variable and at least two variables; in the causal relationship, the target variable is the cause and the at least two variables are the effect.
[0079] A cause is a variable that causes other variables to change in a causal relationship. An effect is a variable that changes under the influence of other variables in a causal relationship.
[0080] To facilitate understanding, an example is provided. To determine the direction of an edge (causal relationship), a causal chain (V-structure) is required. Specifically, in a causal graph, if there exists a structure X→Z←Y, and X and Y are not adjacent (i.e., there is no direct edge), then Z is called a collider (i.e., the target variable) between X and Y. In this case, X and Y may be correlated given Z (even if they are originally independent). In other words, if there exists a node Z such that XZY forms a potential V-structure, and X and Y are independent under zero variables but correlated under Z, then the direction is determined to be X→Z←Y. Calculations have confirmed that X (Fan_RPM) and Y (CPU_Temp) are not independent under zero variables, so we determine that ambient temperature (Ambient_Temp) may affect both fan speed (X) and CPU temperature (Y). Causally, a high ambient temperature (Z↑) causes an increase in fan speed (X↑) to enhance heat dissipation; a high ambient temperature (Z↑) directly increases CPU temperature (Y↑). This results in the final causal graph. To better understand the causal graph, see the following example. Figure 3 、 Figure 4 As shown, Figure 3 A causal diagram of an undetermined causal relationship provided in an embodiment of the present application, Figure 4 A causal diagram of a determined causal relationship provided in an embodiment of the present application is provided by Figure 3 、 Figure 4 It can be seen that the ambient temperature is the cause, and the fan speed and CPU temperature are the results.
[0081] Understanding the causal relationships between variables helps optimize the configuration and performance of server systems.
[0082] As a refinement of the above embodiment, when performing a conditional independence test on at least two variables using variables in a condition set, it can be implemented in but not limited to the following ways, including: obtaining first historical operating data corresponding to the variables in the condition set in the historical operating data, obtaining second historical operating data corresponding to at least two variables, and obtaining a critical value of the second historical operating data; based on the first historical operating data, dividing the second historical operating data into at least two data sets; each data set contains at least one second historical operating data; calculating statistics on the at least two data sets to obtain statistics of the at least two data sets; and determining whether the at least two variables are independent based on the comparison of the statistics with the critical value.
[0083] The first historical data refers to the historical data corresponding to the variables in the conditional set, and the second historical data refers to the historical data corresponding to at least two variables. In a conditional independence test, the critical value is a preset numerical threshold used to determine whether a statistic meets the independence criteria. The degrees of freedom indicate the number of independent values that can vary freely in the data when estimating a statistic or parameter.
[0084] The critical value of the second historical operating data can be obtained in the following way: obtaining the degrees of freedom and significance level of the second historical operating data, and based on the degrees of freedom and significance level, searching for the critical value corresponding to the degrees of freedom and significance level in the chi-square distribution table.
[0085] For statistical methods such as the chi-square test, the degree of freedom affects the judgment criteria for the test results. For example, in a 2×2 contingency table, the degree of freedom is 1 because there is an independent constraint (the total count of each cell is fixed), so only one cell value can vary freely.
[0086] Extract the first historical operation data corresponding to the conditional set variable Z (server load) and the second historical operation data corresponding to the variables X (CPU temperature) and Y (CPU usage) from the historical operation data of the server. At the same time, determine the degree of freedom of the second historical operation data. For example, suppose that the server load data of 100 sample points and the corresponding CPU temperature and usage data are collected over a period of time. For the chi-square test, if the CPU temperature is divided into three categories of "low temperature", "medium temperature" and "high temperature", and the CPU usage is divided into two categories of "low" and "high", then the constructed contingency table is 3×2, and the degree of freedom is . Based on the first historical operation data (server load), the second historical operation data (CPU temperature and usage rate) is divided into at least two data sets. For example, based on the median of the server load, the data is divided into two data sets of high load and low load. Each data set contains the CPU temperature and usage rate data at the corresponding moment, so that the relationship between CPU temperature and usage rate under different load conditions can be analyzed separately. Statistical calculations are performed for at least two divided data sets. Compare the calculated statistics with the critical values under the corresponding degrees of freedom. For the case where the degrees of freedom are 2, assuming the significance level is 0.05, the critical value in the corresponding chi-square distribution table is 5.991. If the calculated statistic is greater than or equal to 5.991, the hypothesis that variables X and Y are independent is rejected, and it is believed that there is a correlation between them; otherwise, they are considered independent.
[0087] Calculate statistics for at least two data sets separately, sum the statistics of the at least two data sets to obtain a summed result, determine the summed result as a final statistic of the at least two data sets, and determine whether the at least two variables are independent based on a comparison of the final statistic with a critical value.
[0088] By extracting relevant variable data from historical operational data and partitioning the data based on conditional set variables, we consider the impact of various factors in the server operating environment on variable relationships. By combining statistical measures with degrees of freedom, we can more accurately determine the independence of two variables, avoid drawing erroneous conclusions due to ignoring interference from other variables, and improve the reliability of causal relationship analysis.
[0089] As a refinement of the above embodiment, when determining whether at least two variables are independent based on the comparison of statistics and degrees of freedom, it can be implemented in but not limited to the following ways, including: if the statistic is greater than or equal to the critical value, it is determined that at least two variables are not independent; if the statistic is less than the critical value, it is determined that at least two variables are independent.
[0090] For ease of understanding, an example is provided. Assuming the statistic is 4 and the critical value is 3.5, it is determined that at least two variables are not independent.
[0091] By using critical values to judge the independence of variables, the dependence between variables can be judged through quantitative standards, avoiding misdiagnosis due to human bias or contingency, and ensuring the accuracy and reliability of fault analysis.
[0092] As a refinement of the above embodiment, when performing statistical calculations on at least two data sets to obtain statistics of at least two data sets, it can be implemented in but not limited to the following ways, including: obtaining the observed frequency of at least two data sets, and obtaining the expected frequency of at least two data sets; the observed frequency is the frequency of the same second historical operation data in at least two data sets; the expected frequency is the independent theoretical frequency between the second historical operation data; and statistical calculations are performed on the observed frequency and the expected frequency to obtain statistics.
[0093] The observed frequency is the actual frequency of the same second historical operation data (e.g., a specific value or interval of server response time) in the data set. For example, under certain conditions, the server response time exceeded 500ms and actually occurred 20 times in the data set. These 20 times are the observed frequency. The expected frequency is the theoretical frequency calculated based on probability theory under the assumption that the second historical operation data are independent. For example, if the probability of the server response time exceeding 500ms is 0.2 and there are 100 data points in a data set, then the expected frequency is 100 × 0.2 = 20 times. The calculation formula for the statistic is shown in Formula (1).
[0094] Calculate the statistics of the observed frequencies and expected frequencies of the at least two data sets separately to obtain the statistics corresponding to the at least two data sets respectively, and add the statistics corresponding to the at least two data sets respectively to obtain the final statistics of the at least two data sets.
[0095] By comparing observed and expected frequencies, the independence between two data sets can be more accurately assessed. This provides a reliable statistical basis for system fault diagnosis and performance analysis, avoiding misdiagnosis due to human judgment or intuitive errors.
[0096] As a refinement of the above embodiment, when performing statistical calculation on the observed frequency and the expected frequency to obtain the statistic, it can be implemented in but not limited to the following ways, including: calculating the quotient of the observed frequency and the expected frequency to obtain the quotient result; performing logarithm calculation on the quotient result to obtain the logarithmic result; performing product calculation on the logarithmic result and the observed frequency to obtain the statistic.
[0097] The embodiment of the present application is an explanation of a method for calculating the statistics corresponding to at least two data sets. The final statistics need to be calculated by adding up the statistics corresponding to at least two data sets.
[0098] Specifically, the implementation process of this embodiment is a textual description of formula (1).
[0099] As a refinement of step 103, when performing fault location analysis on the causal relationship and obtaining the fault location result of the server, it can be implemented in but not limited to the following ways, including: obtaining a conditional probability table of the causal relationship, and obtaining the marginal probability of the causal relationship and the prior probability of the causal relationship; the conditional probability table includes the conditional probability of the effect when the cause in the causal relationship is in different states; determining the conditional probability as the likelihood probability of the corresponding causal relationship; performing a posterior probability calculation on the likelihood probability, the prior probability and the corresponding likelihood probability to obtain the posterior probability of the causal relationship; determining the cause in the causal relationship corresponding to the maximum value in the posterior probability as the fault location result.
[0100] A conditional probability table describes the probability of each factor in a causal relationship causing a result under different conditions. This table clearly defines the probability of an event occurring under each condition and is commonly used in Bayesian network models. Marginal probability refers to the probability of an event occurring without considering other conditions. It is the sum or integral of the conditional probabilities under specific conditions and reflects the overall probability of a single event occurring in the system. Prior probability is an estimate of the probability of an event occurring based on prior knowledge or experience, typically in the absence of any new data or observations. Likelihood probability is the probability of a hypothesis or event occurring, derived from existing observations. In fault location analysis, likelihood probability represents the likelihood of a causal relationship occurring and is calculated based on observations of the current system state. Posterior probability is the updated probability of an event occurring after taking into account prior probabilities and new observations. Bayes' theorem is used to calculate posterior probability, reflecting the updated probability of an event occurring after the addition of new information.
[0101] The calculation formula of the posterior probability can be realized by formula (4):
[0102] (4)
[0103] in, is the posterior probability, For the reason, For the fruit, is the likelihood probability, is the prior probability, is the marginal probability.
[0104] By combining conditional probability, marginal probability, prior probability, and posterior probability for comprehensive analysis, the specific factors that lead to a fault can be more accurately identified. The calculation of posterior probability is based on multiple information sources, providing more reliable fault location results.
[0105] As a refinement of the above embodiment, when performing a posterior probability calculation on the likelihood probability, the prior probability and the corresponding likelihood probability to obtain the posterior probability of the causal relationship, it can be implemented by but not limited to the following methods, including: calculating the product of the likelihood probability and the prior probability to obtain the product result; calculating the quotient of the product result and the marginal probability to obtain the posterior probability.
[0106] Specifically, the implementation process of this embodiment is a textual description of formula (4).
[0107] To facilitate a better understanding of the Conditional Probability Table (CPT), an example is provided. The input historical operating data is a time series numerical type: t1, Fan_RPM (2500), Ambient_Temp (30), CPU_Temp (75); t2, Fan_RPM (3500), Ambient_Temp (40), CPU_Temp (95); t3, Fan_RPM (2000), Ambient_Temp (35), CPU_Temp (90). In order to intuitively represent the corresponding relationship, it is necessary to learn discrete data, so the variables are discretized (assuming that the calculation is simplified): Fan_RPM: low (<2500RPM), medium (2500-3500RPM), high (>3500RPM). Ambient_Temp: low (<25 degrees Celsius), medium (25 to 35 degrees Celsius), high (>35 degrees Celsius). CPU_Temp: Normal (<70 degrees Celsius), High (70 to 90 degrees Celsius), Excessively High (>90 degrees Celsius).
[0108] CPT represents the probability distribution of child nodes (results) when a specific combination of parent nodes (causes) is taken. For example, the probability of the result for CPU_Temp is shown in Table 2:
[0109] Table 2
[0110]
[0111] When performing maximum likelihood estimation, we count the number of occurrences of each value of the child node under each parent node combination, and divide the frequency by the total number of observations to obtain the conditional probability. For example, when Fan_RPM=low and Ambient_Temp=medium, we observe: CPU_Temp=normal: 80 times; CPU_Temp=high: 15 times; CPU_Temp=too high: 5 times; total number of observations: 100 times; so the conditional probability is: P(normal)=80 / 100=0.8; P(high)=15 / 100=0.15; P(too high)=5 / 100=0.05.
[0112] The reasoning principle of CPT is forward inference: given the value of a parent node, predict the probability of a child node. For example, if the fan speed is low and the ambient temperature is medium, predict the probability of the CPU temperature being normal to be 80%. Diagnostic inference: given the value of a child node, infer the posterior probability of the parent node. For example, if the CPU temperature is too high, calculate the probability of fan failure or excessive ambient temperature. CPT's forward inference directly queries the distribution of child nodes through CPT and is suitable for preventing failures. Scenario: Given the value of a parent node, predict the probability distribution of child nodes. Input: Fan_RPM = Low, Ambient_Temp = Medium; Output: CPU_Temp = Normal: 80%, High: 15%, Excessive: 5%. CPT's reverse inference is suitable for root cause identification after a failure occurs. Scenario: Given the value of a child node (such as a failure), infer the posterior probability of the parent node. Input: CPU_Temp = Excessive; Output: Probability of Fan_RPM = Low, Probability of Ambient_Temp = High, etc. In reverse reasoning, the implementation method for calculating the posterior probability for each possible parent node combination is shown in formula (3). Causal reasoning: Combining observational evidence (such as the CPU temperature is too high), by calculating the posterior probability of all nodes and the marginalization probability of each node, the most likely root cause (such as insufficient fan speed) is located.
[0113] Conditional independence test example demonstration:
[0114] Assume that we are testing whether the fan speed - Fan_RPM (X: high / low) and the CPU temperature - CPU_Temp (Y: normal / too high) are independent. The collected data is shown in Table 3:
[0115] Table 3
[0116]
[0117] Calculate expected frequency , =50×60 / 100=30; =50×40 / 100=20; =50×60 / 100=30; =50×40 / 100=20.
[0118] Calculate the contribution of each cell:
[0119] .
[0120] .
[0121] .
[0122] .
[0123] calculate value, .
[0124] , looking at the chi-square distribution table, the significance level α=0.05, and the chi-square critical value with 1 degree of freedom is 3.841.
[0125] Calculated The null hypothesis is rejected, indicating that the fan speed and CPU temperature are not independent.
[0126] A machine (server) malfunctioned during operation: CPU_Temp = 95 degrees Celsius, the CPU temperature was too high, triggering causal reasoning.
[0127] Taking the causal graph as an example, CPU_Temp, whose parent nodes are Fan_RPM and Ambient_Temp, the CPT table is shown in Table 4:
[0128] Table 4
[0129]
[0130] The goal is to calculate the probability of the root cause of high CPU, that is and .
[0131]
[0132] Where, f is any one of the low, medium, and high values of Fan_RPM, and a is any one of the low, medium, and high values of Ambient_Temp. is the posterior probability, is the likelihood probability, and are the prior probabilities respectively.
[0133] The following refers to CPU (CPU_Temp), Fan (Fan_RPM), and Ambient (Ambient_Temp).
[0134] 1. Likelihood probability, : Get from CPT table. For example, when Fan=Low and Ambient=Medium, .
[0135] 2. Prior probability, , calculated from the input historical data. In the historical data, the probability of Fan=low is 20%, and the probability of Ambient=medium is 50%.
[0136] 3. Joint likelihood, that is, the molecular part is:
[0137] .
[0138] 4. Calculate the marginal probability. When calculating the marginal probability (denominator), sum all possible parent node combinations: .
[0139] Example calculations (assuming only the following combinations exist) are shown in Table 5:
[0140]
[0141] The calculated total contribution value is 0.0166, and the posterior probability of each combination is shown in Table 6:
[0142] Table 6
[0143]
[0144] Verification sum: 0.301+0.361+0.301+0.036≈1.0.
[0145] The marginalization calculation of the posterior probability of a single parent node is:
[0146]
[0147] in, is the likelihood probability.
[0148] 0.301(Ambient=Medium)+0.361(Ambient=High)=0.662.
[0149] So when all states of Fan have the posterior probability as shown in Table 7:
[0150]
[0151] Similarly, the posterior probability of Ambient_Temp is calculated as shown in Table 8:
[0152] Table 8
[0153]
[0154] Final comparison: Fan=Low contributes 66.2%, Ambient=High contributes 36.1%.
[0155] Improve the accuracy and efficiency of fault location. Multi-source data fusion: Integrate hardware (BMC), software logs, and network metrics to avoid the limitations of a single data source in traditional methods and comprehensively capture fault correlations. Causal reasoning-driven: Use causal graphs to explore causal relationships between variables, distinguish symptoms from root causes, and reduce misjudgments (such as attributing a high CPU temperature to a fan failure rather than ambient temperature). Real-time reasoning: Respond to fault events within seconds, significantly reducing mean time to repair. Reduce operation and maintenance costs and risks. Reduce false alarms: Use causal reasoning to filter out false associations and avoid invalid alarms caused by unreasonable threshold settings. Predictive maintenance: Use probabilistic models to predict potential failures (such as fan life reduction) and trigger preventive maintenance in advance.
[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0157] The embodiment of the present application also provides a fault location device, Figure 5 A schematic diagram of the structure of a fault location device provided in an embodiment of the present application is shown in FIG. Figure 5 Shown, including:
[0158] An acquisition unit 31 is configured to acquire historical operation data of the server in the event of a server failure; the historical operation data includes at least two of hardware operation data, software operation data, and network operation data;
[0159] A first analysis unit 32 is configured to analyze the causal relationship between different historical operation data to obtain the causal relationship between the different historical operation data;
[0160] The second analysis unit 33 is configured to perform fault location analysis on the cause-effect relationship to obtain a fault location result of the server.
[0161] Through this application, by obtaining the historical operation data of the server, which includes at least two of the hardware operation data, software operation data, and network operation data, and performing causal relationship analysis on the historical operation data, the mutual influence between different types of historical operation data can be revealed, helping to locate the fault more comprehensively. Through the causal relationship analysis of multi-dimensional historical operation data, the root cause of the server failure can be more accurately identified, thereby improving the accuracy of fault location. Therefore, the technical problem of low fault location accuracy can be solved, achieving the technical effect of improving the accuracy of fault location.
[0162] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the acquisition unit 31 is further used for:
[0163] Get the historical operation data to be processed;
[0164] The processing preprocesses the historical operation data to be processed to obtain the historical operation data; the preprocessing includes at least one of time alignment, mean calculation, variance calculation, change rate calculation and conversion of non-numerical data into numerical data.
[0165] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the first analysis unit 32 includes:
[0166] A definition module 321 is used to define variables of different historical operation data to obtain variables of different historical operation data;
[0167] The testing module 322 is used to perform conditional independence tests between different variables to obtain independence results between different variables;
[0168] The determination module 323 is used to determine the causal relationship between different variables based on the independence result, and determine the causal relationship between different variables as the causal relationship between historical operation data corresponding to different variables.
[0169] Furthermore, in a possible implementation of this embodiment, the testing module 322 is further configured to:
[0170] Obtain a condition set of at least two variables among different variables; the condition set is all variables except at least two variables among different variables;
[0171] In the direction of increasing number of variables in the conditional set, use the variables in the conditional set to perform conditional independence tests on at least two variables until the target variable with the least number of variables in the conditional set that causes at least two variables to be independent is found;
[0172] Identify the target variable as the independent outcome of at least two variables.
[0173] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the determination module 323 is further used to:
[0174] Establish a causal relationship between the target variable and at least two variables; in the causal relationship, the target variable is the cause and at least two variables are the effects.
[0175] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the test module 322 is further used to:
[0176] Obtaining first historical operating data corresponding to a variable in a condition set in the historical operating data, obtaining second historical operating data corresponding to at least two variables, and obtaining a critical value of the second historical operating data;
[0177] Based on the first historical operation data, the second historical operation data is divided into at least two data sets; each data set contains at least one second historical operation data;
[0178] Calculating statistics on at least two data sets to obtain statistics of at least two data sets;
[0179] Determine whether at least two variables are independent based on how the statistic compares to the critical value.
[0180] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the test module 322 is further used to:
[0181] When the statistic is greater than or equal to the critical value, it is determined that at least two variables are not independent;
[0182] When the statistic is less than the critical value, it is determined that at least two variables are independent.
[0183] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the test module 322 is further used to:
[0184] Obtaining observed frequencies of at least two data sets and obtaining expected frequencies of at least two data sets; the observed frequencies are the frequencies of the same second historical running data in the at least two data sets; and the expected frequencies are the independent theoretical frequencies between the second historical running data;
[0185] Calculate the statistics of the observed frequency and expected frequency to obtain the statistics.
[0186] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the test module 322 is further used to:
[0187] Calculate the quotient of the observed frequency and the expected frequency to obtain the quotient result;
[0188] Perform logarithmic calculation on the quotient result to obtain a logarithmic result;
[0189] The product of the logarithmic result and the observed frequency is calculated to obtain the statistic.
[0190] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the second analysis unit 33 is further used for:
[0191] Obtain the conditional probability table of causal relationship, as well as the marginal probability and prior probability of causal relationship; the conditional probability table includes the conditional probability of the effect when the cause is in different states in the causal relationship;
[0192] Determine the conditional probability as the likelihood probability of the corresponding causal relationship;
[0193] Calculate the posterior probability of the likelihood probability, prior probability and corresponding likelihood probability to obtain the posterior probability of causality;
[0194] The cause in the causal relationship corresponding to the maximum value in the posterior probability is determined as the fault location result.
[0195] Furthermore, in a possible implementation of this embodiment, as Figure 6 As shown, the second analysis unit 33 is further used for:
[0196] Calculate the product of likelihood probability and prior probability to obtain the product result;
[0197] The quotient of the product result and the marginal probability is calculated to obtain the posterior probability.
[0198] For the description of the features in the embodiment corresponding to the fault location device, reference can be made to the relevant description of the embodiment corresponding to the fault location method, which will not be repeated here.
[0199] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned fault location method embodiments.
[0200] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned fault location method embodiments when running.
[0201] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0202] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned fault location method embodiments are implemented.
[0203] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned fault location method embodiments are implemented.
[0204] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0205] The above is a detailed introduction to a fault location method and device, electronic device and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A fault location method, characterized in that: include: In the event of a server failure, obtaining historical operating data of the server; The historical operation data includes at least two of hardware operation data, software operation data and network operation data; Performing causal relationship analysis on different historical operation data to obtain causal relationships between different historical operation data; Performing fault location analysis on the causal relationship to obtain a fault location result of the server; The performing of causal relationship analysis on different historical operation data to obtain the causal relationship between different historical operation data includes: Defining variables for different historical operation data to obtain different variables for the historical operation data; Performing a conditional independence test between different variables to obtain independence results between the different variables; Determining the causal relationship between the different variables based on the independence result, and determining the causal relationship between the different variables as the causal relationship between the historical operation data corresponding to the different variables; The performing of the conditional independence test on different variables to obtain the independence results between the different variables includes: Obtaining a condition set of at least two variables among the different variables; the condition set is all variables among the different variables except the at least two variables; performing a conditional independence test on the at least two variables using the variables in the condition set in a direction of increasing number of variables in the condition set until a target variable having the least number of variables in the condition set that causes the at least two variables to be independent is found; The target variable is determined as an independence result of the at least two variables.
2. The fault location method according to claim 1, characterized in that: The acquiring of historical operation data of the server includes: Get the historical operation data to be processed; The historical operation data to be processed is preprocessed to obtain the historical operation data; the preprocessing includes at least one of time alignment, mean calculation, variance calculation, rate of change calculation, and conversion of non-numerical data into numerical data.
3. The fault location method according to claim 1, wherein: Determining the causal relationship between the different variables according to the independence result includes: A causal relationship is established between the target variable and the at least two variables; in the causal relationship, the target variable is the cause and the at least two variables are the effects.
4. The fault location method according to claim 1, characterized in that: The performing a conditional independence test on the at least two variables using the variables in the condition set includes: Obtaining first historical operating data corresponding to a variable in the condition set in the historical operating data, obtaining second historical operating data corresponding to the at least two variables, and obtaining a critical value of the second historical operating data; Based on the first historical operation data, the second historical operation data is divided into at least two data sets; each data set contains at least one second historical operation data; Calculating statistics on the at least two data sets to obtain statistics of the at least two data sets; Whether the at least two variables are independent is determined based on a comparison between the statistic and the critical value.
5. The fault location method according to claim 4, characterized in that: The determining, based on the comparison between the statistic and the critical value, whether the at least two variables are independent comprises: If the statistic is greater than or equal to the critical value, it is determined that the at least two variables are not independent; If the statistic is less than the critical value, it is determined that the at least two variables are independent.
6. The fault location method according to claim 4, characterized in that: The performing statistical calculation on the at least two data sets to obtain the statistics of the at least two data sets includes: Obtaining observed frequencies of the at least two data sets and obtaining expected frequencies of the at least two data sets; the observed frequencies are frequencies of identical second historical operating data in the at least two data sets; and the expected frequencies are independent theoretical frequencies between the second historical operating data; Calculating statistics on the observed frequency and the expected frequency to obtain the statistics.
7. The fault location method according to claim 6, characterized in that: The statistical calculation of the observed frequency and the expected frequency to obtain the statistical quantity includes: Calculating a quotient of the observed frequency and the expected frequency to obtain a quotient result; Performing logarithmic calculation on the quotient result to obtain a logarithmic result; The product of the logarithmic result and the observed frequency is calculated to obtain the statistic.
8. The fault location method according to claim 1, characterized in that: The performing fault location analysis on the causal relationship to obtain a fault location result of the server includes: Obtaining a conditional probability table of the causal relationship, and obtaining the marginal probability of the causal relationship and the prior probability of the causal relationship; the conditional probability table includes the conditional probabilities of the effects when the cause in the causal relationship is in different states; Determining the conditional probability as the likelihood probability of the corresponding causal relationship; Performing a posterior probability calculation on the likelihood probability, the prior probability, and the corresponding likelihood probability to obtain a posterior probability of the causal relationship; The cause in the causal relationship corresponding to the maximum value in the posterior probability is determined as the fault location result.
9. The fault location method according to claim 8, characterized in that: The performing a posterior probability calculation on the likelihood probability, the prior probability, and the corresponding likelihood probability to obtain the posterior probability of the causal relationship includes: Calculating the product of the likelihood probability and the prior probability to obtain a product result; A quotient is calculated for the product value result and the marginal probability to obtain the posterior probability.
10. A fault location device, characterized in that: include: An acquisition unit, configured to acquire historical operation data of a server in the event of a server failure; The historical operation data includes at least two of hardware operation data, software operation data and network operation data; a first analyzing unit, configured to perform causal relationship analysis on different historical operation data to obtain causal relationships between different historical operation data; a second analyzing unit, configured to perform fault location analysis on the causal relationship to obtain a fault location result of the server; Wherein, the first analysis unit is further used for: Defining variables for different historical operation data to obtain different variables for the historical operation data; Performing a conditional independence test between different variables to obtain independence results between the different variables; Determining the causal relationship between the different variables based on the independence result, and determining the causal relationship between the different variables as the causal relationship between the historical operation data corresponding to the different variables; Wherein, the first analysis unit is further used for: Obtaining a condition set of at least two variables among the different variables; the condition set is all variables among the different variables except the at least two variables; performing a conditional independence test on the at least two variables using the variables in the condition set in a direction of increasing number of variables in the condition set until a target variable having the least number of variables in the condition set that causes the at least two variables to be independent is found; The target variable is determined as an independence result of the at least two variables.
11. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the fault location method according to any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the fault location method according to any one of claims 1 to 9.
13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the fault location method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Fault positioning method for Web application system
CN101394314A
Fault root cause positioning method and device and related product
CN119520247A