Server failure diagnosis method, device, storage medium and electronic device
Through large-scale language models and multi-expert collaborative diagnosis technology, the problem of low efficiency and low accuracy in fault diagnosis of large-scale and high-complexity server systems is solved, fast and accurate fault diagnosis and repair suggestions are realized, and the efficiency of the data center is improved. Reliability and security.
Patent Information
- Application Number
- CN202410858376.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-28
AI Technical Summary
Existing technologies are inefficient and inaccurate in fault diagnosis of large-scale and highly complex server systems. Moreover, traditional methods rely on manual professional knowledge and are difficult to respond quickly and adapt to scene changes.
The expert model built using a large-scale language model obtains the abnormal description information of the server alarm message, uses the preset offline database to configure the target document data and application programming interface data, generates a set of prompt words, and performs preliminary screening and diagnosis, and finally the target Text is input into the expert model for fault diagnosis, and a multi-expert collaborative diagnosis mechanism is combined to improve diagnosis efficiency and accuracy.
It improves the efficiency and accuracy of server fault diagnosis, reduces labor burden and costs, can quickly adapt to changes in complex scenarios, and provides timely fault repair suggestions and reports.
Smart Images

Figure CN118394561B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and more specifically, to a method, device, storage medium, and electronic device for diagnosing server failures. Background Art
[0002] Server fault diagnosis aims to detect, analyze and solve abnormal events in server operation, so as to ensure the reliability and security of the data center. A typical server fault diagnosis needs to go through abnormal notification, alarm check, log analysis, writing diagnostic reports, giving solution suggestions, etc. Each link of the above process may be experienced multiple times. However, the types of data center faults are complex and diverse, and there is a high degree of dependency between different components of the server, which brings challenges to the root cause analysis and solution of faults. A medium-sized data center encounters dozens or even hundreds of abnormal events in a month. The traditional manual rule-based diagnosis method is highly dependent on the professional knowledge of the staff. Once the staff is lost, it takes months or even years to train a professional, and the relevant experience cannot be quickly reused. In addition, the traditional method is difficult to fully cover the types, and it is impossible to provide timely response in an emergency. There is still a lot of room for improvement in efficiency and effectiveness. In this context, semi-automated diagnostic tools have emerged to reduce the burden of manpower and save costs. These methods have the following limitations: 1) They are usually based on rules established by experience, or used in combination with traditional machine learning models, have poor scene understanding capabilities, and cannot use diagnostic knowledge; 2) They are only applicable to fixed scenarios. Once the scenario changes, the corresponding parameters need to be changed and the model needs to be retrained; 3) They do not have inference capabilities, such as giving potential root causes and solutions based on a certain fault phenomenon.
[0003] Therefore, the above solutions all have certain limitations, especially when dealing with large-scale, highly complex server systems, their efficiency and accuracy are limited.
[0004] Currently, no effective solution has been proposed to the technical problem of low efficiency and low accuracy in fault diagnosis of large-scale and highly complex server systems in related technologies. Summary of the invention
[0005] The embodiments of the present application provide a method, device, storage medium and electronic device for diagnosing server faults, so as to at least solve the problem of low efficiency and low accuracy of fault diagnosis of large-scale and highly complex server systems in related technologies.
[0006] According to an embodiment of the present application, a method for diagnosing server faults is provided, including: obtaining exception description information corresponding to an alarm message on a server; configuring the exception description information using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information; generating a prompt word set based on the document data and the target environment data, and performing a preliminary screening and diagnosis on the prompt word set to obtain a target text; inputting the target text into an expert model for fault diagnosis to obtain a target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model.
[0007] In an exemplary embodiment, obtaining abnormal description information corresponding to an alarm message on a server includes: determining the alarm type corresponding to the alarm message, wherein the alarm type includes at least: an abnormal alarm type; when the alarm type of the alarm message is an abnormal alarm type, parsing the alarm message to obtain the abnormal description information corresponding to the alarm message; when the alarm type of the alarm message is not an abnormal alarm type, prohibiting parsing the alarm message.
[0008] In an exemplary embodiment, the exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information. The method further includes: obtaining a defined knowledge format; wherein the knowledge format includes at least: the name of the abnormal fault, the fault content of the abnormal fault, the fault indicator of the abnormal fault, and the analysis steps of the abnormal fault; recording the historical fault data of the server through the knowledge format; obtaining a learning sample corresponding to the historical fault data based on the recording results, wherein the learning sample is used to train a large-scale language model; determining the historical exception description information corresponding to the learning sample, and the document data corresponding to the target learning sample; and storing the historical exception description information in association with the document data in a preset offline database.
[0009] In an exemplary embodiment, the exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of the application programming interface associated with the exception description information. The above method also includes: obtaining multiple application programming interface tools required for fault diagnosis; determining the tool type corresponding to each tool in the multiple application programming interface tools and the usage specifications of the application programming interface tools; associating and binding the tool type, usage specifications, and application programming interface tools to obtain a target environment data set; and storing the target environment data set in a preset offline database.
[0010] In an exemplary embodiment, before inputting the target text into the expert model for fault diagnosis and obtaining the target diagnosis result corresponding to the server, the method further includes: determining a first length of information that the expert model allows to be input at one time; identifying a second length corresponding to the target text; when it is determined that the first length is greater than or equal to the second length, inputting the target text into the expert model for fault diagnosis; when it is determined that the first length is less than the second length, segmenting the target text.
[0011] In an exemplary embodiment, when it is determined that the first length is less than the second length, the target text is segmented, including: constructing a target tree structure to store the target text, wherein the root node of the target tree structure represents the title content of each chapter in the target text, and the child nodes of the target tree structure represent the content of each chapter, and the content includes at least: the original content of the target text and the summary content corresponding to the original content; comparing the similarity between the content of each node in the target tree structure and other nodes; when it is determined that the similarity is greater than or equal to a preset similarity, merging the nodes in the target tree structure; when it is determined that the similarity is less than a preset similarity, sending the sub-text content corresponding to the current node to the target object for judgment.
[0012] In an exemplary embodiment, the exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of the application programming interface, including: using a target retrieval algorithm to search for knowledge blocks related to the exception description information from the preset offline database; configuring the exception description information through the knowledge documents carried in the knowledge blocks to obtain target document data corresponding to the exception description information.
[0013] In an exemplary embodiment, searching a knowledge block related to the abnormal description information from a preset offline database using a target retrieval algorithm includes: determining a retrieval formula corresponding to the abnormal description information according to a first formula, wherein the first formula is: , , A represents a knowledge block in the knowledge base, and B represents the abnormal description information corresponding to the server abnormal indicator set. Indicates abnormal index b i The frequency of occurrence in knowledge block A, avgDL represents the average length of knowledge blocks, K1 and d are undetermined hyperparameters, and IDF(b i ) is the abnormal index b i The inverse document frequency, N is the total number of knowledge blocks extracted, n(b i ) contains abnormal index b i The total number of documents; use the retrieval formula to retrieve all knowledge blocks in the preset offline database; determine the knowledge blocks related to the abnormal description information based on the retrieval results.
[0014] In an exemplary embodiment, exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of an application programming interface, including: determining a target application programming interface corresponding to the exception description information; obtaining model fine-tuning parameters corresponding to the application programming interface, and using the model fine-tuning parameters to adjust different application programming interface tools in the preset offline database to obtain target environment data of the application programming interface tools corresponding to the exception description information.
[0015] In an exemplary embodiment, obtaining model fine-tuning parameters corresponding to an application programming interface includes: determining an objective function corresponding to the model fine-tuning parameters, wherein the objective function is , P ij Predict fault environment information C for the model i Application Programming Interface Tool j The probability of a correlation, y ij The probability that there is a correlation between the fault environment information corresponding to the current abnormal description information and the application programming interface tool; and the model fine-tuning parameters corresponding to the application programming interface are determined according to the objective function.
[0016] In an exemplary embodiment, after the target text is input into the expert model for fault diagnosis, the method further includes: obtaining multiple sub-expert models existing in the expert model; wherein each sub-expert model corresponds to a type of fault diagnosis; determining a target sub-expert model with the highest correlation with the target text among the multiple sub-expert models; and identifying the target sub-expert model as the first model for fault diagnosis of the target text.
[0017] In an exemplary embodiment, after determining the target sub-expert model with the highest correlation with the target text among multiple sub-expert models, the method further includes: when there are at least two target sub-expert models, sending a determination message to the target object for determining whether to start the asynchronous diagnosis process of the expert model, and receiving feedback from the target object on the determination message; when the feedback indicates that it is determined to start the asynchronous diagnosis process of the expert model, sending the diagnosis result of the first sub-expert model among the at least two target sub-expert models to other sub-expert models except the first sub-expert model.
[0018] In an exemplary embodiment, the target text is input into the expert model for fault diagnosis. After obtaining the target diagnosis result corresponding to the server, the method further includes: obtaining a fault repair suggestion corresponding to the target diagnosis result; using the repair operation corresponding to the fault repair suggestion to repair the fault existing in the server, and obtaining the operation log of the server after the repair is completed; determining whether there is an alarm message in the operation log to determine the repair result of the fault.
[0019] In an exemplary embodiment, after obtaining the fault repair suggestions corresponding to the target diagnostic results, the above method also includes: when there are at least two fault repair suggestions, summarizing the determination process information corresponding to each fault repair suggestion; reviewing the determination process information; determining the order of use of each fault repair suggestion based on the review results, and generating a diagnostic report corresponding to the alarm message.
[0020] According to another embodiment of the present application, a server fault diagnosis device is provided, including: an acquisition module, used to obtain exception description information corresponding to an alarm message on a server; a configuration module, used to configure the exception description information using a preset offline database, and obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information; a generation module, used to generate a prompt word set based on the document data and the target environment data, and perform preliminary screening and diagnosis on the prompt word set to obtain a target text; a diagnosis module, used to input the target text into an expert model for fault diagnosis, and obtain a target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model.
[0021] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0022] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0023] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0024] Through the present application, the exception description information corresponding to the alarm message on the server is obtained; the exception description information is configured using a preset offline database to obtain the target document data corresponding to the exception description information and the target environment data of the application programming interface associated with the exception description information; a prompt word set is generated based on the document data and the target environment data, and the prompt word set is preliminarily screened and diagnosed to obtain the target text; the target text is input into the expert model for fault diagnosis to obtain the target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model, that is, by using an offline database containing an application programming interface API tool and document data to perform fault diagnosis to improve the accuracy of the diagnosis, and after the preliminary diagnosis, the trained expert model is used for diagnosis to improve the efficiency of determining the target diagnosis result. Therefore, the problem of low efficiency and low accuracy of fault diagnosis of large-scale and highly complex server systems in related technologies is solved, thereby achieving the effect of improving the accuracy and efficiency of diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a hardware structure block diagram of a server device of a server fault diagnosis method according to an embodiment of the present application;
[0026] Figure 2 is a flow chart of a method for diagnosing a server failure according to an embodiment of the present application;
[0027] Figure 3 is a schematic diagram of the architecture of a server fault diagnosis system based on a large-scale language model according to an embodiment of the present application;
[0028] Figure 4 It is a schematic diagram of the construction of a tree structure knowledge base according to an embodiment of the present application;
[0029] Figure 5 is a structural schematic diagram of a server failure diagnosis device according to an embodiment of the present application;
[0030] Figure 6 It is a block diagram of the computer system structure of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0033] In this embodiment, a method for diagnosing a server failure is also provided. The system is used to implement the embodiments and preferred implementation modes. The descriptions that have been made are not repeated here. As used below, the terms "module" and "unit" are combinations of software and / or hardware that can implement predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0034] As an optional implementation, the method embodiment provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a server device of a server fault diagnosis method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0035] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the diagnostic method of server failure in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0036] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] In order to better understand the embodiments of the present application, the relevant terms are now explained, but they are not intended to be limiting.
[0038] Large language model (LLM): is an AI model designed to understand and generate human language. They are trained on large amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and more. LLMs are characterized by their large size and contain billions of parameters, which help them learn complex patterns in language data. These models are usually based on deep learning architectures such as transformers, which helps them achieve impressive performance on various NLP tasks.
[0039] Pretrained model: A machine learning model that has been trained on a large amount of data to facilitate a specific task (such as image classification, speech recognition, or natural language processing). These models have already learned the optimal set of weights and parameters required to perform the task effectively so that they can be used as a starting point for further training on new data or for other applications.
[0040] Large model fine-tuning (LLM finetuing): Based on the trained large model, add customized data and re-train to obtain updated model parameters, including new, local, and global updated model parameters.
[0041] In this embodiment, a method for diagnosing a server failure is provided. Figure 2 is a flow chart of a method for diagnosing a server failure according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0042] Step S202, obtaining abnormal description information corresponding to the alarm message on the server;
[0043] Step S204, configuring the exception description information using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information;
[0044] Step S206, generating a prompt word set based on the document data and the target environment data, and performing a preliminary screening and diagnosis on the prompt word set to obtain a target text;
[0045] Step S208: input the target text into an expert model for fault diagnosis to obtain a target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model.
[0046] Through the above method, the exception description information corresponding to the alarm message on the server is obtained; the exception description information is configured using a preset offline database to obtain the target document data corresponding to the exception description information and the target environment data of the application programming interface associated with the exception description information; a prompt word set is generated based on the document data and the target environment data, and the prompt word set is preliminarily screened and diagnosed to obtain the target text; the target text is input into the expert model for fault diagnosis to obtain the target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model, that is, by using an offline database containing an application programming interface API tool and document data to perform fault diagnosis to improve the accuracy of the diagnosis, and after the preliminary diagnosis, the trained expert model is used for diagnosis to improve the efficiency of determining the target diagnosis result. Therefore, the problem of low efficiency and low accuracy of fault diagnosis of large-scale and highly complex server systems in related technologies is solved, thereby achieving the effect of improving the accuracy and efficiency of diagnosis.
[0047] In an exemplary embodiment, obtaining abnormal description information corresponding to an alarm message on a server includes: determining the alarm type corresponding to the alarm message, wherein the alarm type includes at least: an abnormal alarm type; when the alarm type of the alarm message is an abnormal alarm type, parsing the alarm message to obtain the abnormal description information corresponding to the alarm message; when the alarm type of the alarm message is not an abnormal alarm type, prohibiting parsing the alarm message.
[0048] In summary, through the above implementation, when performing fault diagnosis on the alarm message reported by the server, the fault type corresponding to the alarm message is also determined, so as to quickly determine whether the current alarm message is the alarm message that causes the server abnormality, thereby ensuring the effectiveness of the fault diagnosis. This avoids the interference of other intermittent alarm messages on the fault diagnosis, and improves the diagnostic efficiency of the overall server fault diagnosis.
[0049] In an exemplary embodiment, the exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information. The method further includes: obtaining a defined knowledge format; wherein the knowledge format includes at least: the name of the abnormal fault, the fault content of the abnormal fault, the fault indicator of the abnormal fault, and the analysis steps of the abnormal fault; recording the historical fault data of the server through the knowledge format; obtaining a learning sample corresponding to the historical fault data based on the recording results, wherein the learning sample is used to train a large-scale language model; determining the historical exception description information corresponding to the learning sample, and the document data corresponding to the target learning sample; and storing the historical exception description information in association with the document data in a preset offline database.
[0050] In summary, through the above implementation, the recording of fault data in the server is realized through the definition of the knowledge format, so that after accumulating a certain amount of recording results, the large-scale language model used for fault diagnosis can be trained through the recording results to ensure the accuracy of subsequent large-scale language model fault diagnosis.
[0051] In an exemplary embodiment, the exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of the application programming interface associated with the exception description information. The above method also includes: obtaining multiple application programming interface tools required for fault diagnosis; determining the tool type corresponding to each tool in the multiple application programming interface tools and the usage specifications of the application programming interface tools; associating and binding the tool type, usage specifications, and application programming interface tools to obtain a target environment data set; and storing the target environment data set in a preset offline database.
[0052] For example, the index selection API (Application Programming Interface, API for short) tool will be classified under "Optimization" and "Configuration Tool" as its tool type. This hierarchical structure helps LLM understand. At the same time, for each API tool, a detailed usage specification (given in the form of functional annotations) is provided, including the function's description, parameters, and related use cases. This ensures the standardization of subsequent use and judgment.
[0053] In summary, through the above implementation, detailed usage specifications are set for each API tool, so that LLM can understand the functions and usage of API tools (such as CPU utilization, CPU power consumption, etc.) used in server fault diagnosis like humans, so that LLM can effectively diagnose server faults.
[0054] In an exemplary embodiment, before inputting the target text into the expert model for fault diagnosis and obtaining the target diagnosis result corresponding to the server, the method further includes: determining a first length of information that the expert model allows to be input at one time; identifying a second length corresponding to the target text; when it is determined that the first length is greater than or equal to the second length, inputting the target text into the expert model for fault diagnosis; when it is determined that the first length is less than the second length, segmenting the target text.
[0055] In an exemplary embodiment, when it is determined that the first length is less than the second length, the target text is segmented, including: constructing a target tree structure to store the target text, wherein the root node of the target tree structure represents the title content of each chapter in the target text, and the child nodes of the target tree structure represent the content of each chapter, and the content includes at least: the original content of the target text and the summary content corresponding to the original content; comparing the similarity between the content of each node in the target tree structure and other nodes; when it is determined that the similarity is greater than or equal to a preset similarity, merging the nodes in the target tree structure; when it is determined that the similarity is less than a preset similarity, sending the sub-text content corresponding to the current node to the target object for judgment.
[0056] In summary, through the above implementation, by using the tree structure, LLM can clearly understand the similarity between each node in the parsing tree and other nodes. If LLM determines that there is highly similar content, it will merge it with similar content; otherwise, it will manually judge the content. In this way, all valid information in the document is retained, and the interference of redundant information on model judgment is reduced.
[0057] In an exemplary embodiment, the exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of the application programming interface, including: using a target retrieval algorithm to search for knowledge blocks related to the exception description information from the preset offline database; configuring the exception description information through the knowledge documents carried in the knowledge blocks to obtain target document data corresponding to the exception description information.
[0058] In an exemplary embodiment, searching a knowledge block related to the abnormal description information from a preset offline database using a target retrieval algorithm includes: determining a retrieval formula corresponding to the abnormal description information according to a first formula, wherein the first formula is: , , A represents a knowledge block in the knowledge base, and B represents the abnormal description information corresponding to the server abnormal indicator set. Indicates abnormal index b i The frequency of occurrence in knowledge block A, avgDL represents the average length of knowledge blocks, K1 and d are undetermined hyperparameters, and IDF(bi ) is the abnormal index b i The inverse document frequency, N is the total number of knowledge blocks extracted, n(b i ) contains abnormal index b i The total number of documents; use the retrieval formula to retrieve all knowledge blocks in the preset offline database; determine the knowledge blocks related to the abnormal description information based on the retrieval results.
[0059] In summary, through the above implementation, the formula configuration is used to improve the execution efficiency of the retrieval, so as to quickly locate the knowledge block of the target document data corresponding to the current abnormal description information from the preset offline database to achieve preliminary diagnosis.
[0060] In an exemplary embodiment, exception description information is configured using a preset offline database to obtain target document data corresponding to the exception description information and target environment data of an application programming interface, including: determining a target application programming interface corresponding to the exception description information; obtaining model fine-tuning parameters corresponding to the application programming interface, and using the model fine-tuning parameters to adjust different application programming interface tools in the preset offline database to obtain target environment data of the application programming interface tools corresponding to the exception description information.
[0061] In an exemplary embodiment, obtaining model fine-tuning parameters corresponding to an application programming interface includes: determining an objective function corresponding to the model fine-tuning parameters, wherein the objective function is , P ij Predict fault environment information C for the model i Application Programming Interface Tool j The probability of a correlation, y ij The probability that there is a correlation between the fault environment information corresponding to the current abnormal description information and the application programming interface tool; and the model fine-tuning parameters corresponding to the application programming interface are determined according to the objective function.
[0062] In an exemplary embodiment, after the target text is input into the expert model for fault diagnosis, the method further includes: obtaining multiple sub-expert models existing in the expert model; wherein each sub-expert model corresponds to a type of fault diagnosis; determining a target sub-expert model with the highest correlation with the target text among the multiple sub-expert models; and identifying the target sub-expert model as the first model for fault diagnosis of the target text.
[0063] In other words, a single LLM has difficulty in solving complex faults. Therefore, a collaborative mechanism consisting of multiple LLMs is used, each LLM is equipped with API tools and tree search algorithms, and appropriate LLM experts are assigned to diagnose, thereby improving diagnostic efficiency.
[0064] In summary, through the above implementation, given a fault, a description of the fault is first generated (e.g., time period, alarm type, severity level). On this basis, the LLM algorithm is used to select a group of most relevant experts. For example, the CPU expert is responsible for high load alarms, and the memory expert is responsible for memory overflow alerts, ensuring flexibility in new types of faults or expert adaptation.
[0065] In an exemplary embodiment, after determining the target sub-expert model with the highest correlation with the target text among multiple sub-expert models, the method further includes: when there are at least two target sub-expert models, sending a determination message to the target object for determining whether to start the asynchronous diagnosis process of the expert model, and receiving feedback from the target object on the determination message; when the feedback indicates that it is determined to start the asynchronous diagnosis process of the expert model, sending the diagnosis result of the first sub-expert model among the at least two target sub-expert models to other sub-expert models except the first sub-expert model.
[0066] In an exemplary embodiment, the target text is input into the expert model for fault diagnosis. After obtaining the target diagnosis result corresponding to the server, the method further includes: obtaining a fault repair suggestion corresponding to the target diagnosis result; using the repair operation corresponding to the fault repair suggestion to repair the fault existing in the server, and obtaining the operation log of the server after the repair is completed; determining whether there is an alarm message in the operation log to determine the repair result of the fault.
[0067] In an exemplary embodiment, after obtaining the fault repair suggestions corresponding to the target diagnostic results, the above method also includes: when there are at least two fault repair suggestions, summarizing the determination process information corresponding to each fault repair suggestion; reviewing the determination process information; determining the order of use of each fault repair suggestion based on the review results, and generating a diagnostic report corresponding to the alarm message.
[0068] The execution subject of the above steps may be a server, a terminal, etc., but is not limited thereto.
[0069] In order to facilitate understanding of the implementation methods of the present application, relevant scenarios are now explained, but this does not limit the present application.
[0070] In related technologies, big data and neural network technology are used to evaluate the risk of faults and security incidents and the trend analysis platform, which can realize risk identification, trend analysis, safety hazard prediction, safety warning, equipment software fault resolution, and equipment hardware fault assessment, which can reduce the workload of on-duty personnel, reduce network room equipment failures and safety risks, and reduce economic losses. However, there are problems such as poor scene understanding ability, inability to use diagnostic knowledge, and the need to change corresponding parameters and retrain the model once the scene changes; and lack of inference ability.
[0071] In order to solve the above shortcomings, this application proposes a server fault diagnosis system based on a large-scale language model, which is mainly composed of modules such as abnormal alarm, offline preparation, prompt word generation, tree search-based diagnosis, and multi-expert collaborative diagnosis. Specifically, when the abnormal detection unit issues an alarm message, the above system will perform knowledge retrieval and API matching from offline prepared learning documents and API tools according to the abnormal description information, and then trigger multi-expert collaborative diagnosis to generate the final diagnosis result.
[0072] In order to explain the content of this application more clearly, the system architecture is described in detail below.
[0073] Optionally, in the system architecture, Figure 3 is a schematic diagram of the architecture of a server fault diagnosis system based on a large-scale language model according to an embodiment of the present application;
[0074] The offline preparation module 32 mainly includes: document learning and API tools. Among them, document learning is mainly to enable the big model to understand the input document information more accurately. When extracting the document content, the format of extracted knowledge is defined, including a) "name": to help LLM understand the overall function; b) "content": for each fault situation, the root cause of the fault is given; c) "indicator": a series of service fault monitoring indicators, used to generate prompt words in the process; d) "step": for each indicator, a detailed process of fault analysis is provided to provide enhanced learning samples for the big model to complete step-by-step analysis.
[0075] In addition, due to the limitation of input information length of large models, it is impossible to input a large amount of context-related server failure document information into the model. By constructing a tree-structured knowledge base, the reliability of large model input information and the correctness of model answers are ensured.
[0076] Optionally, the above-mentioned construction of the tree-structured knowledge base includes the following steps:
[0077] Step 1) Chapter segmentation: Different from the method of segmenting documents into fixed lengths, the structure and chapters of the document will be segmented according to chapters. If a block exceeds the maximum input length of the large model, it is recursively cut into smaller modules.
[0078] Step 2) Tree structure knowledge base construction: Based on the chapter segmentation content of step 1), initialize the tree structure, such as Figure 4 As shown, Figure 4This is a schematic diagram of the tree structure knowledge base constructed according to the embodiment of the present application, in which the root node represents the title content of each chapter, and the child node represents the content of each subsection or subdivision; each node includes two aspects of content, the original content of the document (as shown in the gray square), and the orange represents the summary content of the original information of the document by the large model. The LLM summary information will be used as Figure 3 An index for knowledge retrieval in , which enables blocks with similar content or relations to be matched.
[0079] Step 3) Deduplication of knowledge base: After generating the tree structure, LLM parses each node in the tree and compares its similarity with the summaries of other nodes (such as Figure 4 If LLM determines that the content is highly similar, it will be merged with the similar content; otherwise, the content will be manually judged. In this way, all valid information in the document is retained and the interference of redundant information on the model judgment is reduced.
[0080] The purpose of API tools is to enable LLM to effectively diagnose server failures and ensure that LLM can understand the API tools used in server failure diagnosis (such as CPU utilization, CPU power consumption, etc.) like humans. First, establish a structured hierarchy to classify API tools. For example, the index selection API tool will be classified under "Optimization" and "Configuration Tool" is its tool type. This hierarchy helps LLM understand. At the same time, for each API tool, a detailed usage specification (given in the form of functional annotations) is provided, including the function description, parameters, and related use cases.
[0081] Prompt word generation module 34: This part automatically generates prompt words through knowledge retrieval, such as: searching the knowledge base and API matching, that is, API tool matching. In the knowledge base retrieval stage, the BM25 algorithm is used to retrieve the knowledge block most relevant to the current anomaly from the knowledge base. The calculation formula is as follows: ; ; Where A represents a knowledge block in the knowledge base, and B represents the abnormal description information corresponding to the server abnormal indicator set. Indicates abnormal index b i The frequency of occurrence in knowledge block A, avgDL represents the average length of knowledge blocks, K1 and d are undetermined hyperparameters, and IDF(b i ) is the abnormal index b i The inverse document frequency, N is the total number of knowledge blocks extracted, n(b i ) contains abnormal index b i The total number of documents.
[0082] In the API matching stage, a fine-tuned pre-trained large model (such as Llama2, Bert) is used to match the API tool applicable to the current exception. This process includes two parts: model fine-tuning and API tool matching. During the model fine-tuning process, there is a batch of labeled data sets. , where C i Indicates the environment information when the server fails, t j Indicates API tool, y ij Is there a correlation between the fault environment information and the API tool? The objective function of model fine-tuning is as follows: ; Among them, P ij Predict fault environment information C for the model i Application Programming Interface Tool j The probability that there is a correlation is calculated by dividing t j and C i The embedding vectors of are concatenated and calculated by the sigmoid function. After fine-tuning the model, the model is used to match the appropriate API tool for current fault diagnosis. The similarity between the API tool and the fault environment information is calculated by the fine-tuned model.
[0083] ; where emb() represents the embedding vector of the fine-tuned model (such as Llama2, Bert), and finally selects the top k API tools in similarity order. Finally, the selected top-k API tools are integrated into the prompt words, including their names, function descriptions, and parameter lists. On this basis, LLM can generate call requests and obtain tool execution results to improve the diagnosis effect of fault causes.
[0084] The tree search-based fault diagnosis module 36 is used to prevent LLM from making errors in the following situations: a) making erroneous API tool calls or accepting failed requests; b) ending the diagnosis prematurely when the root cause of the fault is not diagnosed. To this end, a tree search-based diagnosis algorithm is proposed, which can trace back to the previous operation when the current operation fails or the cause of the problem cannot be found. The specific process is as follows: i) Tree initialization: Initialize a tree structure, each node represents a behavior (API tool call or analysis step 3) matched to the knowledge block), and the edge represents the order of action execution; ii) Simulation execution: This process starts from the root node of the tree according to a certain metric to the leaf node, thereby selecting the optimal execution path. The Upper Confidence Bound Applied to Trees (UCT) algorithm is selected here. ,W(n) is the number of wins after moving n times, N(n) is the number of simulations after moving n times, N(p) is the number of simulations of the parent node, and C is the exploration constant, which can be adjusted according to experience. The larger C is, the more it tends to search for breadth, and the smaller C is, the more it tends to search for depth. During the traversal process, the node with the highest UCT is selected. In the UCT function, 𝑊(𝑛) is calculated by voting through multiple LLMs. For each leaf node, LLM presents the scene context and the historical operations leading to the node. Based on the above information, LLM selects the leaf node with the highest accuracy, thereby selecting the optimal diagnostic path. On this basis, let LLM reflect on the starting point and advantages of executing each step, and add the reflected information to the corresponding node. This method not only improves the effect of the next step of analysis, but also deletes useless nodes and improves the efficiency of problem location. If LLM does not locate more fault causes within the preset time, it will use the current location result as the fault cause.
[0085] Multi-expert collaborative diagnosis module 38: Although the diagnostic accuracy is improved by API tool matching and tree search algorithm, the performance of a single LLM can be greatly improved. However, a single LLM has difficulty in solving complex faults. To solve this problem, a collaborative mechanism consisting of multiple LLMs is proposed, each equipped with API tools and tree search algorithms, and the process is as follows: a) Initialization: Initialize multiple LLM experts, each equipped with a different knowledge base and necessary API tools; b) Expert allocator: To avoid resource waste, the diagnostic efficiency is improved by assigning appropriate LLM experts to diagnose. Specifically, given a fault, a description of the fault is first generated (e.g., time period, alarm type, severity level). On this basis, the expert allocator uses the LLM algorithm to select a group of the most relevant experts. For example, the CPU expert is responsible for high load alarms, and the memory expert is responsible for memory overflow alarms. This LLM-based approach is more flexible in terms of new types of faults or expert adaptation; c) Asynchronous diagnosis: The selected experts perform diagnosis simultaneously, and each expert has a specific role and domain knowledge. On this basis, an asynchronous communication mechanism
[24] is proposed to improve the diagnostic process. For example, LLM experts in each field will publish their diagnostic findings to other LLM experts; d) Cross-diagnosis: Although experts have different domain knowledge, some common analysis results may inspire each other. Therefore, after obtaining the results of all experts in the diagnosis, cross-diagnosis is performed, with three main sub-steps: i) Summarize the intermediate information applicable to each expert in the diagnosis process (such as API tool input information, knowledge base, and diagnostic results); ii) Publish each expert's troubleshooting suggestions to other experts and review each other for errors; iii) After cross-diagnosis, each expert will incorporate more information, re-evaluate their initial diagnosis, and even make more reasonable inferences, and generate a final diagnosis report based on the above results.
[0086] In summary, through the above-mentioned service fault diagnosis overall solution framework and implementation details based on large-scale language models, an effective document learning mechanism and API tool matching method are constructed, and combined with LLM technology, an online diagnosis method algorithm based on tree search is used to accurately and effectively use API tools and knowledge bases for fault diagnosis. Furthermore, a multi-expert collaboration mechanism is designed to improve the efficiency and accuracy of fault diagnosis, reduce misjudgments, and improve the efficiency of identifying and judging server faults.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0088] In this embodiment, a server fault diagnosis device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0089] Figure 5 is a structural block diagram of a server fault diagnosis device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:
[0090] An acquisition module 52 is used to acquire the abnormal description information corresponding to the alarm message on the server;
[0091] A configuration module 54, configured to configure the exception description information using a preset offline database, and obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information;
[0092] A generating module 56, configured to generate a prompt word set based on the document data and the target environment data, and to perform a preliminary screening and diagnosis on the prompt word set to obtain a target text;
[0093] The diagnosis module 58 is used to input the target text into an expert model for fault diagnosis to obtain a target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model.
[0094] Through the above-mentioned device, the exception description information corresponding to the alarm message on the server is obtained; the exception description information is configured using a preset offline database to obtain the target document data corresponding to the exception description information and the target environment data of the application programming interface associated with the exception description information; a prompt word set is generated based on the document data and the target environment data, and the prompt word set is preliminarily screened and diagnosed to obtain the target text; the target text is input into the expert model for fault diagnosis to obtain the target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model, that is, by using an offline database containing an application programming interface API tool and document data to perform fault diagnosis to improve the accuracy of the diagnosis, and after the preliminary diagnosis, the trained expert model is used for diagnosis to improve the efficiency of determining the target diagnosis result. Therefore, the problem of low efficiency and low accuracy of fault diagnosis of large-scale and highly complex server systems in related technologies is solved, thereby achieving the effect of improving diagnostic accuracy and efficiency.
[0095] In an exemplary embodiment, the above-mentioned acquisition module is also used to obtain the abnormal description information corresponding to the alarm message on the server, including: determining the alarm type corresponding to the alarm message, wherein the alarm type includes at least: abnormal alarm type; when the alarm type of the alarm message is an abnormal alarm type, parsing the alarm message to obtain the abnormal description information corresponding to the alarm message; when the alarm type of the alarm message is not an abnormal alarm type, parsing the alarm message is prohibited.
[0096] In an exemplary embodiment, the above-mentioned device also includes: a first association module, which is used to configure the exception description information using a preset offline database, obtain the target document data corresponding to the exception description information and the target environment data of the application programming interface associated with the exception description information, and obtain the defined knowledge format; wherein the knowledge format at least includes: the name of the abnormal fault, the fault content of the abnormal fault, the fault indicator of the abnormal fault, and the analysis steps of the abnormal fault; the historical fault data of the server is recorded through the knowledge format; the learning sample corresponding to the historical fault data is obtained according to the recording results, wherein the learning sample is used to train a large-scale language model; the historical exception description information corresponding to the learning sample and the document data corresponding to the target learning sample are determined; the historical exception description information is associated with the document data and stored in the preset offline database.
[0097] In an exemplary embodiment, the above-mentioned device also includes: a second association module, which is used to configure the exception description information using a preset offline database, obtain the target document data corresponding to the exception description information and the target environment data of the application programming interface associated with the exception description information, and obtain multiple application programming interface tools required for fault diagnosis; determine the tool type corresponding to each tool in the multiple application programming interface tools and the usage specifications of the application programming interface tools; associate and bind the tool type, usage specifications, and application programming interface tools to obtain a target environment data set; and store the target environment data set in a preset offline database.
[0098] In an exemplary embodiment, the above-mentioned device also includes: a segmentation module, which is used to input the target text into the expert model for fault diagnosis, and before obtaining the target diagnosis result corresponding to the server, determine the first length of information allowed to be input at one time by the expert model; identify the second length corresponding to the target text; when it is determined that the first length is greater than or equal to the second length, input the target text into the expert model for fault diagnosis; when it is determined that the first length is less than the second length, segment the target text.
[0099] In an exemplary embodiment, the above-mentioned segmentation module is also used to construct a target tree structure for storing the target text, wherein the root node of the target tree structure represents the title content of each chapter in the target text, and the child nodes of the target tree structure represent the content of each chapter, and the content includes at least: the original content of the target text and the summary content corresponding to the original content; compare the similarity between the content of each node in the target tree structure and other nodes; when it is determined that the similarity is greater than or equal to the preset similarity, merge the nodes in the target tree structure; when it is determined that the similarity is less than the preset similarity, send the sub-text content corresponding to the current node to the target object for judgment.
[0100] In an exemplary embodiment, the above-mentioned configuration module is also used to use a target retrieval algorithm to search for knowledge blocks related to the exception description information from a preset offline database; the exception description information is configured through the knowledge documents carried in the knowledge blocks to obtain target document data corresponding to the exception description information.
[0101] In an exemplary embodiment, the configuration module is further used to determine a search formula corresponding to the abnormal description information according to a first formula, wherein the first formula is: , , A represents a knowledge block in the knowledge base, and B represents the abnormal description information corresponding to the server abnormal indicator set. Indicates abnormal index b i The frequency of occurrence in knowledge block A, avgDL represents the average length of knowledge blocks, K1 and d are undetermined hyperparameters, and IDF(bi ) is the abnormal index b i The inverse document frequency, N is the total number of knowledge blocks extracted, n(b i ) contains abnormal index b i The total number of documents; use the retrieval formula to retrieve all knowledge blocks in the preset offline database; determine the knowledge blocks related to the abnormal description information based on the retrieval results.
[0102] In an exemplary embodiment, the above-mentioned configuration module also includes determining the target application programming interface corresponding to the exception description information; obtaining the model fine-tuning parameters corresponding to the application programming interface, and using the model fine-tuning parameters to adjust different application programming interface tools in a preset offline database to obtain the target environment data of the application programming interface tool corresponding to the exception description information.
[0103] In an exemplary embodiment, the configuration module is further used to determine the objective function corresponding to the model fine-tuning parameter, wherein the objective function is , P ij Predict fault environment information C for the model i Application Programming Interface Tool j The probability of a correlation, y ij The probability that there is a correlation between the fault environment information corresponding to the current abnormal description information and the application programming interface tool; and the model fine-tuning parameters corresponding to the application programming interface are determined according to the objective function.
[0104] In an exemplary embodiment, the above-mentioned diagnosis module also includes: a first determination unit, which is used to obtain multiple sub-expert models existing in the expert model after inputting the target text into the expert model for fault diagnosis; wherein each sub-expert model corresponds to a type of fault diagnosis; determine the target sub-expert model with the highest correlation with the target text among the multiple sub-expert models; and identify the target sub-expert model as the first model for fault diagnosis of the target text.
[0105] In an exemplary embodiment, the above-mentioned diagnosis module also includes: a second determination unit, which is used to determine the target sub-expert model with the highest correlation with the target text among multiple sub-expert models, and when there are at least two target sub-expert models, send a determination message to the target object for determining whether to start the asynchronous diagnosis process of the expert model, and receive feedback from the target object on the determination message; when the feedback indicates that it is determined to start the asynchronous diagnosis process of the expert model, send the diagnosis result of the first sub-expert model among the at least two target sub-expert models to other sub-expert models except the first sub-expert model.
[0106] In an exemplary embodiment, the above-mentioned device also includes: a suggestion module, which is used to input the target text into the expert model for fault diagnosis, and after obtaining the target diagnosis result corresponding to the server, obtain the fault repair suggestion corresponding to the target diagnosis result; use the repair operation corresponding to the fault repair suggestion to repair the fault existing in the server, and obtain the operation log of the server after the repair is completed; determine whether there is an alarm message in the operation log to determine the repair result of the fault.
[0107] In an exemplary embodiment, the above-mentioned suggestion module also includes: a reporting unit, which is used to obtain the fault repair suggestion corresponding to the target diagnostic result, and when there are at least two fault repair suggestions, summarize the determination process information corresponding to each fault repair suggestion; review the determination process information; determine the use order of each fault repair suggestion according to the review result, and generate a diagnostic report corresponding to the alarm message.
[0108] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0109] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0110] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0111] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0112] Optionally, Figure 6 is a block diagram of a computer system structure of an electronic device according to an embodiment of the present application. Figure 6As shown, the computer system 800 includes a central processing unit 801 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 802 (ROM) or the program loaded from the storage part 808 to the random access memory 803 (RAM). Various programs and data required for system operation are also stored in the random access memory 803. The central processing unit 801, the read-only memory 802 and the random access memory 803 are connected to each other through a bus 804. The input / output interface 805 (Input / Output interface, i.e., I / O interface) is also connected to the bus 804.
[0113] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read therefrom is installed into the storage section 808 as needed.
[0114] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0115] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0116] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0117] The embodiments of the present application also provide a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0118] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0119] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0120] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for diagnosing server failure, characterized in that: include: Get the exception description information corresponding to the alarm message on the server; The abnormal description information is configured using a preset offline database to obtain target document data corresponding to the abnormal description information and target environment data of an application programming interface associated with the abnormal description information; Generate a prompt word set based on the document data and the target environment data, and perform preliminary screening and diagnosis on the prompt word set to obtain a target text; Inputting the target text into an expert model for fault diagnosis to obtain a target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model; the large-scale language model is a deep learning model trained using a large amount of text data; Among them, the use of a preset offline database to configure the exception description information to obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information includes: using a target retrieval algorithm to search a preset offline database for knowledge blocks related to the exception description information; configuring the exception description information through the knowledge documents carried in the knowledge blocks to obtain target document data corresponding to the exception description information; and / or determining a target application programming interface corresponding to the exception description information; obtaining model fine-tuning parameters corresponding to the application programming interface, and using the model fine-tuning parameters to adjust different application programming interface tools in the preset offline database to obtain target environment data of the application programming interface tool corresponding to the exception description information.
2. The method for diagnosing server failure according to claim 1, characterized in that: Get the exception description information corresponding to the alarm message on the server, including: Determine the alarm type corresponding to the alarm message, wherein the alarm type at least includes: an abnormal alarm type; In the case where the alarm type of the alarm message is an abnormal alarm type, parsing the alarm message to obtain the abnormal description information corresponding to the alarm message; When the alarm type of the alarm message is not an abnormal alarm type, parsing and processing the alarm message is prohibited.
3. The method for diagnosing server failure according to claim 1, characterized in that: Before configuring the exception description information using a preset offline database and obtaining target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information, the method further includes: Acquire a defined knowledge format; wherein the knowledge format at least includes: the name of the abnormal fault, the fault content of the abnormal fault, the fault indicator of the abnormal fault, and the analysis steps of the abnormal fault; Recording historical fault data of the server in the knowledge format; Obtaining a learning sample corresponding to the historical fault data according to the recording results, wherein the learning sample is used to train a large-scale language model; Determine historical anomaly description information corresponding to the learning sample, and document data corresponding to the learning sample; The historical exception description information is associated with the document data and stored in the preset offline database.
4. The method for diagnosing server failure according to claim 1, characterized in that: Before configuring the exception description information using a preset offline database and obtaining target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information, the method further includes: Access multiple application programming interface tools required for troubleshooting; Determining a tool type corresponding to each tool in the plurality of application programming interface tools and a usage specification of the application programming interface tool; Associating and binding the tool type, the usage specification, and the application programming interface tool to obtain a target environment data set; The target environment data set is stored in the preset offline database.
5. The method for diagnosing server failure according to claim 1, characterized in that: Before inputting the target text into the expert model for fault diagnosis and obtaining the target diagnosis result corresponding to the server, the method further includes: Determine a first length of information that the expert model allows to be input at one time; Identifying a second length corresponding to the target text; In the case where it is determined that the first length is greater than or equal to the second length, inputting the target text into the expert model for fault diagnosis; When it is determined that the first length is smaller than the second length, segmentation processing is performed on the target text.
6. The method for diagnosing server failure according to claim 5, characterized in that: When it is determined that the first length is less than the second length, segmenting the target text includes: Constructing a target tree structure for storing the target text, wherein the root node of the target tree structure represents the title content of each chapter in the target text, and the child nodes of the target tree structure represent the content of each chapter, and the content at least includes: the original content of the target text and the summary content corresponding to the original content; Comparing the similarity of the content between each node and other nodes in the target tree structure; When it is determined that the similarity is greater than or equal to a preset similarity, merging the nodes in the target tree structure; When it is determined that the similarity is less than a preset similarity, the sub-text content corresponding to the current node is sent to the target object for judgment.
7. The method for diagnosing server failure according to claim 1, characterized in that: Using a target retrieval algorithm to search for a knowledge block related to the abnormal description information from the preset offline database includes: The search formula corresponding to the abnormal description information is determined according to the first formula, wherein the first formula is: , , A represents a knowledge block in the knowledge base, and B represents the abnormal description information corresponding to the server abnormal indicator set. Indicates abnormal index b i The frequency of occurrence in knowledge block A, avgDL represents the average length of knowledge blocks, K1 and d are undetermined hyperparameters, and IDF(b i ) is the abnormal index b i The inverse document frequency, N is the total number of knowledge blocks extracted, n(b i ) contains abnormal index b i Total number of documents; Using the search formula to search all knowledge blocks in the preset offline database; A knowledge block related to the abnormal description information is determined according to the search result.
8. The method for diagnosing server failure according to claim 1, characterized in that: Obtaining model fine-tuning parameters corresponding to the application programming interface, including: Determine the objective function corresponding to the model fine-tuning parameters, where the objective function is , P ij Predict fault environment information C for the model i Application Programming Interface Tool j The probability of a correlation, y ij The probability that there is a correlation between the fault environment information corresponding to the current abnormal description information and the application programming interface tool; A model fine-tuning parameter corresponding to the application programming interface is determined according to the objective function.
9. The method for diagnosing server failure according to claim 1, characterized in that: After inputting the target text into the expert model for fault diagnosis, the method further includes: Acquire multiple sub-expert models existing in the expert model; wherein each sub-expert model corresponds to a type of fault diagnosis; Determine a target sub-expert model with the highest relevance to the target text among the multiple sub-expert models; The target sub-expert model is identified as a first model for fault diagnosis of the target text.
10. The method for diagnosing server failure according to claim 9, characterized in that: After determining the target sub-expert model with the highest relevance to the target text among the multiple sub-expert models, the method further includes: In the case that there are at least two target sub-expert models, sending a determination message for determining whether to start the asynchronous diagnosis process of the expert model to the target object, and receiving feedback from the target object on the determination message; In the case where the feedback indicates that the asynchronous diagnosis process of the expert model is started, the diagnosis result of the first sub-expert model among the at least two target sub-expert models is sent to other sub-expert models except the first sub-expert model.
11. The method for diagnosing server failure according to claim 1, characterized in that: After inputting the target text into the expert model for fault diagnosis and obtaining the target diagnosis result corresponding to the server, the method further includes: Obtaining fault repair suggestions corresponding to the target diagnostic result; Use the repair operation corresponding to the fault repair suggestion to repair the fault in the server, and obtain the operation log of the server after the repair is completed; Determine whether there is an alarm message in the operation log to determine the repair result of the fault.
12. The method for diagnosing server failure according to claim 11, characterized in that: After obtaining the fault repair suggestion corresponding to the target diagnosis result, the method further includes: In the case where there are at least two fault repair suggestions, summarizing the determination process information corresponding to each fault repair suggestion; Reviewing the identified process information; The order of use of each fault repair suggestion is determined based on the review results, and a diagnostic report corresponding to the alarm message is generated.
13. A server failure diagnosis device, characterized in that: include: An acquisition module is used to obtain the abnormal description information corresponding to the alarm message on the server; A configuration module, configured to configure the exception description information using a preset offline database, and obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information; A generating module, used for generating a prompt word set based on the document data and the target environment data, and performing a preliminary screening and diagnosis on the prompt word set to obtain a target text; A diagnosis module, used for inputting the target text into an expert model for fault diagnosis to obtain a target diagnosis result corresponding to the server, wherein the expert model is constructed based on a large-scale language model; the large-scale language model is a deep learning model trained using a large amount of text data; Among them, the use of a preset offline database to configure the exception description information to obtain target document data corresponding to the exception description information and target environment data of an application programming interface associated with the exception description information includes: using a target retrieval algorithm to search a preset offline database for knowledge blocks related to the exception description information; configuring the exception description information through the knowledge documents carried in the knowledge blocks to obtain target document data corresponding to the exception description information; and / or determining a target application programming interface corresponding to the exception description information; obtaining model fine-tuning parameters corresponding to the application programming interface, and using the model fine-tuning parameters to adjust different application programming interface tools in the preset offline database to obtain target environment data of the application programming interface tool corresponding to the exception description information.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 12 when executed by a processor.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 12 are implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 12 are implemented.
