Fault handling methods and apparatus, electronic equipment and computer-readable storage media
By constructing a log template tree to automatically classify and predict database fault logs, the problem of relying on manual experience in existing troubleshooting techniques is solved, and fast and accurate fault identification and processing are achieved.
Patent Information
- Application Number
- CN202210377076.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-04-11
AI Technical Summary
In the existing technology, database fault troubleshooting relies on the historical experience of operation and maintenance engineers, resulting in low accuracy in predicting unknown types of faults, cumbersome and time-consuming manual troubleshooting processes, and a lack of analysis capabilities for the full set of MySQL fault logs.
By constructing a log template tree and using NLP technology to cluster and extract keywords from historical fault logs, a mapping between keyword sets and fault category labels is established to achieve automatic classification and prediction of real-time fault logs.
It achieves rapid identification and processing of database faults, reduces manual intervention time, improves the accuracy of prediction of unknown faults, breaks the limitations of human judgment, and realizes automation and efficiency of fault handling.
Smart Images

Figure CN114706856B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of big data technology, specifically to a fault handling method, apparatus, equipment, medium, and program product. Background Technology
[0002] In database operations and maintenance, engineers need to determine the type of database failure. Typically, they review database failure logs printed during the period of failure and troubleshoot based on historical experience. However, this method relies on past experience, has limitations in human judgment regarding failure identification, lacks accuracy in predicting unknown failure types, and is cumbersome and time-consuming. Summary of the Invention
[0003] In view of the above problems, this disclosure provides a fault handling method, apparatus, device, medium and program product.
[0004] One aspect of this disclosure provides a fault handling method, comprising:
[0005] Receive test fault log data from the database under test;
[0006] The fault log data to be tested is input into the log template tree, which includes multiple keyword sets and fault category labels corresponding to each keyword set. The multiple keyword sets are obtained by processing the target fault log data of the pre-selected fault level within a preset historical time period.
[0007] Output the fault categories of the database under test using a log template tree; and
[0008] The fault handling of the database under test is performed according to the fault category of the database under test.
[0009] According to embodiments of this disclosure, processing target fault log data of pre-selected fault levels within a preset historical time period to obtain multiple keyword sets includes:
[0010] The target fault log data is clustered using a predetermined clustering algorithm to obtain a predetermined number of log datasets;
[0011] Construct multiple keyword sets associated with a preset number of log datasets.
[0012] According to embodiments of this disclosure, clustering the target fault log data using a predetermined clustering algorithm to obtain a predetermined number of log datasets includes:
[0013] Identify multiple key words from the target fault log data;
[0014] Calculate the weights of multiple feature words;
[0015] Based on the weights of multiple feature words, a predetermined clustering algorithm is used to cluster the target fault log data to obtain a predetermined number of log datasets.
[0016] According to embodiments of this disclosure, constructing multiple keyword sets associated with a preset number of log datasets includes:
[0017] Multiple initial word sets are determined from a predetermined number of log datasets;
[0018] Stop words are removed from multiple initial word sets to obtain multiple reselected word sets;
[0019] Calculate the word frequency of each alternative word in multiple alternative word sets;
[0020] Multiple keyword sets are determined based on the word frequencies of the alternative words in multiple alternative word sets.
[0021] According to embodiments of this disclosure, the fault category labels corresponding to multiple keyword sets are obtained by processing a preset number of log datasets.
[0022] According to embodiments of this disclosure, processing a preset number of log datasets to obtain fault category labels corresponding to multiple keyword sets includes:
[0023] Based on a preset number of log datasets, multiple pre-selected fault log datasets are determined, where each pre-selected fault log dataset is associated with a set of keywords.
[0024] Determine the pre-selected fault category labels corresponding to each of the multiple pre-selected fault log datasets;
[0025] Multiple pre-selected fault category labels are used as fault category labels corresponding to the keyword set associated with the pre-selected fault log dataset.
[0026] According to embodiments of this disclosure, determining the pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets includes:
[0027] Determine the identification information of the target database corresponding to each of the multiple pre-selected fault log datasets, and determine the reference keyword set corresponding to each of the multiple pre-selected fault log datasets;
[0028] Obtain the target database's historical operation and maintenance data;
[0029] Based on the target's historical operation and maintenance data and reference keyword set, determine the fault category of the target database;
[0030] Based on the fault categories in the target database, determine the pre-selected fault category labels corresponding to multiple pre-selected fault log datasets.
[0031] According to an embodiment of this disclosure, the log template tree is obtained by modifying an initial log template tree, wherein the initial log template tree includes multiple initial keyword sets and fault category labels corresponding to the multiple initial keyword sets respectively;
[0032] The log template tree is obtained by correcting the initial log template tree, including:
[0033] Based on the initial log template tree and the target fault log data, invalid keywords were identified.
[0034] Invalid keywords are removed from the initial keyword set to obtain the log template tree.
[0035] According to embodiments of this disclosure, the target fault log data is obtained by filtering the original fault log data, which is divided into the following categories according to fault level: error log data, deadlock log data, alarm log data, and message log data.
[0036] The target fault log data obtained by filtering the raw fault log data includes:
[0037] The error log data and deadlock log data in the original fault log data are filtered out and used as the target fault log data.
[0038] Another aspect of this disclosure provides a fault handling apparatus, including a receiving module, an input module, an output module, and a first processing module.
[0039] The receiving module is used to receive fault log data from the database under test.
[0040] The input module is used to input the fault log data to be tested into the log template tree, wherein the log template tree includes multiple keyword sets and fault category labels corresponding to the multiple keyword sets respectively, and the multiple keyword sets are obtained by processing the target fault log data of the pre-selected fault level within a preset historical time period;
[0041] The output module is used to output the fault categories of the database under test using the log template tree; and
[0042] The first processing module is used to perform fault processing on the database under test according to the fault category of the database under test.
[0043] According to embodiments of this disclosure, the above-mentioned apparatus further includes a second processing module, used to process target fault log data of pre-selected fault levels within a preset historical time period to obtain multiple keyword sets, wherein the second processing module includes:
[0044] Clustering unit, used to cluster target fault log data using a predetermined clustering algorithm to obtain a predetermined number of log datasets;
[0045] The building unit is used to build multiple keyword sets associated with a preset number of log datasets.
[0046] According to embodiments of this disclosure, the clustering unit includes:
[0047] The first determining subunit is used to determine multiple feature words from the target fault log data;
[0048] The first computational subunit is used to calculate the weights of multiple feature words;
[0049] The clustering subunit is used to cluster the target fault log data based on the weights of multiple feature words and using a predetermined clustering algorithm to obtain a preset number of log datasets.
[0050] According to embodiments of this disclosure, the building unit includes:
[0051] The second determining subunit is used to determine multiple initial word sets from a preset number of log datasets;
[0052] The removal sub-unit is used to remove stop words from multiple initial word sets to obtain multiple reselected word sets;
[0053] The second calculation subunit is used to calculate the word frequency of the alternative words in multiple alternative word sets respectively;
[0054] The third determining subunit is used to determine multiple keyword sets based on the word frequency of the alternative words in multiple alternative word sets.
[0055] According to embodiments of this disclosure, the above-mentioned apparatus further includes a third processing module, used to process a preset number of log datasets to obtain fault category labels corresponding to multiple keyword sets respectively.
[0056] According to embodiments of this disclosure, the third processing module includes:
[0057] The first determining unit is used to determine multiple pre-selected fault log datasets based on a preset number of log datasets, wherein each pre-selected fault log dataset is associated with a set of keywords;
[0058] The second determining unit is used to determine the pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets respectively;
[0059] The third determining unit is used to take multiple pre-selected fault category labels as fault category labels corresponding to the keyword set associated with the pre-selected fault log dataset.
[0060] According to embodiments of this disclosure, the second determining unit includes:
[0061] The fourth sub-unit determines the identification information of the target database corresponding to each of the multiple pre-selected fault log datasets, and determines the set of reference keywords corresponding to each of the multiple pre-selected fault log datasets.
[0062] The acquisition sub-unit is used to acquire the target historical operation and maintenance data of the target database;
[0063] The fifth determination subunit is used to determine the fault category of the target database based on the target's historical operation and maintenance data and reference keyword set;
[0064] The sixth determining subunit is used to determine the pre-selected fault category labels corresponding to multiple pre-selected fault log datasets based on the fault categories of the target database.
[0065] According to an embodiment of this disclosure, the above-mentioned apparatus further includes a fourth processing module, used to correct the initial log template tree to obtain a log template tree, wherein the initial log template tree includes multiple initial keyword sets and fault category labels corresponding to the multiple initial keyword sets respectively;
[0066] The fourth processing module includes:
[0067] The fourth determination unit is used to determine invalid keywords based on the initial log template tree and the target fault log data;
[0068] The removal unit is used to remove invalid keywords from the initial keyword set to obtain the log template tree.
[0069] According to an embodiment of this disclosure, the above-mentioned device further includes a fifth processing module, which is used to filter the original fault log data to obtain target fault log data. The original fault log data is divided into: error log data, deadlock log data, alarm log data, and message log data according to the fault level.
[0070] The fifth processing module includes a filtering unit, which is used to filter out error log data and deadlock log data from the original fault log data as target fault log data.
[0071] Another aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the above-described fault handling method.
[0072] Another aspect of this disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-described fault handling method.
[0073] Another aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the above-described fault handling method. Attached Figure Description
[0074] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0075] Figure 1 The illustration schematically depicts application scenarios of fault handling methods, apparatus, devices, media, and program products according to embodiments of the present disclosure;
[0076] Figure 2 A flowchart illustrating a fault handling method according to an embodiment of the present disclosure is shown schematically.
[0077] Figure 3 An example diagram illustrating the construction of multiple keyword sets according to embodiments of the present disclosure is shown;
[0078] Figure 4 A flowchart illustrating a clustering operation on target fault log data according to an embodiment of the present disclosure is shown schematically.
[0079] Figure 5 This schematically illustrates a flowchart of the operation for determining fault category labels corresponding to multiple keyword sets according to embodiments of the present disclosure;
[0080] Figure 6 This illustration schematically shows a flowchart of the operation for determining invalid keywords associated with an initial log template tree according to an embodiment of the present disclosure;
[0081] Figure 7 A schematic block diagram of a fault handling apparatus according to an embodiment of the present disclosure is shown; and
[0082] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a fault handling method according to an embodiment of the present disclosure. Detailed Implementation
[0083] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0084] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0085] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0086] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0087] MySQL database log files consist of error logs, general logs, update logs, binary logs, slow query logs, etc. Among them, the error log is the most commonly used log in MySQL.
[0088] In database operations and maintenance, engineers need to determine the type of database failure in order to perform targeted maintenance. Typically, engineers will review the database failure logs printed during the period of the failure and troubleshoot based on historical operational experience.
[0089] However, this approach relies on historical experience and cannot effectively learn from the historical behavior of logs. When a fault occurs, troubleshooting depends on the experience of the DBA engineer. Human judgment has limitations in understanding faults, and the accuracy of predicting unknown types of faults is not high. Furthermore, the manual troubleshooting process is cumbersome and time-consuming, and it lacks the ability to analyze the full MySQL fault logs.
[0090] Database fault logs can be divided into four levels according to their fault severity: ERROR, DeadLock, Warning, and Note. During the development of this disclosure, it was found that ERROR and DeadLock level logs require special attention. One fault handling method could be based on the experience of DBA (Democratic Engineering) experts. These experts would summarize a keyword database from the collected MySQL fault logs and categorize the MySQL databases using regular expression matching. When a MySQL fault occurs, the operations engineer would first check the ERROR and DeadLock level logs printed during the fault period. If the problem could not be identified, they would continue to check the Warning level logs for further diagnosis. However, this method still suffers from a cumbersome and time-consuming troubleshooting process.
[0091] In the process of realizing this disclosure, it was also discovered that, in real-world situations, the occurrence of faults is preceded by warning signs. If such signs can be detected in advance based on the patterns in historical fault log data, fault prediction can be achieved in some scenarios, reducing the occurrence of faults.
[0092] In view of this, the embodiments of this disclosure use NLP technology to pre-classify all MySQL historical logs, model the operation and maintenance experience, train the model using a large amount of historical logs, and establish a log template tree. This enables rapid classification of real-time generated logs, identification of anomalies from the log perspective, and further, online real-time prediction based on database logs through the log template tree. This allows for timely identification of the database fault type and can assist DBA engineers in quickly pinpointing the source of MySQL faults when they occur.
[0093] Embodiments of this disclosure provide a fault handling method, including:
[0094] Receive test fault log data from the database under test;
[0095] The fault log data to be tested is input into the log template tree, which includes multiple keyword sets and fault category labels corresponding to each keyword set. The multiple keyword sets are obtained by processing the target fault log data of the pre-selected fault level within a preset historical time period.
[0096] Output the fault categories of the database under test using a log template tree; and
[0097] The fault handling of the database under test is performed according to the fault category of the database under test.
[0098] Figure 1 The illustration schematically depicts application scenarios of fault handling methods, apparatus, devices, media, and program products according to embodiments of the present disclosure.
[0099] Figure 1 The illustration schematically depicts application scenarios of fault handling methods, apparatus, devices, media, and program products according to embodiments of the present disclosure.
[0100] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal device 101, server 102, and database 103. Terminal device 101, server 102, and database 103 can communicate with each other via a network, which may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0101] Users can use terminal device 101 to interact with server 102 via a network to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).
[0102] Terminal device 101 can be various electronic devices with a display screen and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0103] Server 102 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal device 101 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0104] Database 103 can be any type of database, including but not limited to various relational databases and non-relational databases. Examples include MySQL, MariaDB, Oracle, MongoDB, CouchDB, etc. During use, Database 103 will generate various log files, such as fault logs, general logs, update logs, binary logs, and slow query logs.
[0105] In the application scenario of this disclosure embodiment, a user can use terminal device 101 to interact with server 102 via a network and initiate a request to server 102 to obtain the fault identification result of database 103. In response to the user request, server 102 can receive real-time fault log data sent by database 103 in real time. Based on the fault log data sent by database 103, server 102 executes the fault handling method of this disclosure embodiment, outputs the fault category result of the database under test, and returns it to the user through terminal device 101. Furthermore, server 102 can perform fault handling on database 103 based on the fault category of database 103, such as stopping the receipt of business data sent by database 103, locking database 103, etc.
[0106] It should be noted that the fault handling method provided in this embodiment can generally be executed by server 102. Correspondingly, the fault handling device provided in this embodiment can generally be located in server 102. The fault handling method provided in this embodiment can also be executed by a server or server cluster that is different from server 102 and capable of communicating with terminal device 101, server 102, and database 103. Correspondingly, the fault handling device provided in this embodiment can also be located in a server or server cluster that is different from server 102 and capable of communicating with terminal device 101, server 102, and database 103.
[0107] It should be understood that Figure 1 The number of terminal devices, servers, and databases shown is merely illustrative. Depending on implementation needs, any number of terminal devices, servers, and databases can be included.
[0108] The following will be based on Figure 1 The scenario described herein provides a detailed description of the fault handling method according to the embodiments of this disclosure.
[0109] Figure 2 A flowchart illustrating a fault handling method according to an embodiment of the present disclosure is shown schematically.
[0110] like Figure 2 As shown, the fault handling method in this embodiment includes operations S201 to S204.
[0111] In operation S201, receive test fault log data from the database under test;
[0112] In operation S202, the fault log data to be tested is input into the log template tree. The log template tree includes multiple keyword sets and fault category labels corresponding to the multiple keyword sets. The multiple keyword sets are obtained by processing the target fault log data of the pre-selected fault level within a preset historical time period.
[0113] In operation S203, the fault categories of the database under test are output using the log template tree; and
[0114] In operation S204, fault handling is performed on the database under test according to the fault category of the database under test.
[0115] According to embodiments of this disclosure, the database under test can be various types of databases, such as MySQL, Oracle, MongoDB, etc. The database under test can generate various log data in real time, including fault log data. For example, MySQL fault log data may contain records of MySQL startup and shutdown times, diagnostic messages, such as errors, warnings, and comments that occur during server startup and shutdown and during server operation (for example, if MySQL notices that a table needs to be automatically checked or repaired, it will write a message in the fault log).
[0116] According to embodiments of this disclosure, the log template tree is a model tree pre-trained based on historical fault log data, which can be used to predict the fault category of the database under test based on the input fault log data to be tested.
[0117] According to embodiments of this disclosure, in the log template tree, the pre-established multiple keyword sets can be sets of keywords that characterize key features of the data. For example, one of the keyword sets could be "Table", "is masked as crashed", or "should repaired". The fault category labels corresponding to the multiple keyword sets can be descriptions used to characterize the fault categories. For example, the fault category label corresponding to the above keyword sets could be "Class = Insufficient disk space or system disk damage".
[0118] According to embodiments of this disclosure, the log template tree primarily performs fault prediction operations using multiple pre-established keyword sets and fault category labels corresponding to each keyword set. For example, upon receiving MySQL fault log data to be tested, a label tree matching algorithm can be used to match the MySQL fault log data to be tested with multiple keyword sets. After matching a target keyword set, the fault category represented by the current fault log data to be tested is determined based on the fault category labels corresponding to the target keyword set.
[0119] According to embodiments of this disclosure, database fault logs can be divided into multiple levels according to their fault severity, and the pre-selected fault level corresponding to the target fault log data can be some or all of the fault log data.
[0120] According to embodiments of this disclosure, the multiple keyword sets in the log template tree are obtained by processing target fault log data of a pre-selected fault level within a preset historical time period (e.g., the most recent month, year, etc.). For example, the target fault log data can be first classified, and then keywords can be extracted from the data of each category to form multiple keyword sets.
[0121] According to embodiments of this disclosure, after obtaining the fault category of the database under test, fault handling can be performed on the database under test according to the fault category, such as stopping the reception of business data sent by the database, locking the database, etc.
[0122] According to embodiments of this disclosure, by executing the above-described fault handling method, real-time fault prediction can be achieved simply by inputting online real-time data into the log template tree. This not only automates the entire process of fault identification and handling but also reduces fault handling time, frees up manpower, and improves processing efficiency compared to manual experience-based identification. Furthermore, since the log template tree is constructed based on a large amount of historical log data, it models operational experience and covers various fault categories. Compared to experience-based identification, it overcomes the limitations of human judgment in fault perception and achieves higher accuracy in predicting unknown types of faults.
[0123] According to embodiments of this disclosure, database fault logs can be divided into multiple levels according to their fault severity. The aforementioned target fault log data is obtained by filtering the original fault log data. For example, the original fault log data is divided into the following categories according to fault severity: Error log data - ERROR, Deadlock log data - DeadLock, Alarm log data - Warning, and Message log data - Note.
[0124] The preselected fault level corresponding to the target fault log data can be some or all of the four levels of fault log data mentioned above. For example, it can be data that only includes the ERROR level, or it can be data that includes the ERROR level, DeadLock level, and Warning level.
[0125] Furthermore, the target fault log data is obtained by filtering the original fault log data, including filtering out error log data and deadlock log data from the original fault log data.
[0126] According to embodiments of this disclosure, ERROR and DeadLock level log data are more related to database failures, while Warning and Note level data may only be alarms or indications of possible failures and are likely unrelated to database failures. Therefore, in order to improve data processing efficiency and reduce invalid operations on irrelevant data, it is necessary to selectively focus on data related to the higher failure levels of ERROR and DeadLock and perform targeted data processing to improve processing efficiency.
[0127] According to embodiments of this disclosure, the multiple keyword sets in the log template tree are obtained by processing target fault log data of pre-selected fault levels within a preset historical time period (e.g., the most recent month, year, etc.). The processing operations may include:
[0128] First, the target fault log data is clustered using a predetermined clustering algorithm to obtain a predetermined number of log datasets. This involves classifying the target fault log data to form datasets with multiple categories. The predetermined number of log datasets (i.e., how many categories the log data is divided into) can be a pre-determined optimal number of categories, determined by the algorithm or empirically. In the embodiments of this disclosure, the optimal number of log datasets obtained after the clustering operation is 20.
[0129] Then, construct multiple keyword sets associated with a preset number of log datasets. For example, keywords can be extracted from each category of dataset to form multiple keyword sets.
[0130] Figure 3 An example diagram illustrating the construction of multiple keyword sets according to embodiments of this disclosure is shown.
[0131] like Figure 3 The image shows an example of clustering target fault log data at the ERROR and DeadLock levels in MySQL and constructing multiple keyword sets (multiple key fragments of error logs).
[0132] Specifically, for example, text clustering can be performed on fault log data at the ERROR and DeadLock levels respectively, and each level of data clustering can result in a log dataset with 20 categories. For example, the 20 categories in the [ERROR] data are [ERROR_0] to [ERROR_19].
[0133] Next, key segments of the error logs are constructed for each category of log dataset, resulting in a keyword set for each category. For example, in the [ERROR] data, the keyword set for the [ERROR_0] dataset is: "could not find target log...", and the keyword set for the [ERROR_1] dataset is: "could not load plugin...", etc. The keyword set for each category of log dataset reflects the key characteristics of that type of log data, such as "unable to load data" and "data pending repair".
[0134] According to the embodiments of this disclosure, the constructed multiple keyword sets contain representative keywords in the specific field of database faults, and each keyword set corresponds to a fault category (or two, three or other number of keyword sets correspond to the same fault category). The multiple keyword sets constructed by the above method can not only be applied to database fault classification and identification to quickly and accurately know the cause of the problem, but also applied to any other field of database fault analysis, with good versatility.
[0135] According to embodiments of this disclosure, in the above operation, clustering the target fault log data using a predetermined clustering algorithm to obtain a predetermined number of log datasets may include:
[0136] Identify multiple key words from the target fault log data;
[0137] Calculate the weights of multiple feature words;
[0138] Based on the weights of multiple feature words, a predetermined clustering algorithm is used to cluster the target fault log data to obtain a predetermined number of log datasets.
[0139] Figure 4 A flowchart illustrating a clustering operation on target fault log data according to an embodiment of this disclosure is shown below. Figure 4 The above clustering operations are explained.
[0140] like Figure 4 As shown, taking MySQL fault log data as an example, the data processing operations include:
[0141] First, identify multiple feature words from the target fault log data. This can be done by performing automatic word segmentation on the MySQL fault log text data (e.g., using jieba word segmentation), counting the word frequency of each word, filtering out stop words, and finally selecting multiple feature words.
[0142] Then, the weights of multiple feature words are calculated. For example, the TF-IDF algorithm can be used to construct the weights of feature words based on the word frequency of each word.
[0143] Finally, a predetermined clustering algorithm, such as K-Means clustering, is used to cluster the target fault log data based on the weights of multiple feature words, resulting in a predetermined number of log datasets. When using K-Means clustering, the number of clusters K is set to 20, which can be determined by the algorithm based on the optimal number of categories, ultimately resulting in a log dataset with 20 categories.
[0144] It should be noted that the target fault log data may contain data of multiple fault levels, such as data of one or more of the four fault levels: ERROR, DeadLock, Warning, and Note. The above clustering operation method can be applied to cluster data of any one of these fault levels. After the clustering operation is performed, the data of each pre-selected fault level is classified.
[0145] According to embodiments of this disclosure, in the above clustering operation, by determining the weights of multiple feature words, a larger weight can be assigned to key feature words. Subsequent clustering operations can then be performed based on words with higher weights, avoiding the possibility of invalid classification results due to clustering based on invalid words, thus improving the accuracy of clustering. Because database fault log data is relatively well-organized and consists of short texts, text clustering combined with the TF-IDF algorithm can effectively classify the fault log data, reducing the impact of noisy data during the clustering process and resulting in better clustering performance.
[0146] According to embodiments of this disclosure, in the above operations, constructing multiple keyword sets associated with a preset number of log datasets includes:
[0147] First, multiple initial word sets are determined from a preset number of log datasets. This operation can be performed by extracting initial words from each log dataset to obtain an initial word set, and then processing each log dataset to finally obtain multiple initial word sets.
[0148] Next, stop words are removed from multiple initial word sets to obtain multiple reselected word sets. The purpose of this operation is to remove interference from invalid words.
[0149] Then, the word frequency of the selected words in multiple selected word sets is calculated, and multiple keyword sets are determined based on the word frequencies of the selected words in multiple selected word sets. For example, the word frequency of each selected word is calculated separately, and selected words with a word frequency greater than a certain preset value are extracted to form a keyword set. This operation can be performed on each selected word set separately to obtain a keyword set, and after processing each selected word set, multiple keyword sets are finally obtained.
[0150] According to embodiments of this disclosure, the log template tree includes multiple keyword sets and fault category labels corresponding to each of the multiple keyword sets.
[0151] Among them, the fault category labels corresponding to the multiple keyword sets can be obtained by processing the target fault log data. For example, after clustering the target fault log data using a predetermined clustering algorithm to obtain a certain number of log datasets, the predetermined number of log datasets can be processed to obtain the fault category labels corresponding to the multiple keyword sets.
[0152] The fault category labels corresponding to multiple keyword sets can also be obtained by processing each keyword set separately. For example, for each keyword set, the fault category that the keyword set may represent is determined based on the characteristics represented by the keywords in the keyword set, and thus the fault category label is obtained.
[0153] Furthermore, in the above operations, after clustering the target fault log data using a predetermined clustering algorithm to obtain a certain preset number of log datasets, processing the preset number of log datasets to obtain fault category labels corresponding to multiple keyword sets may include the following operations:
[0154] First, based on a preset number of log datasets, multiple pre-selected fault log datasets are determined, with each pre-selected fault log dataset associated with a set of keywords. For example, after clustering the pre-selected target fault log data to obtain 20 different categories of log datasets, the portion of log data that best represents the characteristics of that category is selected from each log dataset as a pre-selected fault log dataset associated with that dataset. Since each log dataset corresponds to a set of keywords, each pre-selected fault log dataset can be associated with a corresponding set of keywords. For example, for one log dataset containing 10,000 historical log data entries, the keyword set obtained after keyword extraction from these 10,000 historical log data entries is: "Table", "is masked as crashed", and "should repaired". The 10 most representative data entries extracted from these 10,000 historical log data entries form a pre-selected fault log dataset, which is also associated with the corresponding set of keywords: "Table", "is masked as crashed", and "should repaired".
[0155] Next, determine the pre-selected fault category labels corresponding to each of the multiple pre-selected fault log datasets; that is, determine the corresponding pre-selected fault category labels for each pre-selected fault log dataset.
[0156] Finally, multiple pre-selected fault category labels are used as fault category labels corresponding to the keyword set associated with the pre-selected fault log dataset. That is, the pre-selected fault category labels corresponding to the pre-selected fault log dataset are used as fault category labels corresponding to the keyword set associated with the pre-selected fault log dataset. For example, for one log dataset containing 10,000 historical log records, the 10 most representative records are extracted to form a pre-selected fault log dataset. The keyword set associated with this pre-selected fault log dataset is: "Table", "is masked ascrashed", and "should repaired". After data analysis of this pre-selected fault log dataset, it is found that one possible fault category associated with these 10 records is insufficient disk space or system disk damage. Therefore, the fault category corresponding to the keyword set "Table", "is masked as crashed", and "should repaired" can also be considered as insufficient disk space or system disk damage.
[0157] According to embodiments of this disclosure, since each log dataset may contain a large amount of log data, analyzing and processing the entire dataset to obtain fault categories is not only time-consuming but also unnecessary. The method described above selects a portion of log data that best represents the characteristics of that type of log data, analyzes and processes this small amount of data to obtain its corresponding fault category, and then expands this result to the entire full log dataset as the fault category corresponding to the keyword set associated with the entire full log dataset. Through this operation, the workload of data processing can be reduced and data processing efficiency improved while ensuring the accuracy of fault categories.
[0158] According to embodiments of this disclosure, further, in the above operations, determining the pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets may include:
[0159] Determine the identification information of the target database corresponding to each of the multiple pre-selected fault log datasets, and determine the reference keyword set corresponding to each of the multiple pre-selected fault log datasets;
[0160] Obtain the target database's historical operation and maintenance data;
[0161] Based on the target's historical operation and maintenance data and reference keyword set, determine the fault category of the target database;
[0162] Based on the fault categories in the target database, determine the pre-selected fault category labels corresponding to multiple pre-selected fault log datasets.
[0163] Figure 5 The diagram illustrates an operation flowchart for determining fault category labels corresponding to multiple keyword sets according to embodiments of this disclosure. The following, in conjunction with... Figure 5 The above operations will be explained.
[0164] like Figure 5 As shown, taking MySQL as an example, firstly, the identification information of the target database corresponding to the pre-selected MySQL fault log dataset (MySQL error log) is determined. For example, the MySQL error log can be parsed to extract the corresponding database IP address information, thus locating the database that previously experienced a failure. Simultaneously, key segments are extracted from the MySQL error log to form a reference keyword set. This reference keyword set represents the data characteristics of the pre-selected fault log dataset and can be used to characterize fault features.
[0165] Next, a labeling operation is performed on this pre-selected fault log dataset to determine its associated fault category. Specifically, this can be done by obtaining the target database's historical operation and maintenance data based on the target database's IP information, analyzing the target historical operation and maintenance data, and combining it with the fault characteristics represented by the reference keyword set to determine the target database's fault category. Finally, based on the target database's fault category, pre-selected fault category labels are determined, each corresponding to one of the multiple pre-selected fault log datasets.
[0166] For example, the result after performing the labeling operation is as follows: For the pre-selected fault log dataset 1, its reference keyword set (extract_msg) can be "is masked as crashed...", and the determined pre-selected fault category label (problem_label) is [ERROR_0]: insufficient disk space or system disk corruption; For another example, for the pre-selected fault log dataset 2, its reference keyword set (extract_msg) can be "could not load plugin...", and the determined pre-selected fault category label (problem_label) is [ERROR_1]: the specified plugin cannot be found, and so on.
[0167] According to embodiments of this disclosure, the fault category of the target database is determined by combining historical operation and maintenance data of the fault database with a set of reference keywords. Based on historical experience and combined with the characteristics reflected by the log data itself, the fault category is determined more accurately than just based on historical faults.
[0168] According to an embodiment of this disclosure, the log template tree for outputting fault categories based on the fault log data to be tested, as described in the embodiment of this disclosure, is obtained by modifying an initial log template tree, wherein the initial log template tree includes multiple initial keyword sets and fault category labels corresponding to the multiple initial keyword sets respectively.
[0169] Specifically, the log template tree is obtained by modifying the initial log template tree, including:
[0170] Based on the initial log template tree and the target fault log data, invalid keywords were identified.
[0171] Invalid keywords are removed from the initial keyword set to obtain the log template tree.
[0172] Figure 6 The flowchart illustrating the operation of determining invalid keywords associated with the initial log template tree according to an embodiment of the present disclosure is shown.
[0173] like Figure 6As shown, based on the initial log template tree and the target fault log data, invalid keywords can be determined as follows: Based on the constructed initial log template tree (constructed from the target fault log data of the pre-selected fault level within a preset historical time period), the initial keyword set in the initial log template tree is subtracted from the target fault log data to obtain the initial domain invalid words. Then, the valid words in the initial domain invalid words are filtered out to obtain the final invalid keywords.
[0174] According to embodiments of this disclosure, by constructing invalid keywords within the domain and correcting the constructed log template tree, the resulting log template tree can obtain more accurate results in text clustering calculations, thereby improving the accuracy of text classification.
[0175] Based on the above-described fault handling method, this disclosure also provides a fault handling apparatus. The following will be combined with... Figure 7 The device is described in detail.
[0176] Figure 7 A schematic block diagram of a fault handling apparatus according to an embodiment of the present disclosure is shown.
[0177] like Figure 7 As shown, the fault handling device includes a receiving module 701, an input module 702, an output module 703, and a first processing module 704.
[0178] The receiving module 701 is used to receive fault log data from the database under test.
[0179] The input module 702 is used to input the fault log data to be tested into the log template tree, wherein the log template tree includes multiple keyword sets and fault category labels corresponding to the multiple keyword sets respectively, and the multiple keyword sets are obtained by processing the target fault log data of the pre-selected fault level within a preset historical time period;
[0180] Output module 703 is used to output the fault categories of the database under test using the log template tree; and
[0181] The first processing module 704 is used to perform fault processing on the database under test according to the fault category of the database under test.
[0182] According to embodiments of this disclosure, by using the receiving module 701, input module 702, and output module 703, real-time fault prediction can be achieved simply by inputting online real-time data into the log template tree. This not only automates the entire process of fault identification and handling but also reduces handling time, frees up manpower, and improves timeliness compared to manual experience-based identification. Furthermore, since the log template tree is constructed based on a large amount of historical log data, it models operational experience and covers various fault categories. Compared to experience-based identification, it overcomes the limitations of human judgment in fault perception and provides higher accuracy in predicting unknown types of faults.
[0183] According to embodiments of this disclosure, the above-mentioned apparatus further includes a second processing module for processing target fault log data of preselected fault levels within a preset historical time period to obtain multiple keyword sets, wherein the second processing module includes a clustering unit and a construction unit.
[0184] The clustering unit is used to cluster the target fault log data using a predetermined clustering algorithm to obtain a preset number of log datasets; the construction unit is used to construct multiple keyword sets associated with the preset number of log datasets.
[0185] According to embodiments of this disclosure, the clustering unit includes a first determining subunit, a first calculating subunit, and a clustering subunit.
[0186] The system includes a first determining subunit for determining multiple feature words from the target fault log data; a first calculating subunit for calculating the weights of the multiple feature words; and a clustering subunit for clustering the target fault log data based on the weights of the multiple feature words using a predetermined clustering algorithm to obtain a preset number of log datasets.
[0187] According to embodiments of this disclosure, the construction unit includes a second determining subunit, a removal subunit, a second calculation subunit, and a third determining subunit.
[0188] The second determining subunit is used to determine multiple initial word sets from a preset number of log datasets; the removing subunit is used to remove stop words from the multiple initial word sets to obtain multiple reselected word sets; the second calculating subunit is used to calculate the word frequency of the reselected words in the multiple reselected word sets respectively; and the third determining subunit is used to determine multiple keyword sets based on the word frequency of the reselected words in the multiple reselected word sets.
[0189] According to embodiments of this disclosure, the above-mentioned apparatus further includes a third processing module, used to process a preset number of log datasets to obtain fault category labels corresponding to multiple keyword sets respectively.
[0190] According to embodiments of this disclosure, the third processing module includes a first determining unit, a second determining unit, and a third determining unit.
[0191] The first determining unit is used to determine multiple pre-selected fault log datasets based on a preset number of log datasets, wherein each pre-selected fault log dataset is associated with a keyword set; the second determining unit is used to determine the pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets respectively; and the third determining unit is used to use the multiple pre-selected fault category labels as fault category labels corresponding to the keyword set associated with the pre-selected fault log datasets.
[0192] According to embodiments of this disclosure, the second determining unit includes a fourth determining subunit, an acquisition subunit, a fifth determining subunit, and a sixth determining subunit.
[0193] The fourth determining subunit determines the identification information of the target database corresponding to each of the multiple pre-selected fault log datasets, and determines the reference keyword set corresponding to each of the multiple pre-selected fault log datasets; the obtaining subunit is used to obtain the target historical operation and maintenance data of the target database; the fifth determining subunit is used to determine the fault category of the target database based on the target historical operation and maintenance data and the reference keyword set; the sixth determining subunit is used to determine the pre-selected fault category label corresponding to each of the multiple pre-selected fault log datasets based on the fault category of the target database.
[0194] According to an embodiment of this disclosure, the above-mentioned apparatus further includes a fourth processing module, used to correct the initial log template tree to obtain a log template tree, wherein the initial log template tree includes multiple initial keyword sets and fault category labels corresponding to the multiple initial keyword sets respectively;
[0195] The fourth processing module includes a fourth determination unit and a removal unit.
[0196] The fourth determining unit is used to determine invalid keywords based on the initial log template tree and the target fault log data; the removing unit is used to remove invalid keywords from the initial keyword set to obtain the log template tree.
[0197] According to an embodiment of this disclosure, the above-mentioned device further includes a fifth processing module, which is used to filter the original fault log data to obtain target fault log data. The original fault log data is divided into: error log data, deadlock log data, alarm log data, and message log data according to the fault level.
[0198] The fifth processing module includes a filtering unit, which is used to filter out error log data and deadlock log data from the original fault log data as target fault log data.
[0199] According to embodiments of this disclosure, any plurality of modules among the receiving module 701, input module 702, output module 703, and first processing module 704 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the receiving module 701, input module 702, output module 703, and first processing module 704 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these methods. Alternatively, at least one of the receiving module 701, the input module 702, the output module 703, and the first processing module 704 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0200] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a fault handling method according to an embodiment of the present disclosure.
[0201] like Figure 8 As shown, an electronic device 800 according to an embodiment of this disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0202] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0203] According to embodiments of this disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0204] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0205] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0206] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the fault handling methods provided in the embodiments of this disclosure.
[0207] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0208] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 808, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0209] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 808, and / or installed from removable medium 811. When the computer program is executed by processor 801, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0210] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0211] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0212] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0213] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A fault handling method, comprising: Receive test fault log data from the database under test; The fault log data to be tested is input into a log template tree, wherein the log template tree includes multiple keyword sets and fault category labels corresponding to the multiple keyword sets respectively. The multiple keyword sets are obtained by processing target fault log data of pre-selected fault levels within a preset historical time period. The fault categories of the database under test are output using the log template tree; and The database under test is subjected to fault handling based on the fault category of the database under test; The fault category labels are determined by the following method: clustering the target fault log data using a predetermined clustering algorithm to obtain a predetermined number of log datasets; selecting a portion of log data representing the characteristics of that type of log data from each of the predetermined number of log datasets as a pre-selected fault log dataset associated with that log dataset; determining pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets; and using the multiple pre-selected fault category labels as fault category labels corresponding to the keyword set associated with the pre-selected fault log datasets.
2. The method according to claim 1, wherein, The target fault log data of the pre-selected fault level within a preset historical time period is processed to obtain the plurality of keyword sets, including: The target fault log data is clustered using a predetermined clustering algorithm to obtain a predetermined number of log datasets; Construct multiple sets of keywords associated with the preset number of log datasets.
3. The method according to claim 2, wherein, The step of clustering the target fault log data using a predetermined clustering algorithm to obtain a predetermined number of log datasets includes: Multiple feature words were identified from the target fault log data; Calculate the weights of the multiple feature words; Based on the weights of the multiple feature words, the target fault log data is clustered using the predetermined clustering algorithm to obtain a preset number of log datasets.
4. The method according to claim 2, wherein, The construction of multiple keyword sets associated with the preset number of log datasets includes: Multiple initial word sets are determined from the preset number of log datasets; Stop words are removed from the multiple initial word sets to obtain multiple reselected word sets; Calculate the word frequency of each of the multiple alternative word sets; The multiple keyword sets are determined based on the word frequencies of the alternative words in the multiple alternative word sets.
5. The method according to claim 1, wherein, The determination of the pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets includes: Determine the identification information of the target databases corresponding to the multiple pre-selected fault log datasets, and determine the reference keyword sets corresponding to the multiple pre-selected fault log datasets; Obtain the target historical operation and maintenance data from the target database; Based on the target's historical operation and maintenance data and the reference keyword set, determine the fault category of the target database; Based on the fault categories in the target database, determine the pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets.
6. The method according to claim 1, wherein, The log template tree is obtained by modifying the initial log template tree, wherein the initial log template tree includes multiple initial keyword sets and fault category labels corresponding to the multiple initial keyword sets respectively; The process of revising the initial log template tree to obtain the log template tree includes: Based on the initial log template tree and the target fault log data, invalid keywords are identified; The invalid keywords in the initial keyword set are removed to obtain the log template tree.
7. The method according to claim 1, wherein, The target fault log data is obtained by filtering and processing the original fault log data, which is divided into the following categories according to fault level: error log data, deadlock log data, alarm log data, and message log data. The target fault log data obtained by filtering the original fault log data includes: The error log data and the deadlock log data in the original fault log data are filtered out and used as the target fault log data.
8. A fault handling device, comprising: The receiving module is used to receive fault log data from the database under test. The input module is used to input the fault log data to be tested into the log template tree, wherein the log template tree includes multiple keyword sets and fault category labels corresponding to the multiple keyword sets respectively, and the multiple keyword sets are obtained by processing the target fault log data of the pre-selected fault level within a preset historical time period; The output module is used to output the fault categories of the database under test using the log template tree; and The first processing module is used to perform fault processing on the database under test according to the fault category of the database under test; The fault category labels are determined by the following method: from each of the preset number of log datasets, select a portion of the log data that represents the characteristics of that type of log data as a pre-selected fault log dataset associated with that log dataset; determine the pre-selected fault category labels corresponding to the multiple pre-selected fault log datasets respectively; and use the multiple pre-selected fault category labels as the fault category labels corresponding to the keyword set associated with the pre-selected fault log datasets.
9. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Database server fault processing method and device, and storage medium
CN108153603A
Method and device for expanding log abnormity classification rules
CN110825873A