Fault diagnosis method, device, equipment and medium
By obtaining multiple log files and keywords for server failures, determining the fault level and calculating the correlation degree, the problem of inaccurate diagnosis of single log files in the existing technology is solved, and more accurate fault detection is achieved.
Patent Information
- Application Number
- CN202210764712.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-07-01
AI Technical Summary
Existing server fault diagnosis methods usually rely only on a single log file, resulting in inaccurate fault detection results and ineffective association of all log files.
By obtaining multiple log files and fault keywords corresponding to the fault, determining the fault level, selecting the main log file, and determining the correlation degree based on the support and confidence of the main log file and non-master log file, and finally troubleshooting is performed.
It realizes the association of multiple log files for server failure, improves the accuracy of fault detection results, and avoids the error of single log file diagnosis.
Smart Images

Figure CN115114070B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a fault diagnosis method, apparatus, device, and medium. Background Art
[0002] With the continuous development of the big data era, the storage demand for servers is increasing. Therefore, in order to ensure the normal operation of the server, the daily operation and maintenance of the server has become increasingly important. Technical personnel generally need to perform operation and maintenance based on the various log files generated by the server. When a server fails, there will be some log files in all the log files that are not related to the server failure. These log files cannot be used for server operation and maintenance; and when a server fails, there are generally multiple log files corresponding to the failure. The existing method of diagnosing server failures generally finds multiple log files corresponding to the server failure and only diagnoses the failure based on one of the log files. This method cannot associate all the log files corresponding to the server failure, resulting in inaccurate fault detection results.
[0003] In view of the above problems, finding out how to obtain accurate fault detection results is a problem that those skilled in the art strive to solve. Summary of the Invention
[0004] The purpose of this application is to provide a fault diagnosis method, apparatus, device and medium for obtaining accurate fault detection results.
[0005] To solve the above technical problems, the present application provides a fault diagnosis method, comprising:
[0006] Obtain multiple log files and fault keywords corresponding to the fault;
[0007] Determine the fault levels of multiple log files based on fault keywords;
[0008] determining a primary log file of a fault from among the multiple log files according to the fault level;
[0009] Determining the relevance of each non-primary log file to the primary log file based on the fault information in the primary log file, wherein the relevance is determined by the support and confidence of each non-primary log file relative to the primary log file;
[0010] The fault is diagnosed based on the correlation.
[0011] Preferably, determining the main log file of the fault from the multiple log files according to the fault level includes:
[0012] Setting a level weighting rule according to the fault level, wherein the level weighting rule specifies the level weight value corresponding to each fault level;
[0013] Determine the total level weight value of multiple log files according to the level weighting rule;
[0014] Get the maximum value of the total grade weight in the total grade weight value;
[0015] The log file corresponding to the maximum total level weight is determined as the main log file.
[0016] Preferably, determining the relevance of each non-primary log file to the primary log file according to the fault information in the primary log file includes:
[0017] Obtain error information corresponding to the fault information in each non-primary log file;
[0018] Record the duration of error messages in each non-primary log file;
[0019] Perform weighted processing on the error reporting information according to the error reporting duration;
[0020] The correlation degree is determined based on the error information after weighted processing of the error reporting duration.
[0021] Preferably, performing weighted processing on the error reporting information according to the error reporting duration includes:
[0022] Generate an error reporting duration weighting rule based on the error reporting duration, wherein the error reporting duration weighting rule specifies the error reporting duration weight value corresponding to each error reporting duration;
[0023] The error information is weighted according to the error reporting duration weighting rule.
[0024] Preferably, after performing weighted processing on the error reporting information according to the error reporting duration, and before determining the correlation degree according to the error reporting information after the weighted processing on the error reporting duration, the method further includes:
[0025] Get the number of occurrences of the fault level in each non-primary log file;
[0026] The weight value of each non-primary log file is determined according to the number of times, the level weight value, and the error reporting duration weight value to determine the relevance.
[0027] Preferably, when the correlation degree is the support degree, determining the correlation degree between each non-primary log file and the primary log file according to the fault information in the primary log file includes:
[0028] Determine the total weight value according to the weight value of each non-primary log file;
[0029] The support degree corresponding to each non-primary log file is determined according to the weight value of each non-primary log file and the total weight value.
[0030] Preferably, when the relevance is a confidence level, determining the relevance of each non-primary log file to the primary log file according to the fault information in the primary log file includes:
[0031] The confidence level corresponding to each non-primary log file is determined according to the weight value of each non-primary log file and the maximum value of the total level weight.
[0032] Preferably, after determining the support degree corresponding to each non-primary log file according to the weight value of each non-primary log file and the total weight value, the method further includes:
[0033] Determine whether the support reaches the preset support;
[0034] If yes, then proceed to the step of diagnosing the fault according to the correlation degree;
[0035] If not, return to the step of obtaining multiple log files and fault keywords corresponding to the fault.
[0036] Preferably, after determining the confidence level corresponding to each non-primary log file according to the weight value of each non-primary log file and the maximum value of the total level weight, the method further includes:
[0037] Determine whether the confidence level reaches a preset confidence level;
[0038] If yes, then proceed to the step of diagnosing the fault according to the correlation degree;
[0039] If not, return to the step of obtaining multiple log files and fault keywords corresponding to the fault.
[0040] To solve the above technical problems, the present application also provides a fault diagnosis device, comprising:
[0041] A first acquisition module is used to acquire multiple log files and fault keywords corresponding to the fault;
[0042] A first determining module is used to determine the fault levels of multiple log files according to the fault keyword;
[0043] A second determining module is used to determine a primary log file of a fault from a plurality of log files according to a fault level;
[0044] a third determining module, configured to determine a correlation between each non-primary log file and the primary log file based on the fault information in the primary log file, wherein the correlation is determined by a support and a confidence of each non-primary log file relative to the primary log file;
[0045] The diagnosis module is used to diagnose faults based on the correlation degree.
[0046] In addition, the fault diagnosis device also includes the following modules:
[0047] A setting module is used to set a level weighting rule according to the fault level, wherein the level weighting rule specifies the level weight value corresponding to each fault level;
[0048] A fourth determination module is used to determine a total grade weight value of the plurality of log files according to a grade weighting rule;
[0049] The second acquisition module is used to obtain the maximum value of the total grade weight from the total grade weight values;
[0050] A fifth determining module is used to determine the log file corresponding to the maximum total level weight as the main log file;
[0051] The third acquisition module is used to obtain error information corresponding to the fault information in each non-primary log file;
[0052] The recording module is used to record the error duration of the error information in each non-primary log file;
[0053] A first error reporting duration weighted processing module is used to perform error reporting duration weighted processing on error reporting information according to the error reporting duration;
[0054] A sixth determining module, configured to determine a correlation degree based on the error information after weighted processing of the error reporting duration;
[0055] A generating module, configured to generate an error reporting duration weighting rule according to the error reporting duration, wherein the error reporting duration weighting rule specifies an error reporting duration weight value corresponding to each error reporting duration;
[0056] The second error reporting duration weighted processing module is used to perform weighted processing on the error reporting information according to the error reporting duration weighted rule;
[0057] A fourth acquisition module is used to obtain the number of occurrences of the fault level in each non-primary log file;
[0058] a seventh determination module, configured to determine a weight value of each non-primary log file according to the number of occurrences, the level weight value, and the error reporting duration weight value, so as to determine a correlation degree;
[0059] an eighth determining module, configured to determine a total weight value according to the weight values of the non-primary log files;
[0060] a ninth determining module, configured to determine the support corresponding to each non-primary log file according to the weight value of each non-primary log file and the total weight value;
[0061] a tenth determination module, configured to determine the confidence level corresponding to each non-primary log file according to the weight value of each non-primary log file and the maximum value of the total level weight;
[0062] The first judgment module is used to judge whether the support degree reaches the preset support degree;
[0063] If so, enter the diagnostic module;
[0064] If not, return to the first acquisition module;
[0065] The second judgment module is used to judge whether the confidence level reaches a preset confidence level;
[0066] If so, enter the diagnostic module;
[0067] If not, return to the first acquisition module.
[0068] To solve the above technical problems, the present application also provides a fault diagnosis device, comprising:
[0069] Memory for storing computer programs;
[0070] The processor is used to point to the computer program to implement the steps of the fault diagnosis method.
[0071] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of all the above fault diagnosis methods are implemented.
[0072] The present application provides a fault diagnosis method, which includes: obtaining multiple log files and fault keywords corresponding to the fault; determining the fault level of the multiple log files based on the fault keywords; determining the main log file of the fault from the multiple log files based on the fault level; determining the correlation between each non-main log file and the main log file based on the fault information in the main log file, wherein the correlation is determined by the support and confidence of each non-main log file relative to the main log file; and diagnosing the fault based on the correlation. First, multiple log files are obtained, which avoids diagnosing only one log file and improves the accuracy of the diagnosis result; in addition, the fault level is determined by the fault keyword, the main log file is determined, and the support and confidence between the main log file and each non-main log file are determined. At this time, all log files of the server fault are associated, further improving the accuracy of the diagnosis result.
[0073] The present application also provides a fault diagnosis device, equipment and medium, with the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] 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.
[0075] Figure 1 A flow chart of a fault diagnosis method provided in an embodiment of the present application;
[0076] Figure 2 A structural diagram of a fault diagnosis device provided in an embodiment of the present application;
[0077] Figure 3 A structural diagram of a fault diagnosis device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0078] 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.
[0079] The core of this application is to provide a fault diagnosis method, apparatus, device and medium, which can obtain accurate fault detection results.
[0080] 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.
[0081] Figure 1 This is a flow chart of a fault diagnosis method provided by an embodiment of the present application. Figure 1 As shown, the fault diagnosis method includes:
[0082] S10: Acquire multiple log files and fault keywords corresponding to the fault.
[0083] It should be noted that the technician needs to disassemble the faulty server. During the disassembly process, the technician will directly collect multiple log files corresponding to the server failure. It is understood that the technician can collect log files by copying the log files to a mobile hard drive, portable disk, USB flash drive, or other storage device. It should be noted that the technician can also connect an IIC interface to the server to collect log files through the IIC interface. In this embodiment, there is no limitation on how the technician collects log files or what device is used. The implementation method can be determined based on the technician's preferences, habits, and implementation scenario.
[0084] It is understood that during the server disassembly process, technicians can use their own experience and the server's fault notification device to determine the cause, type, and fault keywords of the server failure. It is also understood that the log file and fault keywords will eventually need to be uploaded to a device or system with feedback capabilities.
[0085] S11: Determine the fault levels of the multiple log files according to the fault keywords.
[0086] The main log file for determining the fault from multiple log files according to the fault level includes:
[0087] Setting a level weighting rule according to the fault level, wherein the level weighting rule specifies the level weight value corresponding to each fault level;
[0088] Determine the total level weight value of multiple log files according to the level weighting rule;
[0089] Get the maximum value of the total grade weight in the total grade weight value;
[0090] The log file corresponding to the maximum total level weight is determined as the main log file.
[0091] In this embodiment, the fault level is divided into three levels, namely the first fault level, the second fault level, and the third fault level, and the first fault level, the second fault level, and the third fault level can be defined as warning, serious, and error, wherein the importance of the first fault level, the second fault level, and the third fault level is increased in sequence, that is, the first fault level < the second fault level < the third fault level. When the fault level is a warning (first fault level), the first level weight value is set; when the fault level is a serious (second fault level), the second level weight value is set; when the fault level is an error (third fault level), the third level weight value is set. As an optimal embodiment, the first level weight value, the second level weight value, and the third level weight value are set to 1.5, 1.0, and 0.3, respectively. The first level weight value, the second level weight value, and the third level weight value are respectively recorded as e1, e2, and e3, and the first level weight value, the second level weight value, and the third level weight value are all recorded as e i .
[0092] The calculation formula of the total grade weight value is as follows:
[0093]
[0094] Among them, G i The number of issues corresponding to server failures. The log file with the highest total weight is determined as the primary log file. The rest are non-primary log files.
[0095] S12: Determine a main log file of the fault from the multiple log files according to the fault level.
[0096] S13: Determine the relevance of each non-primary log file to the primary log file according to the fault information in the primary log file.
[0097] The relevance is determined by the support and confidence of each non-primary log file relative to the primary log file.
[0098] S14: Diagnose the fault according to the correlation degree.
[0099] The present application provides a fault diagnosis method, which includes: obtaining multiple log files and fault keywords corresponding to the fault; determining the fault level of the multiple log files based on the fault keywords; determining the main log file of the fault from the multiple log files based on the fault level; determining the correlation between each non-main log file and the main log file based on the fault information in the main log file, wherein the correlation is determined by the support and confidence of each non-main log file relative to the main log file; and diagnosing the fault based on the correlation. First, multiple log files are obtained, which avoids diagnosing only one log file and improves the accuracy of the diagnosis result; in addition, the fault level is determined by the fault keyword, the main log file is determined, and the support and confidence between the main log file and each non-main log file are determined. At this time, all log files of the server fault are associated, further improving the accuracy of the diagnosis result.
[0100] Based on the above embodiment, as a more preferred embodiment, determining the relevance of each non-primary log file with the primary log file according to the fault information in the primary log file includes:
[0101] Obtain error information corresponding to the fault information in each non-primary log file;
[0102] Record the duration of error messages in each non-primary log file;
[0103] Perform weighted processing on the error reporting information according to the error reporting duration;
[0104] The correlation degree is determined based on the error information after weighted processing of the error reporting duration.
[0105] The weighted processing of the error reporting duration on the error reporting information according to the error reporting duration includes:
[0106] Generate an error reporting duration weighting rule based on the error reporting duration, wherein the error reporting duration weighting rule specifies the error reporting duration weight value corresponding to each error reporting duration;
[0107] The error information is weighted according to the error reporting duration weighting rule.
[0108] During a server failure, there are many log files recording the failure. Therefore, the main log file will record the failure information related to the failure, and the other non-main log files will also record the error information related to the failure for a certain period of time.
[0109] The formula for the error duration weight value corresponding to each error duration specified in the error duration weighting rule is as follows:
[0110]
[0111] Among them, t represents the error reporting duration; min and h represent the time units, which are minutes and hours respectively.
[0112] After performing weighted processing on the error reporting information according to the error reporting duration, and before determining the relevance based on the error reporting information after the weighted processing on the error reporting duration, the method further includes:
[0113] Get the number of times the fault level appears in each non-primary log file; record this number as count i .
[0114] According to the number of count i , level weight value e i , the error reporting duration weight value w determines the weight value f of each non-primary log file to determine the correlation degree.
[0115] The calculation formula for the weight value f of each non-primary log file is as follows:
[0116]
[0117] In this embodiment, the number of times the fault level appears in each non-primary log file is counted i , level weight value e i , the error reporting duration weight value w, associates each non-primary log file with the primary log file, thereby associating all log files of the server failure and improving the accuracy of the diagnosis result.
[0118] Based on the above embodiment, as a more preferred embodiment, when the relevance is support, determining the relevance of each non-primary log file with the primary log file based on the fault information in the primary log file includes:
[0119] Determine the total weight value according to the weight value of each non-primary log file;
[0120] The support degree corresponding to each non-primary log file is determined according to the weight value of each non-primary log file and the total weight value.
[0121] Among them, the weight value of each non-primary log file can also be expressed as P(A∪B). It should be noted that, The total weight value is denoted as P(all).
[0122] Then, support The formula is as follows:
[0123]
[0124] After determining the support degree corresponding to each non-primary log file according to the weight value of each non-primary log file and the total weight value, the method further includes:
[0125] Determine whether the support reaches the preset support;
[0126] If yes, then go to step S14: diagnose the fault according to the correlation degree;
[0127] If not, the process returns to step S10: obtaining multiple log files and fault keywords corresponding to the fault.
[0128] In this embodiment, the preset support can be set to any percentage. As a preferred embodiment, the preset support can be set to 60%. When the preset support is reached, the fault can be diagnosed. The diagnosis can be performed using diagnostic equipment, devices, etc., which is not limited in this embodiment and can be determined based on the specific implementation scenario, thereby further improving the accuracy of the diagnostic results.
[0129] Based on the above embodiment, as a more preferred embodiment, when the relevance is a confidence level, determining the relevance of each non-primary log file with the primary log file based on the fault information in the primary log file includes:
[0130] The confidence level corresponding to each non-primary log file is determined according to the weight value of each non-primary log file and the maximum value of the total level weight.
[0131] Among them, the maximum value of the total grade weight is expressed as P(A).
[0132] Then, the confidence The formula is as follows:
[0133]
[0134] After determining the confidence level corresponding to each non-primary log file according to the weight value of each non-primary log file and the maximum value of the total level weight, the method further includes:
[0135] Determine whether the confidence level reaches a preset confidence level;
[0136] If yes, then go to step S14: diagnose the fault according to the correlation degree;
[0137] If not, the process returns to step S10: obtaining multiple log files and fault keywords corresponding to the fault.
[0138] In this embodiment, the preset confidence level can be set to any percentage. As a preferred embodiment, the preset confidence level can be set to 60%. When the preset confidence level is reached, the fault can be diagnosed. The diagnosis can be performed using a device or component with diagnostic capabilities, etc., which is not limited in this embodiment and can be determined based on the specific implementation scenario, thereby further improving the accuracy of the diagnostic results.
[0139] In the above embodiments, the fault diagnosis method is described in detail. This application also provides corresponding embodiments of the fault diagnosis device. It should be noted that this application describes the embodiments of the device from two perspectives: one is based on the functional module perspective, and the other is based on the hardware perspective.
[0140] Figure 2 This is a structural diagram of a fault diagnosis device provided in an embodiment of the present application. Figure 2 As shown, the present application also provides a fault diagnosis device, comprising:
[0141] A first acquisition module 20 is used to acquire multiple log files and fault keywords corresponding to the fault;
[0142] A first determining module 21 is configured to determine the fault levels of multiple log files based on the fault keyword;
[0143] A second determining module 22 is configured to determine a primary log file of a fault from a plurality of log files according to a fault level;
[0144] A third determining module 23 is configured to determine the relevance of each non-primary log file with the primary log file based on the fault information in the primary log file, wherein the relevance is determined by the support and confidence of each non-primary log file relative to the primary log file;
[0145] The diagnosis module 24 is used to diagnose the fault according to the correlation degree.
[0146] In addition, the fault diagnosis device also includes the following modules:
[0147] A setting module is used to set a level weighting rule according to the fault level, wherein the level weighting rule specifies the level weight value corresponding to each fault level;
[0148] A fourth determination module is used to determine a total grade weight value of the plurality of log files according to a grade weighting rule;
[0149] The second acquisition module is used to obtain the maximum value of the total grade weight from the total grade weight values;
[0150] A fifth determining module is used to determine the log file corresponding to the maximum total level weight as the main log file;
[0151] The third acquisition module is used to obtain error information corresponding to the fault information in each non-primary log file;
[0152] The recording module is used to record the error duration of the error information in each non-primary log file;
[0153] A first error reporting duration weighted processing module is used to perform error reporting duration weighted processing on error reporting information according to the error reporting duration;
[0154] A sixth determining module, configured to determine a correlation degree based on the error information after weighted processing of the error reporting duration;
[0155] A generating module, configured to generate an error reporting duration weighting rule according to the error reporting duration, wherein the error reporting duration weighting rule specifies an error reporting duration weight value corresponding to each error reporting duration;
[0156] The second error reporting duration weighted processing module is used to perform weighted processing on the error reporting information according to the error reporting duration weighted rule;
[0157] A fourth acquisition module is used to obtain the number of occurrences of the fault level in each non-primary log file;
[0158] a seventh determination module, configured to determine a weight value of each non-primary log file according to the number of occurrences, the level weight value, and the error reporting duration weight value, so as to determine a correlation degree;
[0159] an eighth determining module, configured to determine a total weight value according to the weight values of the non-primary log files;
[0160] a ninth determining module, configured to determine the support corresponding to each non-primary log file according to the weight value of each non-primary log file and the total weight value;
[0161] a tenth determination module, configured to determine the confidence level corresponding to each non-primary log file according to the weight value of each non-primary log file and the maximum value of the total level weight;
[0162] The first judgment module is used to judge whether the support degree reaches the preset support degree;
[0163] If so, enter the diagnostic module;
[0164] If not, return to the first acquisition module;
[0165] The second judgment module is used to judge whether the confidence level reaches a preset confidence level;
[0166] If so, enter the diagnostic module;
[0167] If not, return to the first acquisition module.
[0168] The present application provides a fault diagnosis method, which includes: obtaining multiple log files and fault keywords corresponding to the fault; determining the fault level of the multiple log files based on the fault keywords; determining the main log file of the fault from the multiple log files based on the fault level; determining the correlation between each non-main log file and the main log file based on the fault information in the main log file, wherein the correlation is determined by the support and confidence of each non-main log file relative to the main log file; and diagnosing the fault based on the correlation. First, multiple log files are obtained, which avoids diagnosing only one log file and improves the accuracy of the diagnosis result; in addition, the fault level is determined by the fault keyword, the main log file is determined, and the support and confidence between the main log file and each non-main log file are determined. At this time, all log files of the server fault are associated, further improving the accuracy of the diagnosis result.
[0169] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.
[0170] Figure 3 A structural diagram of a fault diagnosis device provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the fault diagnosis equipment includes:
[0171] Memory 30, for storing computer programs;
[0172] The processor 31 is configured to implement the steps of the fault diagnosis method mentioned in the above embodiment when executing a computer program.
[0173] The fault diagnosis device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0174] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0175] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor 31, it can implement the relevant steps of the fault diagnosis method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 30 may also include an operating system and data, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include but is not limited to fault diagnosis methods, etc.
[0176] In some embodiments, the fault diagnosis device may further include a display screen, an input and output interface, a communication interface, a power supply, and a communication bus.
[0177] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation to the fault diagnosis device, and may include more or fewer components than those shown in the figure.
[0178] The fault diagnosis device provided in the embodiment of the present application includes a memory 30 and a processor 31. When the processor 31 executes the program stored in the memory 30, it can implement a fault diagnosis method.
[0179] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiment.
[0180] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory), ROM, random access memory (Random Access Memory, RAM), disk or optical disk, and other media that can store program code.
[0181] The above is a detailed introduction to a fault diagnosis method, device, equipment and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this 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 this application.
[0182] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A fault diagnosis method, characterized in that: include: Obtain multiple log files and fault keywords corresponding to the fault; determining the fault levels of the plurality of log files according to the fault keyword; The fault levels are divided into three levels: warning, serious, and error, and corresponding level weight values are set for each level; determining a primary log file of the fault from the plurality of log files according to the fault level; Determining, based on the fault information in the primary log file, a degree of association between each non-primary log file and the primary log file, wherein the degree of association is determined by a support degree and a confidence degree of each non-primary log file relative to the primary log file; diagnosing the fault according to the correlation degree; Wherein, determining the main log file of the fault from the plurality of log files according to the fault level includes: Setting a level weighting rule according to the fault level, wherein the level weighting rule specifies a level weight value corresponding to each fault level; Determining a total grade weight value of the plurality of log files according to the grade weighting rule; Obtaining a maximum total grade weight value from the total grade weight values; Determine the log file corresponding to the maximum value of the total level weight as the primary log file; Determining the relevance of each non-primary log file to the primary log file according to the fault information in the primary log file includes: Acquire error information corresponding to the fault information in each of the non-primary log files; Recording the duration of the error message appearing in each of the non-primary log files; Generating an error reporting duration weighting rule according to the error reporting duration, wherein the error reporting duration weighting rule specifies an error reporting duration weight value corresponding to each error reporting duration; Performing weighted processing on the error reporting information according to the error reporting duration weighted rule; Obtain the number of occurrences of the fault level in each of the non-primary log files; The weight value of each of the non-primary log files is determined according to the number of times, the level weight value, and the error reporting duration weight value, so as to determine the correlation degree.
2. The fault diagnosis method according to claim 1, characterized in that: When the correlation degree is the support degree, determining the correlation degree between each non-primary log file and the primary log file according to the fault information in the primary log file includes: Determine a total weight value according to the weight value of each of the non-primary log files; The support degree corresponding to each of the non-primary log files is determined according to the weight value of each of the non-primary log files and the total weight value.
3. The fault diagnosis method according to claim 1, characterized in that: When the correlation degree is the confidence degree, determining the correlation degree between each non-primary log file and the primary log file according to the fault information in the primary log file includes: The confidence level corresponding to each non-primary log file is determined according to the weight value of each non-primary log file and the maximum total level weight.
4. The fault diagnosis method according to claim 2, characterized in that: After determining the support degree corresponding to each non-primary log file according to the weight value of each non-primary log file and the total weight value, the method further includes: Determining whether the support reaches a preset support; If so, proceeding to the step of diagnosing the fault according to the correlation degree; If not, return to the step of obtaining multiple log files and fault keywords corresponding to the fault.
5. The fault diagnosis method according to claim 3, characterized in that: After determining the confidence corresponding to each non-primary log file according to the weight value of each non-primary log file and the maximum total level weight, the method further includes: Determining whether the confidence level reaches a preset confidence level; If so, proceeding to the step of diagnosing the fault according to the correlation degree; If not, return to the step of obtaining multiple log files and fault keywords corresponding to the fault.
6. A fault diagnosis device, characterized in that: include: A first acquisition module is used to acquire multiple log files and fault keywords corresponding to the fault; A first determining module, configured to determine the fault levels of the plurality of log files according to the fault keyword; The fault levels are divided into three levels: warning, serious, and error, and corresponding level weight values are set for each level; A second determining module is configured to determine a primary log file of the fault from the plurality of log files according to the fault level; a third determining module, configured to determine a correlation degree between each non-primary log file and the primary log file based on the fault information in the primary log file, wherein the correlation degree is determined by a support degree and a confidence degree of each non-primary log file relative to the primary log file; a diagnosis module, configured to diagnose the fault according to the correlation degree; The invention also includes: a setting module, configured to set a level weighting rule according to the fault level, wherein the level weighting rule specifies a level weight value corresponding to each fault level; a fourth determining module, configured to determine a total grade weight value of the plurality of log files according to the grade weighting rule; A second acquisition module is used to obtain the maximum value of the total grade weight among the total grade weight values; a fifth determining module, configured to determine the log file corresponding to the maximum value of the total level weight as the primary log file; A third acquisition module is used to obtain error information corresponding to the fault information in each of the non-primary log files; A recording module, configured to record the duration of the error message appearing in each of the non-primary log files; A first error reporting duration weighted processing module, configured to perform error reporting duration weighted processing on the error reporting information according to the error reporting duration; A sixth determining module, configured to determine a correlation degree based on the error information after weighted processing of the error reporting duration; A generating module, configured to generate an error reporting duration weighting rule according to the error reporting duration, wherein the error reporting duration weighting rule specifies an error reporting duration weight value corresponding to each error reporting duration; A second error reporting duration weighted processing module, configured to perform weighted processing on the error reporting information according to the error reporting duration weighted rule; A fourth acquisition module is used to obtain the number of occurrences of the fault level in each of the non-primary log files; The seventh determining module is configured to determine a weight value of each of the non-primary log files according to the number of times, the level weight value, and the error reporting duration weight value, so as to determine the degree of association.
7. A fault diagnosis device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the fault diagnosis method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the fault diagnosis method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and device for generating log for pressure test
CN108572914A
Fault recognition method, fault recognition device and BMC
CN110489260A
Computer system log association method and related device
CN111831528A
Log operation and maintenance root cause analysis method and device, electronic equipment and storage medium
CN112306820A