Fault handling method, device, electronic equipment and medium based on artificial intelligence
By introducing artificial intelligence-based fault handling methods into the system, using buried points, fault maps and random forest models to automatically identify and deal with system faults, the problem of low fault handling efficiency in the existing technology is solved, and efficient and accurate fault handling is achieved.
Patent Information
- Application Number
- CN202111550001.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-12-17
AI Technical Summary
In the prior art, the system fault handling efficiency is low and manual intervention is required, resulting in low processing efficiency.
Using a fault processing method based on artificial intelligence, the error report statement is obtained by burying points, parsing the error report statement to determine the error report matters, extracting the fault processing method based on the fault graph, determining the characteristic value based on the user fault record, inputting the random forest model for prediction, and determining the target fault processing method.
It realizes automated processing of system failures, improves the efficiency and accuracy of fault handling, and reduces the need for manual intervention.
Smart Images

Figure CN114201328B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and specifically to an artificial intelligence-based fault handling method, device, electronic device and medium. Background Art
[0002] After the system has been running for a long time or after performing some unconventional operations, various problems are prone to occur. The current system operation and maintenance alarm volume is very huge, and the problems that occur each time may be similar, and most of them are the same type of alarm processing. However, every time a system problem occurs, the system administrator or operation and maintenance personnel are required to manually repair the system. Due to the shortage of human resources, the efficiency of handling system problems is low. Therefore, how to realize the automatic handling of system problems and improve the efficiency of handling system problems has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] In view of the above, it is necessary to propose a fault handling method, device, electronic device and medium based on artificial intelligence to improve the efficiency of handling system faults.
[0004] In a first aspect, the present application provides a fault handling method based on artificial intelligence, the method comprising:
[0005] Based on the pre-implanted tracking points, obtain the corresponding error statement of the target system;
[0006] Parsing the error statement to determine the error item corresponding to the error statement;
[0007] Based on the error items, extract multiple fault handling methods from a pre-built fault map;
[0008] Determine a target user corresponding to the error reporting item and a fault record corresponding to the target user, and determine a feature value corresponding to the error reporting item based on the fault record;
[0009] Inputting the characteristic value and the multiple fault handling methods into a first random forest model for prediction to obtain a matching value corresponding to each fault handling method;
[0010] Based on the matching value corresponding to each fault processing method, a target fault processing method is determined from the multiple fault processing methods, and fault processing is performed according to the target fault processing method.
[0011] According to an optional implementation manner of the present application, determining the target user corresponding to the error reporting item and the fault record corresponding to the target user includes:
[0012] Positioning and monitoring the target time corresponding to when the error statement appears;
[0013] Obtaining a user identifier corresponding to the target system at the target time, and determining a target user according to the user identifier;
[0014] Based on the target user, a fault record corresponding to the target user is obtained from a fault processing log library.
[0015] According to an optional implementation of the present application, the training process of the first random forest model includes:
[0016] Obtaining characteristic values corresponding to multiple historical error events and multiple historical fault handling methods as training data sets;
[0017] Randomly extract M training sample sets from the training data set;
[0018] The M training sample sets are studied to generate M decision trees, and in the process of generating the M decision trees, N feature variables are randomly extracted from the feature variables of the M decision trees, each decision tree is branched using the optimal splitting method on the N feature variables, and the N value is set as a constant in the process of forming the random forest model;
[0019] When the branching rule is met, the generation process of the M decision trees is stopped to obtain the first random forest model.
[0020] According to an optional implementation of the present application, the generation process of the M decision trees includes:
[0021] Randomly adding noise interference to each of the characteristic variables;
[0022] Determining the importance of each of the feature variables according to the degree of reduction in accuracy;
[0023] The generation process of the M decision trees is optimized according to the importance.
[0024] According to an optional implementation of the present application, the construction of the fault map includes:
[0025] Obtain multiple historical fault handling records;
[0026] Extracting fault events from the plurality of historical fault handling records;
[0027] Clustering the fault events to obtain at least one fault category and clustering events corresponding to each fault category;
[0028] Calculating the correlation relationship between the clustered events;
[0029] A fault map is constructed according to the clustering events and the association relationships.
[0030] According to an optional implementation manner of the present application, extracting the fault events from the plurality of historical fault handling records includes:
[0031] Perform word segmentation on each historical fault handling record to obtain information segmentation;
[0032] Determine the target part of speech of the information participle in the information sentence where the information participle is located, and determine the information participle whose target part of speech is the preset part of speech as the to-be-selected participle;
[0033] The to-be-selected segmented words are matched with template faults in a preset fault template library, and the to-be-selected segmented words that successfully match the template faults are determined as fault events.
[0034] According to an optional implementation of the present application, the method further includes:
[0035] Set up the tracking service SDK in the determined target system;
[0036] A data tracking service interface is exposed externally through the tracking service SDK;
[0037] When an error signal of the target system is detected, the data embedding service interface is called to obtain an error statement corresponding to the error signal.
[0038] In a second aspect, the present application provides a fault handling device based on artificial intelligence, the device comprising:
[0039] The error acquisition module is used to obtain the error statement corresponding to the target system based on the pre-implanted tracking points;
[0040] A statement parsing module, used to parse the error statement and determine the error item corresponding to the error statement;
[0041] A graph query module, used to extract multiple fault handling methods from a pre-built fault graph based on the error reporting items;
[0042] A feature determination module, used to determine a target user corresponding to the error reporting item and a fault record corresponding to the target user, and determine a feature value corresponding to the error reporting item based on the fault record;
[0043] A score prediction module, used for inputting the feature value and the multiple fault handling methods into a first random forest model for prediction, to obtain a matching value corresponding to each fault handling method;
[0044] A method determination module is used to determine a target fault processing method from the multiple fault processing methods based on the matching value corresponding to each fault processing method, and perform fault processing according to the target fault processing method.
[0045] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the processor is used to implement the artificial intelligence-based fault handling method when executing a computer program stored in the memory.
[0046] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the artificial intelligence-based fault handling method when executed by a processor.
[0047] In summary, the artificial intelligence-based fault handling method, device, electronic device and medium described in the present application can timely obtain the error statement appearing in the target system through the embedding point, and determine the error item currently corresponding to the target system based on the error statement, and extract multiple fault handling methods from the pre-constructed fault map based on the error item. The multiple fault handling methods are associated with the error item and can be used to solve the fault corresponding to the error item; determine the target user corresponding to the error item and the fault record corresponding to the target user, and determine the feature value corresponding to the error item based on the fault record. The feature is used to represent the frequency of occurrence of the error item. According to the feature value corresponding to the error item, the fault handling method used for the current error item can be determined to improve the accuracy of determining the fault handling method; then the feature value and the multiple fault handling methods are input into the first random forest model for prediction to obtain the matching value corresponding to each fault handling method. The matching value is used to determine the target fault handling method among multiple fault handling methods, which further improves the accuracy of determining the fault handling method, and performs fault handling based on the target fault handling method, thereby realizing active handling of faults and improving the efficiency of system fault handling. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flowchart of the artificial intelligence-based fault handling method provided in Example 1 of the present application.
[0049] Figure 2 It is a structural diagram of the artificial intelligence-based fault handling device provided in Example 2 of the present application.
[0050] Figure 3 It is a schematic diagram of the structure of the electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION
[0051] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing the embodiments in an optional embodiment and are not intended to limit the present application.
[0053] The artificial intelligence-based fault handling method provided in the embodiment of the present application is executed by an electronic device, and accordingly, the artificial intelligence-based fault handling device runs in the electronic device. The electronic device may include a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device.
[0054] The embodiment of the present application can process the error statement corresponding to the target system based on artificial intelligence technology to obtain the fault handling method corresponding to the error statement, thereby improving the efficiency of system fault handling. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0055] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0056] Embodiment 1
[0057] Figure 1 This is a flow chart of an artificial intelligence-based fault handling method provided in Example 1 of the present application. The artificial intelligence-based fault handling method specifically includes the following steps. According to different requirements, the order of the steps in the flow chart can be changed, and some can be omitted.
[0058] S11, based on the pre-implanted tracking points, obtain the error statement corresponding to the target system.
[0059] The target system may be a company business system, a company platform system, a document system, an internal library system, etc. The error statement is used to determine the fault that occurs when the user accesses the target system, and may include an SQL statement corresponding to the error signal that occurs when the user encounters a fault when accessing the target system through an electronic device, wherein the error signal may be displayed on a screen panel of the electronic device accessing the target system.
[0060] You can use a third-party SDK (software development kit) in advance and adopt a tracking method. For example, you can implant probes or bytecode-enhanced tracking methods in the target system in advance to collect behavioral data on users accessing the target system, and then obtain the error statement corresponding to the target system.
[0061] In an optional embodiment, the method further comprises:
[0062] Set up the tracking service SDK in the determined target system;
[0063] A data tracking service interface is exposed externally through the tracking service SDK;
[0064] When an error signal of the target system is detected, the data embedding service interface is called to obtain an error statement corresponding to the error signal.
[0065] The target system monitors the user's access behavior and obtains the user's behavior data during the access process. For example, it monitors that the user triggers an error signal when accessing the target system, calls the data embedding service interface, and sends the error statement corresponding to the error signal back to the electronic device.
[0066] In an optional embodiment, by setting up a tracking service SDK in the background application service of the electronic device to capture error statements that appear when the user accesses the target system, compared to implanting tracking points in the target system, the risk of behavioral data leakage can be avoided, and when a third-party SDK needs to be upgraded, the corresponding application needs to be upgraded.
[0067] S12, parsing the error statement to determine the error item corresponding to the error statement.
[0068] An error statement is a regular expression composed of multiple strings. To parse an error statement, one or more error keywords contained in the error statement can be determined by extracting preset keywords in the error statement, such as Warn, Error, Fatal, etc., and then segmenting the error statement according to the preset keywords. Alternatively, the error statement can be parsed based on the mapping relationship between the error statement and the error item in the preset statement-item mapping table to determine the error item corresponding to the error statement.
[0069] S13, based on the error report, extract multiple fault handling methods from a pre-built fault map.
[0070] In an optional implementation, the construction of the fault map includes:
[0071] Obtain multiple historical fault handling records;
[0072] Extracting fault events from the plurality of historical fault handling records;
[0073] Clustering the fault events to obtain at least one fault category and clustering events corresponding to each fault category;
[0074] Calculating the correlation relationship between the clustered events;
[0075] A fault map is constructed according to the clustering events and the association relationships.
[0076] The fault event is the time corresponding to the fault resolved in the historical fault processing record, for example, it may include access failure, inability to jump to the target page, data loading exception, etc.
[0077] The fault events can be clustered based on the pre-set clustering conditions to determine at least one fault category, where the fault category refers to the category corresponding to similar faults, such as access anomalies. Clustering conditions are used to divide fault events, and fault events that meet the same clustering conditions belong to the same cluster, that is, the same fault category. Clustering conditions can be set according to actual conditions and are not limited here.
[0078] The clustering event refers to similar faults. If there are multiple fault events corresponding to the same fault category, the multiple fault events are clustering events corresponding to the fault category. One fault category corresponds to one fault map. The map nodes in the fault map represent clustering events (fault events). One map node corresponds to one clustering event, wherein the fault handling method of the clustering event corresponding to the map node can be called through the map node. The connecting lines in the fault map represent the logical relationship between two clustering events. Different connecting lines represent different sizes of correlation between two nodes. For example, a longer connecting line indicates a smaller correlation, and a shorter connecting line indicates a larger correlation.
[0079] In an optional embodiment, the extracting of multiple fault handling methods from a pre-constructed fault map based on the error report includes: determining the fault category corresponding to the error report, and determining the fault map corresponding to the fault category, determining the map node corresponding to the error report in the fault map, and obtaining at least one associated node corresponding to the map node, and obtaining multiple fault handling methods based on the map node and at least one associated node corresponding to the map node.
[0080] Among them, the graph node corresponds to a fault handling method, and each associated node in the at least one associated node corresponds to a fault handling method.
[0081] In an optional implementation, extracting the fault events from the plurality of historical fault handling records includes:
[0082] Perform word segmentation on each historical fault handling record to obtain information segmentation;
[0083] Determine the target part of speech of the information participle in the information sentence where the information participle is located, and determine the information participle whose target part of speech is the preset part of speech as the to-be-selected participle;
[0084] The to-be-selected segmented words are matched with template faults in a preset fault template library, and the to-be-selected segmented words that successfully match the template faults are determined as fault events.
[0085] Perform word segmentation processing on each information sentence in each historical fault handling record to obtain information segmentation. The target part of speech refers to the role played by the information segmentation in the information sentence. For example, the target part of speech is the object, the target part of speech is the subject, etc. The preset part of speech is determined based on big data analysis. The preset part of speech can be set as the subject. The specific method for determining the preset part of speech is not elaborated in the present invention. For example, the preset part of speech can be set as the object, and the information segmentation is data loading exception. The information sentence corresponding to the information segmentation is: This fault is data loading exception, and data loading exception is the preset part of speech, so data loading exception is determined as the segmentation to be selected.
[0086] The preset fault template library stores multiple template faults. Users can add, delete, modify, and other operations in the preset fault template library based on experience. The template faults in the preset fault template library can be faults that can be automatically processed.
[0087] S14, determining a target user corresponding to the error reporting item and a fault record corresponding to the target user, and determining a feature value corresponding to the error reporting item based on the fault record.
[0088] An error item can correspond to a variety of different fault handling methods, and the fault handling method can be determined based on the number of times the error item occurs. For example, if the error item occurs more times, a more thorough but time-consuming method can be used; if the error item occurs less times, a simpler but less time-consuming method can be used. Different users encounter different numbers of error items, so the number of times the user's error items occur can be determined based on the target user and the fault records corresponding to the target user, thereby improving the accuracy of determining the number of error items. The characteristic value corresponding to the error item can be determined based on the number of times the error item occurs. For example, the more times an error item occurs, the larger the characteristic value corresponding to the error item; the fewer times an error item occurs, the smaller the characteristic value corresponding to the error item. The mapping relationship between the number of times an error item occurs and the characteristic value can be set according to actual conditions.
[0089] In an optional implementation, determining the target user corresponding to the error reporting item and the fault record corresponding to the target user includes:
[0090] Positioning and monitoring the target time corresponding to when the error statement appears;
[0091] Obtaining a user identifier corresponding to the target system at the target time, and determining a target user according to the user identifier;
[0092] Based on the target user, a fault record corresponding to the target user is obtained from a fault processing log library.
[0093] The target time refers to the time corresponding to when the error statement appears. The target user is the target system user where the error statement currently appears. The fault handling log library stores relevant log information in the fault handling process, including the fault record corresponding to each target system user.
[0094] The log information can be accurately obtained through the target time and the task identifier, so that the response result can be accurately obtained.
[0095] S15, inputting the characteristic value and the multiple fault handling methods into a first random forest model for prediction, and obtaining a matching value corresponding to each fault handling method.
[0096] Among them, the first random forest model is a pre-trained machine learning model. The characteristic values corresponding to the error items and multiple fault handling methods are used as inputs of the first random forest model. The first random forest model predicts and outputs the matching value corresponding to each fault handling method. The matching value is used to characterize the suitability of the fault handling method and the error reporting implementation. If the matching value of a fault handling method is higher, the fault handling method is more suitable for handling the error item.
[0097] In an optional embodiment, the training process of the first random forest model includes:
[0098] Obtaining characteristic values corresponding to multiple historical error events and multiple historical fault handling methods as training data sets;
[0099] Randomly extract M training sample sets from the training data set;
[0100] The M training sample sets are studied to generate M decision trees, and in the process of generating the M decision trees, N feature variables are randomly extracted from the feature variables of the M decision trees, each decision tree is branched using the optimal splitting method on the N feature variables, and the N value is set as a constant in the process of forming the random forest model;
[0101] When the branching rule is met, the generation process of the M decision trees is stopped to obtain the first random forest model.
[0102] The characteristic value corresponding to the historical error event is the characteristic value corresponding to the historical error event corresponding to the time period before the preset time period. The characteristic value corresponding to the historical error event within the preset time period can be determined based on the fault record.
[0103] The historical fault handling method can be determined by querying the fault records within a preset time period.
[0104] You can use the bootstrap method for random sampling, or you can use the Bootstrap method for random sampling with replacement. The drawn training data set (M) constitutes the training sample set, and the undrawn training data set constitutes the validation sample set (the content of the training data set except the M part). Then, construct decision trees for all training samples in the training sample set one by one, and construct M decision trees for M training sample sets.
[0105] During the growth of the decision tree, N feature variables are randomly selected from all feature variables at each node as the candidate features for the current node split, and branches are grown from the candidate features without pruning. This process is repeated so that the decision tree continues to branch and grow until the branching rule is met and the growth stops, and M decision trees are stored. A random forest model is established based on the stored M decision trees, and the average value of the results of the M decision trees is calculated to obtain the final prediction result, where the values of M and N can be determined according to the actual situation and are not limited here.
[0106] In an optional implementation, the generation process of the M decision trees includes:
[0107] Randomly adding noise interference to each of the characteristic variables;
[0108] Determining the importance of each of the feature variables according to the degree of reduction in accuracy;
[0109] The generation process of the M decision trees is optimized according to the importance.
[0110] Different noise interferences can be added to different feature variables, or the same noise interference can be added to all feature variables, for example, adding Gaussian noise.
[0111] First, the first prediction accuracy of the random forest model is verified using the validation sample set, and then a feature variable is randomly selected from the N feature variables each time to add noise interference, and then the second prediction accuracy of the random forest model is verified using the validation sample set, so as to obtain the degree of accuracy reduction based on the difference between the first prediction accuracy and the second prediction accuracy. After each of the N feature variables is sequentially added with noise interference, N first prediction accuracies can be obtained, thereby obtaining N degrees of accuracy reduction. The degrees of these N accuracy reductions are sorted from large to small or from small to large, and the importance of each feature variable is determined based on the sorting results.
[0112] When noise interference is added to a feature variable, the greater the degree of reduction in the accuracy of the random forest model, the greater the influence of the feature variable on the random forest model, and the higher the importance of the feature variable. When noise interference is added to a feature variable, the smaller the degree of reduction in the accuracy of the random forest model, the smaller the influence of the feature variable on the random forest model, and the lower the importance of the feature variable.
[0113] After determining the importance of the feature variables, importance weights may be added according to the importance in the process of splitting the feature variables, thereby optimizing the generation process of the M decision trees.
[0114] This optional implementation improves the prediction accuracy of the random forest model by finding the importance of variable features and optimizing the decision tree generation process based on the importance.
[0115] S16: Determine a target fault handling method from the multiple fault handling methods based on the matching value corresponding to each fault handling method, and perform fault handling according to the target fault handling method.
[0116] Exemplarily, the fault handling method with the largest matching value among the multiple fault handling methods may be determined as the target fault handling method, and the electronic device may be controlled to solve the fault corresponding to the current error item of the target system according to the target fault handling method.
[0117] The artificial intelligence-based fault handling method described in the present application can timely obtain the error statement that appears in the target system through the tracking point, and determine the error item currently corresponding to the target system based on the error statement. Based on the error item, multiple fault handling methods are extracted from the pre-constructed fault map. The multiple fault handling methods are associated with the error item and can be used to solve the fault corresponding to the error item; determine the target user corresponding to the error item and the fault record corresponding to the target user, and determine the characteristic value corresponding to the error item based on the fault record. The characteristic is used to represent the frequency of occurrence of the error item. According to the characteristic value corresponding to the error item, the fault handling method used for the current error item can be determined to improve the accuracy of determining the fault handling method; then the characteristic value and the multiple fault handling methods are input into the first random forest model for prediction to obtain the matching value corresponding to each fault handling method. The matching value is used to determine the target fault handling method among multiple fault handling methods, which further improves the accuracy of determining the fault handling method, and performs fault handling based on the target fault handling method, realizes active handling of faults, and improves the efficiency of system fault handling.
[0118] Embodiment 2
[0119] Figure 2 It is a structural diagram of the artificial intelligence-based fault handling device provided in Example 2 of the present application.
[0120] In some embodiments, the artificial intelligence-based fault processing device 20 may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the artificial intelligence-based fault processing device 20 may be stored in a memory of an electronic device and executed by at least one processor to execute (see Figure 1 Description) Functionality of artificial intelligence based troubleshooting approach.
[0121] In this embodiment, the fault handling device 20 based on artificial intelligence can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an error acquisition module 201, a statement parsing module 202, a graph query module 203, a feature determination module 204, a score prediction module 205 and a method determination module 206. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0122] The error acquisition module 201 is used to acquire the error statement corresponding to the target system based on the pre-implanted tracking points.
[0123] The target system may be a company business system, a company platform system, a document system, an internal library system, etc. The error statement is used to determine the fault that occurs when the user accesses the target system, and may include an SQL statement corresponding to the error signal that occurs when the user encounters a fault when accessing the target system through an electronic device, wherein the error signal may be displayed on a screen panel of the electronic device accessing the target system.
[0124] You can use a third-party SDK (software development kit) in advance and adopt a tracking method. For example, you can implant probes or bytecode-enhanced tracking methods in the target system in advance to collect behavioral data on users accessing the target system, and then obtain the error statement corresponding to the target system.
[0125] In an optional implementation, the error acquisition module 201 is further used to:
[0126] Set up the tracking service SDK in the determined target system;
[0127] A data tracking service interface is exposed externally through the tracking service SDK;
[0128] When an error signal of the target system is detected, the data embedding service interface is called to obtain an error statement corresponding to the error signal.
[0129] The target system monitors the user's access behavior and obtains the user's behavior data during the access process. For example, it monitors that the user triggers an error signal when accessing the target system, calls the data embedding service interface, and sends the error statement corresponding to the error signal back to the electronic device.
[0130] In an optional embodiment, the error acquisition module 201 captures error statements that occur when a user accesses a target system by setting up a tracking service SDK in the background application service of the electronic device. Compared with implanting tracking points in the target system, this can avoid the risk of behavioral data leakage and avoid the need to upgrade the corresponding application when a third-party SDK needs to be upgraded.
[0131] The statement parsing module 202 is used to parse the error reporting statement and determine the error reporting item corresponding to the error reporting statement.
[0132] An error statement is a regular expression composed of multiple strings. To parse an error statement, one or more error keywords contained in the error statement can be determined by extracting preset keywords in the error statement, such as Warn, Error, Fatal, etc., and then segmenting the error statement according to the preset keywords. Alternatively, the error statement can be parsed based on the mapping relationship between the error statement and the error item in the preset statement-item mapping table to determine the error item corresponding to the error statement.
[0133] The graph query module 203 is used to extract multiple fault handling methods from a pre-built fault graph based on the error report.
[0134] In an optional implementation, the graph query module 203 is further used to:
[0135] Obtain multiple historical fault handling records;
[0136] Extracting fault events from the plurality of historical fault handling records;
[0137] Clustering the fault events to obtain at least one fault category and clustering events corresponding to each fault category;
[0138] Calculating the correlation relationship between the clustered events;
[0139] A fault map is constructed according to the clustering events and the association relationships.
[0140] The fault event is the time corresponding to the fault resolved in the historical fault processing record, for example, it may include access failure, inability to jump to the target page, data loading exception, etc.
[0141] The fault events can be clustered based on the pre-set clustering conditions to determine at least one fault category, where the fault category refers to the category corresponding to similar faults, such as access anomalies. Clustering conditions are used to divide fault events, and fault events that meet the same clustering conditions belong to the same cluster, that is, the same fault category. Clustering conditions can be set according to actual conditions and are not limited here.
[0142] The clustering event refers to similar faults. If there are multiple fault events corresponding to the same fault category, the multiple fault events are clustering events corresponding to the fault category. One fault category corresponds to one fault map. The map nodes in the fault map represent clustering events (fault events). One map node corresponds to one clustering event, wherein the fault handling method of the clustering event corresponding to the map node can be called through the map node. The connecting lines in the fault map represent the logical relationship between two clustering events. Different connecting lines represent different sizes of correlation between two nodes. For example, a longer connecting line indicates a smaller correlation, and a shorter connecting line indicates a larger correlation.
[0143] In an optional embodiment, the graph query module 203 extracts multiple fault handling methods from a pre-built fault graph based on the error report, including: determining the fault category corresponding to the error report, and determining the fault graph corresponding to the fault category, determining the graph node corresponding to the error report in the fault graph, and obtaining at least one associated node corresponding to the graph node, and obtaining multiple fault handling methods based on the graph node and at least one associated node corresponding to the graph node.
[0144] Among them, the graph node corresponds to a fault handling method, and each associated node in the at least one associated node corresponds to a fault handling method.
[0145] In an optional implementation, the graph query module 203 extracts the fault events from the plurality of historical fault handling records including:
[0146] Perform word segmentation on each historical fault handling record to obtain information segmentation;
[0147] Determine the target part of speech of the information participle in the information sentence where the information participle is located, and determine the information participle whose target part of speech is the preset part of speech as the to-be-selected participle;
[0148] The to-be-selected segmented words are matched with template faults in a preset fault template library, and the to-be-selected segmented words that successfully match the template faults are determined as fault events.
[0149] Perform word segmentation processing on each information sentence in each historical fault handling record to obtain information segmentation. The target part of speech refers to the role played by the information segmentation in the information sentence. For example, the target part of speech is the object, the target part of speech is the subject, etc. The preset part of speech is determined based on big data analysis. The preset part of speech can be set as the subject. The specific method for determining the preset part of speech is not elaborated in the present invention. For example, the preset part of speech can be set as the object, and the information segmentation is data loading exception. The information sentence corresponding to the information segmentation is: This fault is data loading exception, and data loading exception is the preset part of speech, so data loading exception is determined as the segmentation to be selected.
[0150] The preset fault template library stores multiple template faults. Users can add, delete, modify, and other operations in the preset fault template library based on experience. The template faults in the preset fault template library can be faults that can be automatically processed.
[0151] The feature determination module 204 is used to determine the target user corresponding to the error report and the fault record corresponding to the target user, and determine the feature value corresponding to the error report based on the fault record.
[0152] An error item can correspond to a variety of different fault handling methods, and the fault handling method can be determined based on the number of times the error item occurs. For example, if the error item occurs more times, a more thorough but time-consuming method can be used; if the error item occurs less times, a simpler but less time-consuming method can be used. Different users encounter different numbers of error items, so the number of times the user's error items occur can be determined based on the target user and the fault records corresponding to the target user, thereby improving the accuracy of determining the number of error items. The characteristic value corresponding to the error item can be determined based on the number of times the error item occurs. For example, the more times an error item occurs, the larger the characteristic value corresponding to the error item; the fewer times an error item occurs, the smaller the characteristic value corresponding to the error item. The mapping relationship between the number of times an error item occurs and the characteristic value can be set according to actual conditions.
[0153] In an optional implementation, the feature determination module 204 determines that the target user corresponding to the error reporting event and the fault record corresponding to the target user include:
[0154] Positioning and monitoring the target time corresponding to when the error statement appears;
[0155] Obtaining a user identifier corresponding to the target system at the target time, and determining a target user according to the user identifier;
[0156] Based on the target user, a fault record corresponding to the target user is obtained from a fault processing log library.
[0157] The target time refers to the time corresponding to when the error statement appears. The target user is the target system user where the error statement currently appears. The fault handling log library stores relevant log information in the fault handling process, including the fault record corresponding to each target system user.
[0158] The log information can be accurately obtained through the target time and the task identifier, so that the response result can be accurately obtained.
[0159] The score prediction module 205 is used to input the feature value and the multiple fault handling methods into the first random forest model for prediction, so as to obtain a matching value corresponding to each fault handling method.
[0160] Among them, the first random forest model is a pre-trained machine learning model. The characteristic values corresponding to the error items and multiple fault handling methods are used as inputs of the first random forest model. The first random forest model predicts and outputs the matching value corresponding to each fault handling method. The matching value is used to characterize the suitability of the fault handling method and the error reporting implementation. If the matching value of a fault handling method is higher, the fault handling method is more suitable for handling the error item.
[0161] In an optional implementation, the score prediction module 205 is further configured to:
[0162] Obtaining characteristic values corresponding to multiple historical error events and multiple historical fault handling methods as training data sets;
[0163] Randomly extract M training sample sets from the training data set;
[0164] The M training sample sets are studied to generate M decision trees, and in the process of generating the M decision trees, N feature variables are randomly extracted from the feature variables of the M decision trees, each decision tree is branched using the optimal splitting method on the N feature variables, and the N value is set as a constant in the process of forming the random forest model;
[0165] When the branching rule is met, the generation process of the M decision trees is stopped to obtain the first random forest model.
[0166] The characteristic value corresponding to the historical error event is the characteristic value corresponding to the historical error event corresponding to the time period before the preset time period. The characteristic value corresponding to the historical error event within the preset time period can be determined based on the fault record.
[0167] The historical fault handling method can be determined by querying the fault records within a preset time period.
[0168] You can use the bootstrap method for random sampling, or you can use the Bootstrap method for random sampling with replacement. The drawn training data set (M) constitutes the training sample set, and the undrawn training data set constitutes the validation sample set (the content of the training data set except the M part). Then, construct decision trees for all training samples in the training sample set one by one, and construct M decision trees for M training sample sets.
[0169] During the growth of the decision tree, N feature variables are randomly selected from all feature variables at each node as the candidate features for the current node split, and branches are grown from the candidate features without pruning. This process is repeated so that the decision tree continues to branch and grow until the branching rule is met and the growth stops, and M decision trees are stored. A random forest model is established based on the stored M decision trees, and the average value of the results of the M decision trees is calculated to obtain the final prediction result, where the values of M and N can be determined according to the actual situation and are not limited here.
[0170] In an optional implementation, the score prediction module 205 is further configured to:
[0171] Randomly adding noise interference to each of the characteristic variables;
[0172] Determining the importance of each of the feature variables according to the degree of reduction in accuracy;
[0173] The generation process of the M decision trees is optimized according to the importance.
[0174] Different noise interferences can be added to different feature variables, or the same noise interference can be added to all feature variables, for example, adding Gaussian noise.
[0175] First, the first prediction accuracy of the random forest model is verified using the validation sample set, and then a feature variable is randomly selected from the N feature variables each time to add noise interference, and then the second prediction accuracy of the random forest model is verified using the validation sample set, so as to obtain the degree of accuracy reduction based on the difference between the first prediction accuracy and the second prediction accuracy. After each of the N feature variables is sequentially added with noise interference, N first prediction accuracies can be obtained, thereby obtaining N degrees of accuracy reduction. The degrees of these N accuracy reductions are sorted from large to small or from small to large, and the importance of each feature variable is determined based on the sorting results.
[0176] When noise interference is added to a feature variable, the greater the degree of reduction in the accuracy of the random forest model, the greater the influence of the feature variable on the random forest model, and the higher the importance of the feature variable. When noise interference is added to a feature variable, the smaller the degree of reduction in the accuracy of the random forest model, the smaller the influence of the feature variable on the random forest model, and the lower the importance of the feature variable.
[0177] After determining the importance of the feature variables, importance weights may be added according to the importance in the process of splitting the feature variables, thereby optimizing the generation process of the M decision trees.
[0178] This optional implementation improves the prediction accuracy of the random forest model by finding the importance of variable features and optimizing the decision tree generation process based on the importance.
[0179] The method determination module 206 is configured to determine a target fault processing method from among the multiple fault processing methods based on the matching value corresponding to each fault processing method, and perform fault processing according to the target fault processing method.
[0180] Exemplarily, the fault handling method with the largest matching value among the multiple fault handling methods may be determined as the target fault handling method, and the electronic device may be controlled to solve the fault corresponding to the current error item of the target system according to the target fault handling method.
[0181] The artificial intelligence-based fault handling device described in the present application can timely obtain the error statement that appears in the target system through the tracking point, and determine the error item currently corresponding to the target system based on the error statement, and extract multiple fault handling methods from the pre-constructed fault map based on the error item. The multiple fault handling methods are associated with the error item and can be used to solve the fault corresponding to the error item; determine the target user corresponding to the error item and the fault record corresponding to the target user, and determine the characteristic value corresponding to the error item based on the fault record. The characteristic is used to represent the frequency of occurrence of the error item. According to the characteristic value corresponding to the error item, the fault handling method used for the current error item can be determined to improve the accuracy of determining the fault handling method; then the characteristic value and the multiple fault handling methods are input into the first random forest model for prediction to obtain the matching value corresponding to each fault handling method. The matching value is used to determine the target fault handling method among multiple fault handling methods, which further improves the accuracy of determining the fault handling method, and performs fault handling based on the target fault handling method, realizes active handling of faults, and improves the efficiency of system fault handling.
[0182] Embodiment 3
[0183] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned artificial intelligence-based fault handling method embodiment are implemented, for example Figure 1 S11-S16 shown:
[0184] S11, based on the pre-implanted tracking points, obtaining the error statement corresponding to the target system;
[0185] S12, parsing the error statement to determine the error item corresponding to the error statement;
[0186] S13, extracting multiple fault handling methods from a pre-built fault map based on the error report;
[0187] S14, determining a target user corresponding to the error reporting item and a fault record corresponding to the target user, and determining a feature value corresponding to the error reporting item based on the fault record;
[0188] S15, inputting the characteristic value and the multiple fault handling methods into a first random forest model for prediction, and obtaining a matching value corresponding to each fault handling method;
[0189] S16, determining a target fault handling method from the multiple fault handling methods based on the matching value corresponding to each fault handling method, and performing fault handling according to the target fault handling method.
[0190] Alternatively, when the computer program is executed by a processor, the functions of each module / unit in the above-mentioned device embodiment are realized, for example Figure 2 Modules 201-206:
[0191] The error acquisition module 201 is used to acquire the error statement corresponding to the target system based on the pre-implanted tracking points;
[0192] A statement parsing module 202 is used to parse the error statement and determine the error item corresponding to the error statement;
[0193] A graph query module 203 is used to extract multiple fault handling methods from a pre-built fault graph based on the error reporting items;
[0194] The feature determination module 204 is used to determine the target user corresponding to the error report and the fault record corresponding to the target user, and determine the feature value corresponding to the error report based on the fault record;
[0195] The score prediction module 205 is used to input the feature value and the multiple fault handling methods into the first random forest model for prediction, and obtain a matching value corresponding to each fault handling method;
[0196] The method determination module 206 is configured to determine a target fault processing method from among the multiple fault processing methods based on the matching value corresponding to each fault processing method, and perform fault processing according to the target fault processing method.
[0197] Embodiment 4
[0198] See also Figure 3 FIG. 2 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application. In a preferred embodiment of the present application, the electronic device 3 includes a memory 31 , at least one processor 32 , a transceiver 33 and at least one communication bus 34 .
[0199] Those skilled in the art should understand that Figure 3 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The electronic device 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.
[0200] In some embodiments, the electronic device 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 3 may also include client devices, which include but are not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smart phone, digital camera, etc.
[0201] It should be noted that the electronic device 3 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0202] In some embodiments, the memory 31 stores a computer program, and when the computer program is executed by the at least one processor 32, all or part of the steps in the fault handling method based on artificial intelligence are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0203] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0204] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0205] In some embodiments, the at least one processor 32 is the control core (ControlUnit) of the electronic device 3, and uses various interfaces and lines to connect the various components of the entire electronic device 3, and executes various functions and processes data of the electronic device 3 by running or executing the program or module stored in the memory 31, and calling the data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the fault handling method based on artificial intelligence described in the embodiment of the present application; or implements all or part of the functions of the fault handling device based on artificial intelligence. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors, and various control chips.
[0206] In some embodiments, the at least one communication bus 34 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.
[0207] Although not shown, the electronic device 3 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0208] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.
[0209] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0210] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0211] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0212] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A fault handling method based on artificial intelligence, characterized in that: The method comprises: Based on the pre-implanted tracking points, the error statement corresponding to the target system is obtained, including: setting a tracking point service SDK in the determined target system; exposing a data tracking point service interface to the outside through the tracking point service SDK; when an error signal of the target system is detected, calling the data tracking point service interface to obtain the error statement corresponding to the error signal; capturing the error statement that occurs when the user accesses the target system by setting the tracking point service SDK in the background application service of the electronic device; Parsing the error statement to determine the error item corresponding to the error statement; Based on the error items, extract multiple fault handling methods from a pre-built fault map; Determine the target user corresponding to the error item and the fault record corresponding to the target user, and determine the feature value corresponding to the error item based on the fault record; wherein, determining the target user corresponding to the error item and the fault record corresponding to the target user includes: locating and monitoring the target time corresponding to when the error statement appears; obtaining the user identifier corresponding to the target system at the target time, and determining the target user according to the user identifier, the target user being the user of the target system where the error statement currently appears; obtaining the fault record corresponding to the target user from the fault processing log library based on the target user; Inputting the characteristic value and the multiple fault handling methods into a first random forest model for prediction to obtain a matching value corresponding to each fault handling method; Based on the matching value corresponding to each fault processing method, a target fault processing method is determined from the multiple fault processing methods, and fault processing is performed according to the target fault processing method.
2. The artificial intelligence-based fault handling method according to claim 1, characterized in that: The training process of the first random forest model includes: Obtaining characteristic values corresponding to multiple historical error events and multiple historical fault handling methods as training data sets; Randomly extract M training sample sets from the training data set; The M training sample sets are studied to generate M decision trees, and in the process of generating the M decision trees, N feature variables are randomly extracted from the feature variables of the M decision trees, each decision tree is branched using the optimal splitting method on the N feature variables, and the N value is set as a constant in the process of forming the random forest model; When the branching rule is met, the generation process of the M decision trees is stopped to obtain the first random forest model.
3. The artificial intelligence-based fault handling method according to claim 2, characterized in that: The generation process of the M decision trees includes: Randomly adding noise interference to each of the characteristic variables; Determining the importance of each of the feature variables according to the degree of reduction in accuracy; The generation process of the M decision trees is optimized according to the importance.
4. The artificial intelligence-based fault handling method according to any one of claims 1 to 3, characterized in that: The construction of the fault map includes: Obtain multiple historical fault handling records; Extracting fault events from the plurality of historical fault handling records; Clustering the fault events to obtain at least one fault category and clustering events corresponding to each fault category; Calculating the correlation relationship between the clustered events; A fault map is constructed according to the clustering events and the association relationships.
5. The artificial intelligence-based fault handling method according to claim 4, characterized in that: The extracting of fault events from the plurality of historical fault handling records comprises: Perform word segmentation on each historical fault handling record to obtain information segmentation; Determine the target part of speech of the information participle in the information sentence where the information participle is located, and determine the information participle whose target part of speech is the preset part of speech as the to-be-selected participle; The to-be-selected segmented words are matched with template faults in a preset fault template library, and the to-be-selected segmented words that successfully match the template faults are determined as fault events.
6. A fault handling device based on artificial intelligence, characterized in that: The device comprises: The error acquisition module is used to obtain the error statement corresponding to the target system based on the pre-implanted tracking point, including: setting a tracking point service SDK in the determined target system; exposing a data tracking point service interface to the outside through the tracking point service SDK; when an error signal of the target system is detected, calling the data tracking point service interface to obtain the error statement corresponding to the error signal; and capturing the error statement that occurs when the user accesses the target system by setting the tracking point service SDK in the background application service of the electronic device; A statement parsing module, used to parse the error statement and determine the error item corresponding to the error statement; A graph query module, used to extract multiple fault handling methods from a pre-built fault graph based on the error reporting items; A feature determination module is used to determine the target user corresponding to the error item and the fault record corresponding to the target user, and determine the feature value corresponding to the error item based on the fault record; wherein, the determination of the target user corresponding to the error item and the fault record corresponding to the target user includes: locating and monitoring the target time corresponding to the occurrence of the error statement; obtaining the user identifier corresponding to the target system at the target time, and determining the target user according to the user identifier, wherein the target user is the user of the target system where the error statement currently occurs; obtaining the fault record corresponding to the target user from the fault processing log library based on the target user; A score prediction module, used for inputting the feature value and the multiple fault handling methods into a first random forest model for prediction, to obtain a matching value corresponding to each fault handling method; A method determination module is used to determine a target fault processing method from the multiple fault processing methods based on the matching value corresponding to each fault processing method, and perform fault processing according to the target fault processing method.
7. An electronic device, characterized in that: The electronic device comprises a processor and a memory, and the processor is used to implement the artificial intelligence-based fault handling method as claimed in any one of claims 1 to 5 when executing a computer program stored in the memory.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the artificial intelligence-based fault handling method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Network abnormal user detection method, device and equipment based on knowledge graph
CN111949803A
SQL performance analysis method, system and device based on tracking technology and medium
CN112069202A