Fault diagnosis method and device for service faults and storage medium
By combining a large language model (LLM) with a fault knowledge base for fault diagnosis, the problems of low efficiency and high cost in existing fault diagnosis technologies are solved, enabling fast and accurate fault analysis and adapting to the diagnostic needs of multiple types of components.
Patent Information
- Application Number
- CN202410716312.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-11-08
AI Technical Summary
Existing technologies are inefficient and costly in fault diagnosis. Automated diagnosis methods require a large amount of historical data and model optimization, and cannot adapt to changes in scenarios. Traditional methods are not effective in diagnosing new types of faults.
Fault diagnosis is performed using a large language model (LLM). By acquiring abnormal information described in natural language, retrieving similar known fault knowledge from the fault knowledge base, constructing fault analysis instructions, and calling the LLM for diagnosis, the reliance on pre-training and tuning is reduced, and the efficiency and accuracy of diagnosis are improved.
It enables rapid and accurate fault diagnosis on cloud computing platforms, reduces costs, improves diagnostic efficiency and accuracy, and adapts to the diagnostic needs of various types of components in different fields.
Smart Images

Figure CN118916194A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and more particularly to a fault diagnosis method, device, and storage medium for service faults. Background Art
[0002] In cloud computing or other scenarios, as the scale and complexity increase, failures or service interruptions are inevitable, causing users to suffer poor service experience and huge economic losses.
[0003] In order to better discover and diagnose faults, manual fault diagnosis or automated fault diagnosis is usually performed. Manual fault diagnosis is inefficient, costly, and relies on experience. Some automated fault diagnoses are usually data-driven or model-based. Data-driven or model-based automated fault diagnosis requires a large amount of historical fault data and relies on manual annotation of the causes or system status of historical fault data. It can only be used for specific scenarios. When the scenario changes, the model needs to be replaced or re-tuned. Summary of the invention
[0004] The embodiments of the present disclosure provide a fault diagnosis method, device and storage medium for service faults, so as to reduce the fault diagnosis cost and improve the fault diagnosis efficiency and accuracy.
[0005] In a first aspect, an embodiment of the present disclosure provides a fault diagnosis method for a service fault, including:
[0006] Obtain the abnormal information to be diagnosed described in natural language;
[0007] Retrieving similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets;
[0008] According to the target known fault knowledge and the abnormal information to be diagnosed, construct a first fault analysis instruction of the abnormal information to be diagnosed; wherein the target known fault knowledge in the first fault analysis instruction serves as context information of the abnormal information to be diagnosed;
[0009] The language model is called to take the first fault analysis instruction as input, and output a fault analysis result of the abnormal information to be diagnosed.
[0010] In a second aspect, an embodiment of the present disclosure provides a fault diagnosis device for a service fault, including:
[0011] An abnormality information acquisition unit, used to acquire abnormality information to be diagnosed described in natural language;
[0012] A retrieval unit, used to retrieve similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets;
[0013] An instruction construction unit, configured to 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 the target known fault knowledge in the first fault analysis instruction serves as context information of the abnormal information to be diagnosed;
[0014] The analysis unit is used to call the language model to take the first fault analysis instruction as input and output the fault analysis result of the abnormal information to be diagnosed.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
[0016] The memory stores computer-executable instructions;
[0017] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the fault diagnosis method for service faults as described in the first aspect and various possible designs of the first aspect.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the fault diagnosis method for service faults as described in the first aspect and various possible designs of the first aspect is implemented.
[0019] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including computer execution instructions. When a processor executes the computer execution instructions, it implements the fault diagnosis method for service faults as described in the first aspect and various possible designs of the first aspect.
[0020] The fault diagnosis method, device and storage medium for service faults provided by the embodiments of the present disclosure obtain abnormal information to be diagnosed described in natural language; retrieve similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets; construct a first fault analysis instruction for the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed; wherein the target known fault knowledge in the first fault analysis instruction serves as the context information of the abnormal information to be diagnosed; call a language model with the first fault analysis instruction as input, and output the fault analysis result of the abnormal information to be diagnosed. The embodiments of the present disclosure use a language model to perform fault analysis based on the abnormal information to be diagnosed and target known fault knowledge similar to the abnormal information to be diagnosed, so that the language model can obtain domain knowledge without pre-training and tuning, and can output fault analysis results accurately and in real time, thereby reducing costs and improving fault diagnosis efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 A diagram showing an example scenario of a method for diagnosing a service failure provided by an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of a process flow of a fault diagnosis method for a service fault provided by an embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram of a flow chart of a fault diagnosis method for a service fault provided by another embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram of a flow chart of a fault diagnosis method for a service fault provided by another embodiment of the present disclosure;
[0026] Figure 5 A structural block diagram of a fault diagnosis device for service faults provided in an embodiment of the present disclosure;
[0027] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0029] In cloud computing or other scenarios, in order to better discover and diagnose faults (locate the root cause), a large amount of time series data monitoring, detailed system log collection, regular sampling and recording of call chains, and reporting of various special events are usually deployed in cloud computing platforms or other scenarios. Although these are all essential data for fault diagnosis, manual fault diagnosis based on these data is inefficient, especially when the amount of data is large. It is difficult to find the root cause and correlation from the numerous data, and it relies on experience. Different people have different degrees of familiarity with the system, requiring a large number of people to collaborate, and also consumes a lot of labor costs.
[0030] In some related technologies, automated fault diagnosis can adopt some fixed processes, but it can only analyze the root causes of faults that have occurred in the past within the framework and cannot diagnose new faults. Some automated fault diagnosis methods are data-driven or model-based, such as machine learning-based intelligent operation and maintenance (Artificial Intelligence for IT Operations, AIOps) models, etc. Data-driven or model-based automated fault diagnosis requires a large amount of historical fault data and relies on manual labeling of the causes or system status of historical fault data. When the amount of data is small or not recorded in time, the selection of models and algorithms needs to be considered to solve the problem of data skew. In addition, these automated fault diagnosis methods can only be used for specific scenarios, such as microservice performance diagnosis, fault triage of large cloud platforms, etc. When the scenario changes, the model needs to be replaced or re-tuned.
[0031] In order to solve the above technical problems, considering that language models, especially large language models (LLM), have been continuously developing in recent years, they have also had a great impact on the field of intelligent operation and maintenance. The LLM model uses self-supervised learning to reasonably construct tasks suitable for model learning. It does not require or rarely uses manually labeled data for training. It largely solves the problems of high cost, long cycle, and limited accuracy of manual labeling in the AIOPS field, and reduces the amount of data required for training. In addition, LLM learns from huge and multi-type scenario data to obtain general artificial intelligence capabilities with outstanding generalization effects, and then fine-tunes them for different fields to enable it to obtain professional knowledge and intelligent capabilities in vertical fields. This is particularly important for fault diagnosis of large-scale cloud platforms, because large-scale cloud platforms provide computing, storage, databases, There are dozens of different types of components and products, such as message queues. These components have different business logics, architectural designs, and functional modules. It is too costly to select different models for root cause analysis for each component. LLM fits well into this multi-domain scenario, allowing us to switch from selecting multiple models to selecting one LLM and then fine-tuning different components in different fields, greatly reducing the complexity brought by model diversity. At the same time, the selection and tuning of traditional AIOPS models need to be completed by professionals, but the threshold of LLM is much lower. Finally, the emergence of LLM's emergent capabilities has made people look forward to its increasingly enhanced reasoning capabilities. When new types of faults occur, traditional experience and models will become invalid, and LLM's reasoning capabilities can solve this problem.
[0032] Based on the above considerations, the disclosed embodiment provides a fault diagnosis method for service faults, by obtaining abnormal information to be diagnosed described in natural language; retrieving similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets; constructing a first fault analysis instruction for the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed; wherein the target known fault knowledge in the first fault analysis instruction serves as the context information of the abnormal information to be diagnosed; calling a language model with the first fault analysis instruction as input, and outputting the fault analysis result of the abnormal information to be diagnosed. The disclosed embodiment uses a language model to perform fault analysis based on the abnormal information to be diagnosed and target known fault knowledge similar to the abnormal information to be diagnosed, so that the language model can obtain domain knowledge without pre-training and tuning, and can output fault analysis results accurately and in real time, thereby reducing costs and improving fault diagnosis efficiency and accuracy.
[0033] The fault diagnosis method for service faults provided in the embodiments of the present disclosure has application scenarios such as Figure 1As shown, the fault diagnosis method for service faults can be applied to electronic devices such as terminal devices or servers. The original system monitoring data in the cloud computing platform or other scenarios can be obtained first, and abnormal data can be identified and standardized from the original system monitoring data to obtain abnormal information to be diagnosed described in natural language. Then, based on the abnormal information to be diagnosed, similar target known fault knowledge is retrieved from the fault knowledge base, and then based on the target known fault knowledge and the abnormal information to be diagnosed, a first fault analysis instruction for the abnormal information to be diagnosed is constructed, wherein the target known fault knowledge is used as the context information of the abnormal information to be diagnosed in the first fault analysis instruction, and the first fault analysis instruction is input into the language model for fault analysis, and the fault analysis result of the abnormal information to be diagnosed is output. Optionally, the abnormal information to be diagnosed and the fault analysis result can be stored in the fault knowledge base.
[0034] It should be noted that the data involved in this disclosure (including but not limited to data used for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0035] The fault diagnosis method for service faults disclosed in the present invention will be described in detail below in conjunction with specific embodiments.
[0036] refer to Figure 2 , Figure 2 A flow chart of a fault diagnosis method for a service fault provided by an embodiment of the present disclosure. The method of this embodiment can be applied in a terminal device or a server, and the fault diagnosis method for a service fault includes:
[0037] S201. Obtain abnormality information to be diagnosed described in natural language.
[0038] In this embodiment, the original system monitoring data of the service can be obtained first, and abnormal data can be identified from the original system monitoring data of the service. Then, the abnormal information to be diagnosed described in natural language is generated based on the abnormal data, which is convenient for subsequent language models and business personnel to understand and use.
[0039] The original system monitoring data includes but is not limited to at least one type of time series data, log data, call chain data, and change event data; abnormal data can be identified from at least one type of original system monitoring data, and the method for identifying abnormal data can adopt any known method, which is not limited here. Optionally, abnormal data can be identified from the original system monitoring data according to the change of the original system monitoring data. For example, for time series data, time series anomaly detection or trend prediction can be used to identify abnormal time series data. For call chain data, some algorithms can be used to detect abnormal call chains; and / or, a preset data processing model can also be used to identify abnormal data from the original system monitoring data. For example, for log data, some text processing models (or language models) can be used to identify abnormal log data, in which template detection or other log anomaly detection can be performed. For call chain data, a graph processing model (graph algorithm) or a neural network model can be used to detect abnormal call chains. For change event data, some text processing models (or language models) can be used to perform multidimensional data drilling or retrieval to identify abnormal change events. Furthermore, abnormal information to be diagnosed described in natural language can be generated based on the abnormal data, so as to standardize the abnormal data into a structured language format recognizable by a subsequent language model. This can be achieved by any known method, such as describing the abnormal data in natural language based on specific rules or specific templates, or describing the abnormal data in natural language using some text processing models (or language models).
[0040] For example, traditional anomaly detection tools and system monitoring tools usually only return information about whether an abnormality is present or not. The trigger condition is usually that a certain indicator exceeds a preset threshold. In this embodiment, after the abnormality is identified, abnormal information to be diagnosed described in natural language is generated. For example, if the CPU usage rate exceeds 80% for three consecutive times, this embodiment can combine curve classification, abnormal morphology recognition and other tools to generate abnormal information to be diagnosed described in natural language as follows: "The CPU curve suddenly increases, and the value reaches 80%, an increase of 100% year-on-year and month-on-month."
[0041] Optionally, in this embodiment, the original system monitoring data of various modes is detected by calling plug-ins, agents or traditional AIOPS mini-models, and abnormal results are detected and standardized into a structured language format that can be recognized by the language model. This can not only ensure the efficiency and accuracy of anomaly detection, but also increase the flexibility and scalability of the system.
[0042] Of course, in this embodiment, the abnormality information to be diagnosed described in natural language may also be obtained by other methods, which are not limited in this embodiment.
[0043] In this embodiment, there will often be an alarm storm when the system program fails. At this time, the original system monitoring data is massive. The above method can quickly identify abnormal information and convert the abnormal information into abnormal information to be diagnosed in the form of a structured language. It can also be more convenient and faster to call the language model for fault diagnosis, and the abnormal information to be diagnosed is more convenient for business personnel to understand and use.
[0044] S202: Retrieve similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets.
[0045] In this embodiment, a fault knowledge base is created in advance, which includes multiple known fault knowledge, including but not limited to: historical fault diagnosis reports (including diagnosed abnormal information and its corresponding fault analysis results), preset expert experience, and standard operating procedures (SOP) for troubleshooting. The purpose of creating a fault knowledge base is to use known fault knowledge as context information for abnormal information to be diagnosed, and to obtain the latest domain knowledge without pre-training and tuning the language model, so as to help the language model generate more accurate answers that contain more private domain knowledge, and improve the accuracy and real-time performance of the language model.
[0046] Since there are multiple known fault knowledge in the fault knowledge base, in order to avoid inputting multiple known fault knowledge into the language model every time, in this embodiment, similar target known fault knowledge can be retrieved from the fault knowledge base based on the abnormal information to be diagnosed, and only the target known fault knowledge is used as the context information of the abnormal information to be diagnosed. Optionally, any known retrieval method can be used in this embodiment, such as RAG (Retrieval-Augmented Generation) retrieval, where RAG is a powerful natural language processing technology that combines retrieval and generation methods. When generating text, the retrieved relevant information is used to guide the generation process, thereby improving the quality and accuracy of the generated text.
[0047] Optionally, this embodiment may also apply technologies such as text vectorization and vector database retrieval, that is, the fault knowledge base uses vectors to maintain known fault knowledge, wherein the vector corresponding to the known fault knowledge is obtained by vectorizing the known fault knowledge, and the known fault knowledge is associated with the corresponding vector and stored in the fault knowledge base. Optionally, when performing text vectorization, an embedding method may be used. In the field of natural language processing and machine learning, "embeddings" refers to the process of converting discrete variables such as words, phrases, or texts into continuous vector spaces. This vector space is usually called an embedding space, and the generated vector is called an embedding vector or vector embedding, which is to convert text composed of words into a numerical vector that can express the semantics of the text, that is, text digitization, and a vector is a set of numerical values that can represent the position of a point in a multidimensional space. For example, "I want to query data" is converted into a vector in the following form:
[0048] I: [0.1, 0.3, -0.2, ..., -0.1]
[0049] Want: [-0.3, 0.5, 0.2, ..., 0.4]
[0050] Query: [0.4, -0.1, 0.2, ..., -0.3]
[0051] Data: [-0.4, 0.3, 0.2, ..., 0.3].
[0052] A vector database is a database specifically used for storing, managing, querying, and retrieving vectors. It is mainly used in artificial intelligence, machine learning, data mining, and other fields, and can be used to store and manage large-scale text vector data. Compared with traditional databases, vector databases can not only complete basic CRUD (add, read query, update, delete) operations, scalar data filtering, range query and other operations, but also perform faster similarity searches on vector data. Therefore, in this embodiment, the vector database can be used as a fault knowledge base, and the known fault knowledge can be vectorized in advance, and the known fault knowledge can be associated with the corresponding vector and stored in the vector database.
[0053] Optionally, if the length of the known fault knowledge exceeds the preset text length, the known fault knowledge can be divided into multiple text segments; each text segment is vectorized separately, and the vector similarity between adjacent text segments is obtained, and adjacent text segments with vector similarity higher than a preset similarity threshold are merged into a new text segment, and the new text segment is vectorized; finally, all the merged text segments (including text segments that cannot be merged and new text segments after the merger) are respectively regarded as known fault knowledge, and the known fault knowledge is associated with the corresponding vector and stored in the fault knowledge base.
[0054] In this embodiment, after obtaining the abnormal information to be diagnosed, the abnormal information to be diagnosed can also be vectorized to obtain a vector to be matched, and then the vector to be matched is matched with the vectors corresponding to multiple known fault knowledge for similarity, and a target vector (which can be one or more vectors with the highest similarity, or a vector with a similarity higher than a threshold) is determined from the vectors corresponding to the multiple known fault knowledge according to the similarity, and the known fault knowledge corresponding to the target vector is determined as the target known fault knowledge, and the target known fault knowledge can be one or more. A vector database can be used for faster similarity search.
[0055] S203. Construct a first fault analysis instruction for the abnormal information to be diagnosed based on the target known fault knowledge and the abnormal information to be diagnosed; wherein, in the first fault analysis instruction, the target known fault knowledge serves as context information of the abnormal information to be diagnosed.
[0056] In this embodiment, since a language model is used to perform fault analysis on the abnormal information to be diagnosed, it is necessary to construct an instruction for performing fault analysis on the abnormal information to be diagnosed, which is recorded here as the first fault analysis instruction of the abnormal information to be diagnosed, as the input of the language model to instruct the language model to output the fault analysis result of the abnormal information to be diagnosed according to the first fault analysis instruction. If the language model adopts a large prediction model (LLM), the first fault analysis instruction of the abnormal information to be diagnosed can be a prompt word (prompt), which serves as the input of the large prediction model.
[0057] In order to obtain the latest domain knowledge without pre-training and tuning the language model, in this embodiment, a first fault analysis instruction for the abnormal information to be diagnosed can be constructed based on the target known fault knowledge and the abnormal information to be diagnosed, wherein the first fault analysis instruction may include the target known fault knowledge and the abnormal information to be diagnosed, and the target known fault knowledge can be used as context information of the abnormal information to be diagnosed.
[0058] More specifically, a first fault analysis instruction can be constructed according to a preset structured text format, wherein the first fault analysis instruction includes but is not limited to model identity indication information, target known fault knowledge, abnormal information to be diagnosed, and request information for fault analysis of the abnormal information to be diagnosed, etc., wherein the model identity indication information is used to limit the role that the language model should play during the operation process, the target known fault knowledge serves as the context information of the abnormal information to be diagnosed, and the request information for fault analysis of the abnormal information to be diagnosed is used to indicate the tasks that the language model needs to perform or the content that needs to be output.
[0059] For example, the abnormal information to be diagnosed is "At 08:30, a large number of transaction failures occurred in the system, the CPU of the host system increased suddenly for ten minutes, the memory increased suddenly to 100%, and the network interface was unavailable...";
[0060] Retrieving similar target known fault knowledge from the fault knowledge base is as follows:
[0061] a. Expert experience 1: When the machine memory reaches 100%, it will no longer be available. You should restart the machine and expand the capacity.
[0062] b.Expert experience 2: ……;
[0063] c. Historical failure 1: On January 20, a large number of transactions in the trading system failed, the host system memory suddenly increased to full, and the inbound and outbound traffic was full. The problem was solved after a restart;
[0064] According to the target known fault knowledge and the abnormal information to be diagnosed, the first fault analysis instruction for constructing the abnormal information to be diagnosed is as follows:
[0065] "You are an intelligent operation and maintenance expert. You have the following operation and maintenance experience and historical fault information:
[0066] Expert experience 1: When the machine memory reaches 100%, it will no longer be usable. You should restart the machine and expand the capacity. Expert experience 2: ...
[0067] Historical failure 1: On January 20, a large number of transactions in the trading system failed, the host system memory suddenly increased to full, and the inbound and outbound traffic was full. The problem was solved after restarting
[0068] The current system found:
[0069] At 08:30, a large number of transaction failures occurred in the system. The CPU usage of the host system increased sharply for ten minutes, the memory usage increased sharply to 100%, and the network access interface became unavailable.
[0070] Please determine what the problem is and how to solve it."
[0071] Optionally, in this embodiment, target known fault knowledge can be retrieved from the fault knowledge base through RAG, and the target known fault knowledge can be used as the context information of the abnormal information to be diagnosed to construct a first fault analysis instruction for the abnormal information to be diagnosed, so that when the language model is called with the first fault analysis instruction as input, the language model can perform context learning based on the target known fault knowledge to determine the fault analysis result of the abnormal information to be diagnosed.
[0072] S204: Calling a language model to take the first fault analysis instruction as input, and outputting a fault analysis result of the abnormal information to be diagnosed.
[0073] In this embodiment, the first fault analysis instruction can be input into the language model, and the language model uses its reasoning ability to perform reasoning and diagnosis based on the first fault analysis instruction, and outputs the fault analysis result of the abnormal information to be diagnosed, so as to perform subsequent self-healing or fault repair based on the fault analysis result. The language model can be any known language model, and optionally, can be a large language model (LLM), which is not limited in this embodiment.
[0074] The language model can use the target known fault knowledge as context information, and with the help of the public domain general knowledge and reasoning ability of the language model itself for unknown problems, it can solve the problem that traditional models fail when encountering new problems and new fault types. It does not require pre-training or tuning, and does not require or rarely requires manual labeling, which largely solves the data dependence problem of traditional models.
[0075] The fault diagnosis method for service faults provided in this embodiment obtains abnormal information to be diagnosed described in natural language; retrieves similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets; constructs a first fault analysis instruction for the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed; wherein the target known fault knowledge in the first fault analysis instruction serves as context information for the abnormal information to be diagnosed; calls a language model with the first fault analysis instruction as input, and outputs the fault analysis result of the abnormal information to be diagnosed. This embodiment uses a language model to perform fault analysis based on the abnormal information to be diagnosed and target known fault knowledge similar to the abnormal information to be diagnosed, so that the language model can obtain domain knowledge without pre-training and tuning, and can output fault analysis results accurately and in real time, thereby reducing costs and improving fault diagnosis efficiency and accuracy.
[0076] Based on any of the above embodiments, since the language model itself has the phenomenon of hallucination, that is, there may be erroneous reasoning or inconsistent and unstable results of multiple reasoning, if the hallucination is not overcome and the fault analysis results are directly used for subsequent self-healing or fault repair, there will be a greater operation and maintenance risk. Therefore, in this embodiment, a reflection mechanism is used to solve the hallucination problem of the language model.
[0077] Specifically, Figure 3 As shown, in the process of calling the language model with a first fault analysis instruction as input and outputting the fault analysis result of the abnormal information to be diagnosed, if it is determined that the fault type in the fault analysis result is not similar to the fault type in the target known fault knowledge, and / or the confidence of the fault analysis result is lower than a preset confidence threshold, then a second fault analysis instruction of the abnormal information to be diagnosed is constructed based on the fault analysis result, and the language model is called again with the second fault analysis instruction as input to re-output the fault analysis result of the abnormal information to be diagnosed.
[0078] In this embodiment, if it is determined that the fault type in the fault analysis result is not similar to the fault type in the target known fault knowledge, for example, the fault types in the target known fault knowledge include fault types A, B, and C, and the fault type in the fault analysis result is D, which is not similar to the fault type in the target known fault knowledge (for example, the similarity between the fault type in the fault analysis result and the fault type in the target known fault knowledge can be evaluated and compared with a preset similarity threshold, or it can also be determined whether the fault type in the fault analysis result is the same as the fault type in the target known fault knowledge), then the fault analysis result may or may not be erroneous, and a second fault analysis instruction can be constructed to instruct the language model to perform a secondary diagnosis.
[0079] Alternatively, in this embodiment, whether the language model is hallucinating can also be determined by obtaining the confidence of the fault analysis result, wherein the confidence can be obtained by any known method. Optionally, multiple language models can be used for parallel diagnosis, that is, multiple language models are called respectively with the first fault analysis instruction as input, and each language model can output a fault analysis result of the abnormal information to be diagnosed, which is recorded as an intermediate fault analysis result. The intermediate fault analysis results output by different language models are then clustered, and the target category including the largest number of intermediate fault analysis results is taken as the fault analysis result, and the confidence of the fault analysis result is determined according to the number of intermediate fault analysis results included in the target category. The more intermediate fault analysis results included in the target category, the higher the confidence, and the fewer intermediate fault analysis results included in the target category, the lower the confidence. If the number of intermediate fault analysis results included in the target category is equal to the number of language models, that is, the intermediate fault analysis results output by all language models are the same, then the confidence is the highest. Furthermore, if the confidence level of the fault analysis result is not high (lower than a preset confidence threshold), a second fault analysis instruction can be constructed to instruct the language model to perform a secondary diagnosis, thereby improving the accuracy and stability of the fault diagnosis through reflection and secondary diagnosis.
[0080] Optionally, when constructing the second fault analysis instruction for the abnormal information to be diagnosed, the previous fault analysis result can also be carried in the second fault analysis instruction, so that the language model can re-diagnose the target again. Since the language model has memory ability, the second fault analysis instruction may not include the target known fault knowledge and the abnormal information to be diagnosed, but it may also include the target known fault knowledge and the abnormal information to be diagnosed. In addition, the second fault analysis instruction can also indicate the basis for the language model to output the fault analysis result.
[0081] Optionally, a second fault analysis instruction may be constructed in accordance with a preset structured text format, wherein the second fault analysis instruction includes but is not limited to the fault analysis result (or a description or evaluation of the fault analysis result), and request information for re-fault analysis of the abnormal information to be diagnosed.
[0082] Optionally, a second fault analysis instruction is as follows:
[0083] "The fault analysis result you inferred this time is inconsistent with the operation and maintenance experience and historical fault information. Please describe in detail the basis for giving this fault analysis result and try to give a new fault analysis result."
[0084] On the basis of the above embodiment, if the fault type in the fault analysis result re-output by the secondary diagnosis is still not similar to the fault type in the target known fault knowledge, and / or the confidence of the re-output fault analysis result is still lower than the preset confidence threshold, it may be that a new fault type has appeared, or the hallucination of the language model has not been resolved. A prompt message can be output to prompt manual confirmation of the fault analysis result, or manual fault analysis of the abnormal information to be diagnosed.
[0085] On the basis of the above embodiment, since new fault types may be continuously generated, after obtaining the fault analysis result of the abnormal information to be diagnosed, such as Figure 4 As shown, the abnormal information to be diagnosed and the fault analysis results can be stored in the fault knowledge base as new known fault knowledge. Optionally, a fault diagnosis report can be generated based on the abnormal information to be diagnosed and the fault analysis results as new known fault knowledge and stored in the fault knowledge base. The abnormal information to be diagnosed and the fault analysis results belonging to the new fault type are added to the fault knowledge base after manual confirmation, which can effectively increase the fault types that the language model can diagnose; and the abnormal information to be diagnosed and the fault analysis results that have not been manually confirmed and / or belong to known faults can also be added to the fault knowledge base. The reason is that although they belong to known faults, the appearance of the abnormal information may not be completely consistent with the known fault knowledge in the fault knowledge base. For example, when most of the indicator abnormal patterns are the same, a new indicator abnormality appears in this fault (this may be due to the addition of indicator monitoring, etc.). By continuously enriching the fault knowledge base, the diagnostic ability of the language model is continuously iterated forward, and it has the ability of learning iteration, so that the fault types that the language model can diagnose are continuously enriched, and the diagnostic accuracy is continuously improved.
[0086] After obtaining the fault analysis results of the abnormal information to be diagnosed, when the abnormal information to be diagnosed and the fault analysis results are stored as new known fault knowledge in the fault knowledge base, the known fault knowledge can be vectorized to obtain the corresponding vector, and the known fault knowledge and the corresponding vector are associated and stored in the fault knowledge base.
[0087] Among them, if the length of the known fault knowledge exceeds the preset text length, the known fault knowledge is divided into multiple text segments; each text segment is vectorized respectively, and the vector similarity between adjacent text segments is obtained, and the adjacent text segments whose vector similarity is higher than the preset similarity threshold are merged into a new text segment, and the new text segment is vectorized; all the merged text segments are respectively regarded as a known fault knowledge.
[0088] In this embodiment, if the length of the known fault knowledge exceeds the preset text length, in order to facilitate retrieval, the known fault knowledge can be segmented into text, for example, segmented into paragraphs, but text segmentation may divide similar content into different text segments, so it is also necessary to merge text segments with similar content, each text segment can be vectorized separately, and the vector similarity between adjacent text segments can be obtained, and adjacent text segments with vector similarity higher than the preset similarity threshold are merged into a new text segment, and finally each merged text segment is used as a known fault knowledge. For example, after text segmentation, text segment 1, text segment 2, text segment 3, and text segment 4 are obtained, and text segment 2 and text segment 3 are merged, then text segment 1 is used as a known fault knowledge, the new text segment after the merger of text segment 2 and text segment 3 is used as a known fault knowledge, and text segment 4 is used as a known fault knowledge, and they are respectively associated with the corresponding vectors and stored in the fault knowledge base.
[0089] On the basis of any of the above embodiments, when the application scenario changes, such as changing the scenario, or the scenario changes with the system update, the fault knowledge base can be modified to adapt to the change in the application scenario. Specifically, the known fault knowledge associated with the scenario before the change can be manually modified or deleted to trigger a known fault knowledge modification instruction, and then the known fault knowledge associated with the scenario before the change in the fault knowledge base is modified or deleted according to the known fault knowledge modification instruction. In addition, new known fault knowledge associated with the scenario after the change can be added to the fault knowledge base, so that the language model can continue to diagnose the abnormal information to be diagnosed in the new scenario without replacing the model or tuning the model, thereby reducing costs and avoiding the complexity caused by model diversity.
[0090] Corresponding to the fault diagnosis method for service faults in the above embodiment, Figure 5 This is a structural block diagram of a fault diagnosis device for service faults provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 5 The fault diagnosis device 500 for service faults includes: an abnormal information acquisition unit 501, a retrieval unit 502, an instruction construction unit 503, and an analysis unit 504.
[0091] The abnormal information acquisition unit 501 is used to acquire abnormal information to be diagnosed described in natural language;
[0092] A retrieval unit 502, configured to retrieve similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is configured to maintain multiple known fault knowledge sets;
[0093] An instruction construction unit 503 is used to 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 the target known fault knowledge in the first fault analysis instruction serves as context information of the abnormal information to be diagnosed;
[0094] The analyzing unit 504 is used to call the language model to take the first fault analysis instruction as input, and output the fault analysis result of the abnormal information to be diagnosed.
[0095] In one or more embodiments of the present disclosure, when the instruction construction unit 503 constructs 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, it is used to:
[0096] The first fault analysis instruction is constructed according to a preset structured text format, wherein the first fault analysis instruction includes 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.
[0097] In one or more embodiments of the present disclosure, the instruction construction unit 503 is further configured to, if it is determined that the fault type in the fault analysis result is not similar to the fault type in the target known fault knowledge, and / or the 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;
[0098] The analysis unit 504 is further configured to, with the second fault analysis instruction as input, call the language model and re-output a fault analysis result of the abnormal information to be diagnosed.
[0099] In one or more embodiments of the present disclosure, when constructing the second fault analysis instruction of the abnormal information to be diagnosed based on the fault analysis result, the instruction construction unit 503 is used to:
[0100] The second fault analysis instruction is constructed according to a preset structured text format, wherein the second fault analysis instruction includes the fault analysis result and request information for re-fault analysis of the abnormal information to be diagnosed.
[0101] In one or more embodiments of the present disclosure, the analysis unit 504 is further configured to:
[0102] If the fault type in the re-output fault analysis result is still not similar to the fault type in the target known fault knowledge, and / or the confidence of the re-output fault analysis result is still lower than the preset confidence threshold, a prompt message is output to prompt manual confirmation of the fault analysis result or manual fault analysis of the abnormal information to be diagnosed.
[0103] In one or more embodiments of the present disclosure, when the analysis unit 504 calls the language model to take the first fault analysis instruction as input and outputs the fault analysis result of the abnormal information to be diagnosed, it is used to:
[0104] Respectively call multiple language models with the first fault analysis instruction as input, and respectively output intermediate fault analysis results of the abnormal information to be diagnosed; cluster the intermediate fault analysis results of the multiple language models, take the target category including the largest number of intermediate fault analysis results as the fault analysis result, and determine the confidence of the fault analysis result according to the number of intermediate fault analysis results included in the target category.
[0105] In one or more embodiments of the present disclosure, the fault knowledge base uses vectors to maintain known fault knowledge;
[0106] When the retrieval unit 502 retrieves similar target known fault knowledge from the fault knowledge base based on the abnormal information to be diagnosed, it is used to:
[0107] Vectorizing the abnormal information to be diagnosed to obtain a vector to be matched;
[0108] The vector to be matched is matched with the vectors corresponding to the plurality of known fault knowledge in terms of similarity, and the known fault knowledge corresponding to one or more vectors having the highest similarity to the vector to be matched is determined as the target known fault knowledge.
[0109] In one or more embodiments of the present disclosure, the retrieval unit 502 is further configured to:
[0110] Vectorize any known fault knowledge to obtain a vector corresponding to the known fault knowledge, and associate the known fault knowledge and its corresponding vector and store them in the fault knowledge base;
[0111] The known fault knowledge includes at least one of the following:
[0112] Diagnosed abnormality information and its corresponding fault analysis results, preset expert experience, and standard operating procedures for troubleshooting.
[0113] In one or more embodiments of the present disclosure, when the retrieval unit 502 vectorizes any known fault knowledge to obtain a vector corresponding to the known fault knowledge, it is used to:
[0114] If the length of the known fault knowledge exceeds the preset text length, segmenting the known fault knowledge into multiple text segments;
[0115] Each text segment is vectorized respectively, and the vector similarity between adjacent text segments is obtained, adjacent text segments whose vector similarity is higher than a preset similarity threshold are merged into a new text segment, and the new text segment is vectorized;
[0116] All the merged text segments are respectively regarded as known fault knowledge.
[0117] In one or more embodiments of the present disclosure, the retrieval unit 502 is further configured to:
[0118] In the case where the application scenario changes, a known fault knowledge modification instruction is received, and the known fault knowledge associated with the scenario before the change in the fault knowledge base is modified or deleted according to the known fault knowledge modification instruction.
[0119] In one or more embodiments of the present disclosure, when acquiring the abnormality information to be diagnosed described in natural language, the abnormality information acquisition unit 501 is used to:
[0120] At least one type of original system monitoring data is acquired, abnormal data is identified from the original system monitoring data, and abnormal information to be diagnosed described in natural language is generated according to the abnormal data.
[0121] In one or more embodiments of the present disclosure, the original system monitoring data includes at least one type of time series data, log data, call chain data, and change event data;
[0122] When identifying abnormal data from the original system monitoring data, the abnormal information acquisition unit 501 is used to:
[0123] Abnormal data is identified from the original system monitoring data according to changes in the original system monitoring data, and / or, a preset data processing model is used to identify abnormal data from the original system monitoring data.
[0124] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0125] refer to Figure 6, which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure, and the electronic device 600 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0126] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0127] Typically, the following devices may be connected to the I / O interface 605: input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0128] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0129] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0130] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0131] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0132] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0133] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0134] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0135] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0136] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0137] In a first aspect, according to one or more embodiments of the present disclosure, a fault diagnosis method for a service fault is provided, comprising:
[0138] Obtain the abnormal information to be diagnosed described in natural language;
[0139] Retrieving similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets;
[0140] According to the target known fault knowledge and the abnormal information to be diagnosed, construct a first fault analysis instruction of the abnormal information to be diagnosed; wherein the target known fault knowledge in the first fault analysis instruction serves as context information of the abnormal information to be diagnosed;
[0141] The language model is called to take the first fault analysis instruction as input, and output a fault analysis result of the abnormal information to be diagnosed.
[0142] According to one or more embodiments of the present disclosure, the step of 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 includes:
[0143] The first fault analysis instruction is constructed according to a preset structured text format, wherein the first fault analysis instruction includes 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.
[0144] According to one or more embodiments of the present disclosure, the calling language model takes the first fault analysis instruction as input and outputs the fault analysis result of the abnormal information to be diagnosed, including:
[0145] If it is determined that the fault type in the fault analysis result is not similar to the fault type in the target known fault knowledge, and / or the 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;
[0146] The second fault analysis instruction is used as input, the language model is called, and the fault analysis result of the abnormal information to be diagnosed is re-outputted.
[0147] According to one or more embodiments of the present disclosure, the second fault analysis instruction for constructing the abnormal information to be diagnosed based on the fault analysis result includes:
[0148] The second fault analysis instruction is constructed according to a preset structured text format, wherein the second fault analysis instruction includes the fault analysis result and request information for re-fault analysis of the abnormal information to be diagnosed.
[0149] According to one or more embodiments of the present disclosure, the method further includes:
[0150] If the fault type in the re-output fault analysis result is still not similar to the fault type in the target known fault knowledge, and / or the confidence of the re-output fault analysis result is still lower than the preset confidence threshold, a prompt message is output to prompt manual confirmation of the fault analysis result or manual fault analysis of the abnormal information to be diagnosed.
[0151] According to one or more embodiments of the present disclosure, the calling language model takes the first fault analysis instruction as input and outputs the fault analysis result of the abnormal information to be diagnosed, including:
[0152] Respectively call multiple language models with the first fault analysis instruction as input, and respectively output intermediate fault analysis results of the abnormal information to be diagnosed; cluster the intermediate fault analysis results of the multiple language models, take the target category including the largest number of intermediate fault analysis results as the fault analysis result, and determine the confidence of the fault analysis result according to the number of intermediate fault analysis results included in the target category.
[0153] According to one or more embodiments of the present disclosure, the fault knowledge base uses vectors to maintain known fault knowledge;
[0154] The retrieving similar target known fault knowledge from the fault knowledge base based on the abnormal information to be diagnosed includes:
[0155] Vectorizing the abnormal information to be diagnosed to obtain a vector to be matched;
[0156] The vector to be matched is matched with the vectors corresponding to the plurality of known fault knowledge in terms of similarity, and the known fault knowledge corresponding to one or more vectors having the highest similarity to the vector to be matched is determined as the target known fault knowledge.
[0157] According to one or more embodiments of the present disclosure, the method further includes:
[0158] Vectorize any known fault knowledge to obtain a vector corresponding to the known fault knowledge, and associate the known fault knowledge and its corresponding vector and store them in the fault knowledge base;
[0159] The known fault knowledge includes at least one of the following:
[0160] Diagnosed abnormality information and its corresponding fault analysis results, preset expert experience, and standard operating procedures for troubleshooting.
[0161] According to one or more embodiments of the present disclosure, vectorizing any known fault knowledge to obtain a vector corresponding to the known fault knowledge includes:
[0162] If the length of the known fault knowledge exceeds the preset text length, segmenting the known fault knowledge into multiple text segments;
[0163] Each text segment is vectorized respectively, and the vector similarity between adjacent text segments is obtained, adjacent text segments whose vector similarity is higher than a preset similarity threshold are merged into a new text segment, and the new text segment is vectorized;
[0164] All the merged text segments are respectively regarded as known fault knowledge.
[0165] According to one or more embodiments of the present disclosure, the method further includes:
[0166] In the case where the application scenario changes, a known fault knowledge modification instruction is received, and the known fault knowledge associated with the scenario before the change in the fault knowledge base is modified or deleted according to the known fault knowledge modification instruction.
[0167] According to one or more embodiments of the present disclosure, the step of obtaining abnormality information to be diagnosed described in natural language includes:
[0168] At least one type of original system monitoring data is acquired, abnormal data is identified from the original system monitoring data, and abnormal information to be diagnosed described in natural language is generated according to the abnormal data.
[0169] According to one or more embodiments of the present disclosure, the original system monitoring data includes at least one type of time series data, log data, call chain data, and change event data;
[0170] The identifying abnormal data from the original system monitoring data includes:
[0171] Abnormal data is identified from the original system monitoring data according to changes in the original system monitoring data, and / or, a preset data processing model is used to identify abnormal data from the original system monitoring data.
[0172] In a second aspect, according to one or more embodiments of the present disclosure, a fault diagnosis device for a service fault is provided, including:
[0173] An abnormality information acquisition unit, used to acquire abnormality information to be diagnosed described in natural language;
[0174] A retrieval unit, used to retrieve similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets;
[0175] An instruction construction unit, configured to 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 the target known fault knowledge in the first fault analysis instruction serves as context information of the abnormal information to be diagnosed;
[0176] The analysis unit is used to call the language model to take the first fault analysis instruction as input and output the fault analysis result of the abnormal information to be diagnosed.
[0177] According to one or more embodiments of the present disclosure, when the instruction construction unit constructs 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, it is used to:
[0178] The first fault analysis instruction is constructed according to a preset structured text format, wherein the first fault analysis instruction includes 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.
[0179] According to one or more embodiments of the present disclosure, the instruction construction unit is further configured to, if it is determined that the fault type in the fault analysis result is not similar to the fault type in the target known fault knowledge, and / or the 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;
[0180] The analysis unit is further configured to, with the second fault analysis instruction as input, call the language model and re-output a fault analysis result of the abnormal information to be diagnosed.
[0181] According to one or more embodiments of the present disclosure, when the instruction construction unit constructs the second fault analysis instruction of the abnormal information to be diagnosed based on the fault analysis result, it is used to:
[0182] The second fault analysis instruction is constructed according to a preset structured text format, wherein the second fault analysis instruction includes the fault analysis result and request information for re-fault analysis of the abnormal information to be diagnosed.
[0183] According to one or more embodiments of the present disclosure, the analysis unit is further configured to:
[0184] If the fault type in the re-output fault analysis result is still not similar to the fault type in the target known fault knowledge, and / or the confidence of the re-output fault analysis result is still lower than the preset confidence threshold, a prompt message is output to prompt manual confirmation of the fault analysis result or manual fault analysis of the abnormal information to be diagnosed.
[0185] According to one or more embodiments of the present disclosure, when the analysis unit calls the language model to take the first fault analysis instruction as input and outputs the fault analysis result of the abnormal information to be diagnosed, it is used to:
[0186] Respectively call multiple language models with the first fault analysis instruction as input, and respectively output intermediate fault analysis results of the abnormal information to be diagnosed; cluster the intermediate fault analysis results of the multiple language models, take the target category including the largest number of intermediate fault analysis results as the fault analysis result, and determine the confidence of the fault analysis result according to the number of intermediate fault analysis results included in the target category.
[0187] According to one or more embodiments of the present disclosure, the fault knowledge base uses vectors to maintain known fault knowledge;
[0188] When the retrieval unit retrieves similar target known fault knowledge from the fault knowledge base based on the abnormal information to be diagnosed, it is used to:
[0189] Vectorizing the abnormal information to be diagnosed to obtain a vector to be matched;
[0190] The vector to be matched is matched with the vectors corresponding to the plurality of known fault knowledge in terms of similarity, and the known fault knowledge corresponding to one or more vectors having the highest similarity to the vector to be matched is determined as the target known fault knowledge.
[0191] According to one or more embodiments of the present disclosure, the retrieval unit is further configured to:
[0192] Vectorize any known fault knowledge to obtain a vector corresponding to the known fault knowledge, and associate the known fault knowledge and its corresponding vector and store them in the fault knowledge base;
[0193] The known fault knowledge includes at least one of the following:
[0194] Diagnosed abnormality information and its corresponding fault analysis results, preset expert experience, and standard operating procedures for troubleshooting.
[0195] According to one or more embodiments of the present disclosure, when the retrieval unit vectorizes any known fault knowledge to obtain a vector corresponding to the known fault knowledge, it is used to:
[0196] If the length of the known fault knowledge exceeds the preset text length, segmenting the known fault knowledge into multiple text segments;
[0197] Each text segment is vectorized respectively, and the vector similarity between adjacent text segments is obtained, adjacent text segments whose vector similarity is higher than a preset similarity threshold are merged into a new text segment, and the new text segment is vectorized;
[0198] All the merged text segments are respectively regarded as known fault knowledge.
[0199] According to one or more embodiments of the present disclosure, the retrieval unit is further configured to:
[0200] In the case where the application scenario changes, a known fault knowledge modification instruction is received, and the known fault knowledge associated with the scenario before the change in the fault knowledge base is modified or deleted according to the known fault knowledge modification instruction.
[0201] According to one or more embodiments of the present disclosure, when acquiring the abnormality information to be diagnosed described in natural language, the abnormality information acquisition unit is used to:
[0202] At least one type of original system monitoring data is acquired, abnormal data is identified from the original system monitoring data, and abnormal information to be diagnosed described in natural language is generated according to the abnormal data.
[0203] According to one or more embodiments of the present disclosure, the original system monitoring data includes at least one type of time series data, log data, call chain data, and change event data;
[0204] When identifying abnormal data from the original system monitoring data, the abnormal information acquisition unit is used to:
[0205] Abnormal data is identified from the original system monitoring data according to changes in the original system monitoring data, and / or, a preset data processing model is used to identify abnormal data from the original system monitoring data.
[0206] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;
[0207] The memory stores computer-executable instructions;
[0208] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the fault diagnosis method for service faults as described in the first aspect and various possible designs of the first aspect.
[0209] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the fault diagnosis method for service faults as described in the first aspect and various possible designs of the first aspect is implemented.
[0210] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising computer execution instructions. When a processor executes the computer execution instructions, the fault diagnosis method for service faults as described in the first aspect and various possible designs of the first aspect is implemented.
[0211] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0212] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0213] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A fault diagnosis method for a service fault, characterized in that: include: Obtain the abnormal information to be diagnosed described in natural language; Retrieving similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain a known fault knowledge set; According to the target known fault knowledge and the abnormal information to be diagnosed, construct a first fault analysis instruction of the abnormal information to be diagnosed; wherein the target known fault knowledge in the first fault analysis instruction serves as context information of the abnormal information to be diagnosed; The language model is called to take the first fault analysis instruction as input, and output a fault analysis result of the abnormal information to be diagnosed.
2. The method according to claim 1, characterized in that The step of constructing a first fault analysis instruction for the abnormal information to be diagnosed according to the target known fault knowledge and the abnormal information to be diagnosed includes: The first fault analysis instruction is constructed according to a preset structured text format, wherein the first fault analysis instruction includes 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, characterized in that The calling language model takes the first fault analysis instruction as input and outputs the fault analysis result of the abnormal information to be diagnosed, including: If it is determined that the fault type in the fault analysis result is not similar to the fault type in the target known fault knowledge, and / or the 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; The second fault analysis instruction is used as input, the language model is called, and the fault analysis result of the abnormal information to be diagnosed is re-outputted.
4. The method according to claim 3, characterized in that The second fault analysis instruction for constructing the abnormal information to be diagnosed based on the fault analysis result includes: The second fault analysis instruction is constructed according to a preset structured text format, wherein the second fault analysis instruction includes the fault analysis result and request information for re-fault analysis of the abnormal information to be diagnosed.
5. The method according to claim 3, characterized in that: The method further comprises: If the fault type in the re-output fault analysis result is still not similar to the fault type in the target known fault knowledge, and / or the confidence of the re-output fault analysis result is still lower than the preset confidence threshold, a prompt message is output 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, characterized in that The calling language model takes the first fault analysis instruction as input and outputs the fault analysis result of the abnormal information to be diagnosed, including: Respectively call multiple language models with the first fault analysis instruction as input, and respectively output intermediate fault analysis results of the abnormal information to be diagnosed; cluster the intermediate fault analysis results of the multiple language models, take the target category including the largest number of intermediate fault analysis results as the fault analysis result, and determine the confidence of the fault analysis result according to the number of intermediate fault analysis results included in the target category.
7. The method according to any one of claims 1 to 6, characterized in that: The fault knowledge base uses vectors to maintain known fault knowledge; The retrieving similar target known fault knowledge from the fault knowledge base based on the abnormal information to be diagnosed includes: Vectorizing the abnormal information to be diagnosed to obtain a vector to be matched; The vector to be matched is matched with the vectors corresponding to the plurality of known fault knowledge in terms of similarity, and the known fault knowledge corresponding to one or more vectors having the highest similarity to the vector to be matched is determined as the target known fault knowledge.
8. The method according to claim 7, characterized in that The method further comprises: Vectorize any known fault knowledge to obtain a vector corresponding to the known fault knowledge, and associate the known fault knowledge and its corresponding vector and store them in the fault knowledge base; The known fault knowledge includes at least one of the following: Diagnosed abnormality information and its corresponding fault analysis results, preset expert experience, and standard operating procedures for troubleshooting.
9. The method according to claim 8, characterized in that The vectorizing any known fault knowledge to obtain a vector corresponding to the known fault knowledge includes: If the length of the known fault knowledge exceeds the preset text length, segmenting the known fault knowledge into multiple text segments; Each text segment is vectorized respectively, and the vector similarity between adjacent text segments is obtained, adjacent text segments whose vector similarity is higher than a preset similarity threshold are merged into a new text segment, and the new text segment is vectorized; All the merged text segments are respectively regarded as known fault knowledge.
10. The method according to claim 8, characterized in that The method further comprises: In the case where the application scenario changes, a known fault knowledge modification instruction is received, and the known fault knowledge associated with the scenario before the change in the fault knowledge base is modified or deleted according to the known fault knowledge modification instruction.
11. The method according to any one of claims 1 to 6, characterized in that: The obtaining of abnormality information to be diagnosed described in natural language includes: At least one type of original system monitoring data is acquired, abnormal data is identified from the original system monitoring data, and abnormal information to be diagnosed described in natural language is generated according to the abnormal data.
12. The method according to claim 11, characterized in that The original system monitoring data includes at least one type of time series data, log data, call chain data, and change event data; The identifying abnormal data from the original system monitoring data includes: Abnormal data is identified from the original system monitoring data according to changes in the original system monitoring data, and / or, a preset data processing model is used to identify abnormal data from the original system monitoring data.
13. A fault diagnosis device for service failure, characterized in that: include: An abnormality information acquisition unit, used to acquire abnormality information to be diagnosed described in natural language; A retrieval unit, used to retrieve similar target known fault knowledge from a fault knowledge base based on the abnormal information to be diagnosed, wherein the fault knowledge base is used to maintain multiple known fault knowledge sets; An instruction construction unit, configured to 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 the target known fault knowledge in the first fault analysis instruction serves as context information of the abnormal information to be diagnosed; The analysis unit is used to call the language model to take the first fault analysis instruction as input and output the fault analysis result of the abnormal information to be diagnosed.
14. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 12 is implemented.
16. A computer program product, characterized in that The method comprises computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 12 is implemented.
Citation Information
Cited By
Inspection report generation method and device for cloud network networking scene, medium and product
CN119271802A
Cloud network exception processing method, system and device, storage medium and program product
CN119276685A
VIP drift automatic abnormity diagnosis method and system, electronic equipment and storage medium
CN119341881A
Vehicle abnormity processing method and device, new energy vehicle and readable storage medium
CN119357332A
Fault detection method and device for micro-service instance
CN119396661A
