Fault diagnosis method and apparatus for service failure, and storage medium
Abstract
Embodiments of the present disclosure provide a fault diagnosis method and apparatus for service failure, and a storage medium. The method includes: acquiring abnormal information to be diagnosed described in a natural language; retrieving, from a fault knowledge base, similar target known fault knowledge based on the abnormal information to be diagnosed, where the fault knowledge base is used to maintain a plurality of sets of known fault knowledge; constructing a first fault analysis instruction of the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed; and invoking a language model to take the first fault analysis instruction as an input, and output a fault analysis result of the abnormal information to be diagnosed.
Claims
exact text as granted — not AI-modifiedI/We claim:
1 . A fault diagnosis method for service failure, comprising:
acquiring abnormal information to be diagnosed described in a natural language; retrieving, from a fault knowledge base, similar target known fault knowledge based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain a set of known fault knowledge; constructing a first fault analysis instruction of the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed, wherein in the first fault analysis instruction, the target known fault knowledge is used as contextual information of the abnormal information to be diagnosed; and invoking a language model to take the first fault analysis instruction as an input, and output a fault analysis result of the abnormal information to be diagnosed.
2 . The method according to claim 1 , wherein the constructing the first fault analysis instruction of the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed comprises:
constructing the first fault analysis instruction according to a preset structured text format, wherein the first fault analysis instruction comprises model identity indication information, the target known fault knowledge, the abnormal information to be diagnosed, and request information for performing fault analysis on the abnormal information to be diagnosed.
3 . The method according to claim 1 , wherein the invoking of the language model to take the first fault analysis instruction as the input, and output the fault analysis result of the abnormal information to be diagnosed comprises:
in response to determining that a fault type in the fault analysis result is not similar to a fault type in the target known fault knowledge, and/or confidence of the fault analysis result is lower than a preset confidence threshold, constructing a second fault analysis instruction of the abnormal information to be diagnosed based on the fault analysis result; and invoking the language model by taking the second fault analysis instruction as an input to re-output the fault analysis result of the abnormal information to be diagnosed.
4 . The method according to claim 3 , wherein the constructing the second fault analysis instruction of the abnormal information to be diagnosed based on the fault analysis result comprises:
constructing the second fault analysis instruction according to a preset structured text format, wherein the second fault analysis instruction comprises the fault analysis result and request information for re-performing fault analysis on the abnormal information to be diagnosed.
5 . The method according to claim 3 , wherein the method further comprises:
in response to the fault type in the re-outputted fault analysis result being still not similar to the fault type in the target known fault knowledge, and/or the confidence of the re-outputted fault analysis result is still lower than the preset confidence threshold, outputting prompt information to prompt manual confirmation of the fault analysis result or manual fault analysis of the abnormal information to be diagnosed.
6 . The method according to claim 5 , wherein the invoking the language model to take the first fault analysis instruction as the input, and output the fault analysis result of the abnormal information to be diagnosed comprises:
invoking a plurality of language models respectively to take the first fault analysis instruction as the input, and output intermediate fault analysis results of the abnormal information to be diagnosed respectively; and clustering the intermediate fault analysis results of the plurality of language models, taking a target category comprising a largest number of intermediate fault analysis results as the fault analysis result, and determining the confidence of the fault analysis result according to a number of intermediate fault analysis results comprised in the target category.
7 . The method according to claim 1 , wherein the fault knowledge base uses vectors to maintain the known fault knowledge; and
the retrieving, from the fault knowledge base, the similar target known fault knowledge based on the abnormal information to be diagnosed comprises:
vectorizing the abnormal information to be diagnosed to obtain a vector to be matched; and
performing similarity matching between the vector to be matched and the vectors corresponding to a plurality of pieces of known fault knowledge, and determining the known fault knowledge corresponding to one or more vectors with a highest similarity to the vector to be matched as the target known fault knowledge.
8 . The method according to claim 7 , wherein the method further comprises:
vectorizing any of the plurality of pieces of known fault knowledge to obtain a vector corresponding to the known fault knowledge, and storing the known fault knowledge and the corresponding vector in the fault knowledge base in association; wherein the known fault knowledge comprises at least one of the following: diagnosed abnormal information and its corresponding fault analysis result, preset expert experience, and standard operating procedures for troubleshooting.
9 . The method according to claim 8 , wherein the vectorizing any of the plurality of pieces of known fault knowledge to obtain the vector corresponding to the known fault knowledge comprises:
in response to a length of the known fault knowledge exceeding a preset text length, dividing the known fault knowledge into a plurality of text segments; vectorizing each text segment respectively, and acquiring vector similarity between adjacent text segments, merging ones of the adjacent text segments with the vector similarity higher than a preset similarity threshold into a new text segment, and vectorizing the new text segment; and taking all merged text segments as one piece of known fault knowledge respectively.
10 . The method according to claim 8 , wherein the method further comprises:
in a case that an application scenario changes, receiving a known fault knowledge modification instruction, and modifying or deleting known fault knowledge associated with a scenario before the change in the fault knowledge base according to the known fault knowledge modification instruction.
11 . The method according to claim 1 , wherein the acquiring the abnormal information to be diagnosed described in the natural language comprises:
acquiring at least one type of original system monitoring data, identifying abnormal data from the original system monitoring data, and generating the abnormal information to be diagnosed described in the natural language according to the abnormal data.
12 . The method according to claim 11 , wherein the original system monitoring data comprises at least one of the following types: time series data, log data, call chain data, and change event data; and
the identifying the abnormal data from the original system monitoring data comprises:
identifying the abnormal data from the original system monitoring data according to a change of the original system monitoring data, and/or identifying the abnormal data from the original system monitoring data with a preset data processing model.
13 . An electronic device, comprising: at least one processor and a memory;
wherein the memory stores computer-executable instructions; and the at least one processor executes the computer-executable instructions stored in the memory, to cause the at least one processor to:
acquire abnormal information to be diagnosed described in a natural language;
retrieve, from a fault knowledge base, similar target known fault knowledge based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain a set of known fault knowledge;
construct a first fault analysis instruction of the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed, wherein in the first fault analysis instruction, the target known fault knowledge is used as contextual information of the abnormal information to be diagnosed; and
invoke a language model to take the first fault analysis instruction as an input, and output a fault analysis result of the abnormal information to be diagnosed.
14 . The device according to claim 13 , wherein the instructions causing the processor to construct the first fault analysis instruction of the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed comprise instructions causing the processor to:
construct the first fault analysis instruction according to a preset structured text format, wherein the first fault analysis instruction comprises model identity indication information, the target known fault knowledge, the abnormal information to be diagnosed, and request information for performing fault analysis on the abnormal information to be diagnosed.
15 . The device according to claim 13 , wherein the instructions causing the processor to invoke the language model to take the first fault analysis instruction as the input, and output the fault analysis result of the abnormal information to be diagnosed comprise instructions causing the processor to:
in response to determining that a fault type in the fault analysis result is not similar to a fault type in the target known fault knowledge, and/or confidence of the fault analysis result is lower than a preset confidence threshold, construct a second fault analysis instruction of the abnormal information to be diagnosed based on the fault analysis result; and invoke the language model by taking the second fault analysis instruction as an input to re-output the fault analysis result of the abnormal information to be diagnosed.
16 . The device according to claim 15 , wherein the instructions causing the processor to construct the second fault analysis instruction of the abnormal information to be diagnosed based on the fault analysis result comprise instructions causing the processor to:
construct the second fault analysis instruction according to a preset structured text format, wherein the second fault analysis instruction comprises the fault analysis result and request information for re-performing fault analysis on the abnormal information to be diagnosed.
17 . The device according to claim 15 , wherein the device is further caused to:
in response to the fault type in the re-outputted fault analysis result being still not similar to the fault type in the target known fault knowledge, and/or the confidence of the re-outputted fault analysis result is still lower than the preset confidence threshold, output prompt information to prompt manual confirmation of the fault analysis result or manual fault analysis of the abnormal information to be diagnosed.
18 . The device according to claim 17 , wherein the instructions causing the processor to invoke the language model to take the first fault analysis instruction as the input, and output the fault analysis result of the abnormal information to be diagnosed comprise instructions causing the processor to:
invoke a plurality of language models respectively to take the first fault analysis instruction as the input, and output intermediate fault analysis results of the abnormal information to be diagnosed respectively; and cluster the intermediate fault analysis results of the plurality of language models, take a target category comprising a largest number of intermediate fault analysis results as the fault analysis result, and determine the confidence of the fault analysis result according to a number of intermediate fault analysis results comprised in the target category.
19 . The device according to claim 13 , wherein the fault knowledge base uses vectors to maintain the known fault knowledge; and
the instructions causing the processor to retrieve, from the fault knowledge base, the similar target known fault knowledge based on the abnormal information to be diagnosed comprise instructions causing the processor to:
vectorize the abnormal information to be diagnosed to obtain a vector to be matched; and
perform similarity matching between the vector to be matched and the vectors corresponding to a plurality of pieces of known fault knowledge, and determine the known fault knowledge corresponding to one or more vectors with a highest similarity to the vector to be matched as the target known fault knowledge.
20 . A non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions which, when executed by a processor, cause the processor to:
acquire abnormal information to be diagnosed described in a natural language; retrieve, from a fault knowledge base, similar target known fault knowledge based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain a set of known fault knowledge; construct a first fault analysis instruction of the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed, wherein in the first fault analysis instruction, the target known fault knowledge is used as contextual information of the abnormal information to be diagnosed; and invoke a language model to take the first fault analysis instruction as an input, and output a fault analysis result of the abnormal information to be diagnosed.Join the waitlist — get patent alerts
Track US2025370847A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.