Operation and maintenance failure analysis and diagnosis method and device, electronic equipment and storage medium

By combining knowledge graphs and text understanding models in the diagnosis of compilation and build failures, and integrating domain-specific small models with general large models, the method solves the problems of low accuracy and efficiency in existing technologies, achieves efficient and accurate diagnosis of the causes of operational failures, and improves user experience and problem-solving efficiency.

CN121501550APending Publication Date: 2026-02-10JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511638819.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-10
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy and efficiency in diagnosing compilation and build failures, especially when dealing with complex compilation environments, multi-stage build dependencies, and massive log data, making it difficult to balance professionalism, real-time performance, and cost-effectiveness.

Method used

This approach combines knowledge graphs and text understanding models. By matching relevant texts of operational failures with a pre-built knowledge graph, recommended question texts are determined. The causes of operational failures are then diagnosed based on these recommended question texts. By integrating domain-specific small models with general large models, efficient fault diagnosis is achieved.

Benefits of technology

It improves the accuracy and efficiency of diagnosing operational failures, enhances the efficiency of problem-solving and user experience, significantly accelerates fault diagnosis, and improves the accuracy of diagnosis and the practicality of solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501550A_ABST
    Figure CN121501550A_ABST
Patent Text Reader

Abstract

The invention provides an operation and maintenance failure analysis and diagnosis method and device, electronic equipment and a storage medium, and relates to the technical field of computers.The method comprises the steps that related texts of operation and maintenance failures are obtained, and the related texts comprise log texts and / or question texts input by a user and related to the operation and maintenance failures; matching the related text with a pre-constructed knowledge graph, and determining at least one recommended question text corresponding to the related text from the knowledge graph; and on the basis of each recommended question text, diagnosing the cause of the operation and maintenance failure. Through the related text of the operation and maintenance failure and the pre-constructed knowledge graph, accurate diagnosis and analysis of the operation and maintenance failure reason are realized, the accuracy and efficiency of diagnosis of the operation and maintenance failure reason are improved, and meanwhile, the solving efficiency of user problems and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for analyzing and diagnosing operational and maintenance failures. Background Technology

[0002] In software development and continuous integration (CI) scenarios, the analysis and diagnosis of compilation and build failures are key steps to ensure development efficiency and system stability.

[0003] Current compilation and build failure diagnosis techniques primarily rely on manual log analysis, static rule matching, traditional machine learning methods (such as logistic regression and random forests), and direct use of Large Language Models (LLMs) for error analysis. However, these methods have significant limitations when dealing with complex compilation environments, multi-stage build dependencies, and massive amounts of log data. They struggle to balance the professionalism, real-time performance, and cost-effectiveness of compilation and build analysis, resulting in low accuracy and efficiency in compilation and build failure diagnosis. Summary of the Invention

[0004] This invention provides a method, device, electronic device, and storage medium for analyzing and diagnosing operational and maintenance failures, in order to solve the problem of low accuracy and efficiency in diagnosing compilation and build failure results.

[0005] This invention provides a method for analyzing and diagnosing operational and maintenance failures, comprising: Obtain relevant texts related to the operation and maintenance failure, including key error texts corresponding to log texts, and / or, problem texts entered by the user related to the operation and maintenance failure; The relevant text is matched with a pre-constructed knowledge graph, and at least one recommended question text corresponding to the relevant text is determined from the knowledge graph; Based on the recommended question texts, diagnose the reasons for the operation and maintenance failure.

[0006] According to the present invention, a method for analyzing and diagnosing operational failures, wherein diagnosing the causes of operational failures based on the recommended problem texts includes: When the user selects any one of the recommended question texts, the target answer text corresponding to the recommended question text is determined from the knowledge graph, and the target answer text is determined as the reason for the operation and maintenance failure. or, If the user does not select any of the recommended question texts, the cause of the maintenance failure is diagnosed based on the relevant texts.

[0007] According to the present invention, a method for analyzing and diagnosing operational failures, wherein diagnosing the cause of the operational failure based on the relevant text includes: The relevant text is input into the first model to obtain the user's actual problem text output by the first model; The actual problem text is matched with the knowledge graph, and the first matching result corresponding to the actual problem text is determined from the knowledge graph; Based on the first matching result, the cause of the operation and maintenance failure is diagnosed.

[0008] According to the present invention, a method for analyzing and diagnosing operational failures, wherein diagnosing the cause of the operational failure based on the first matching result includes: If the first matching result indicates that there is a question text in the knowledge graph that matches the actual question text, the answer text corresponding to the matched question text is determined as the reason for the operation and maintenance failure.

[0009] According to the present invention, a method for analyzing and diagnosing operational failures, wherein diagnosing the cause of the operational failure based on the first matching result includes: If the first matching result indicates that there is no problem text in the knowledge graph that matches the actual problem text, the actual problem text is matched with at least one error keyword corresponding to at least one error type in the pre-built prompt word template library to obtain a second matching result; Based on the second matching result, the cause of the operation and maintenance failure is diagnosed.

[0010] According to the present invention, a method for analyzing and diagnosing operational failures, wherein diagnosing the cause of the operational failure based on the second matching result includes: If the second matching result indicates that there is a target error keyword in the prompt word template library that matches the actual problem text, the cause of the operation and maintenance failure is diagnosed based on the diagnostic logic flow corresponding to the error type to which the target error keyword belongs and the knowledge learned by the second model.

[0011] According to a method for analyzing and diagnosing operational failures provided by the present invention, the step of matching the relevant text with a pre-constructed knowledge graph and determining at least one recommended question text corresponding to the relevant text from the knowledge graph includes: A retrieval-enhanced generative model is used to determine multiple hot topic texts corresponding to the relevant texts from the knowledge graph; The similarity between the relevant text and each of the hot topic texts is determined to obtain multiple similarity scores. The top N similarity scores among the multiple similarity scores are identified as the hot topic texts, where N is a positive integer.

[0012] According to the operation and maintenance failure analysis and diagnosis method provided by the present invention, the key error text is obtained based on a text understanding model, which is trained based on sample log text and label data.

[0013] According to a method for analyzing and diagnosing operational and maintenance failures provided by the present invention, the method further includes: If the cause of the operation and maintenance failure is verified to be valid, the knowledge graph is updated based on the cause of the operation and maintenance failure.

[0014] According to a method for analyzing and diagnosing operational and maintenance failures provided by the present invention, the method further includes: Statistically analyze at least one of the following indicators: key error text compression rate, recommended question text adoption rate, and first question resolution rate; Based on at least one of the following metrics: the key error text compression rate, the recommended question text adoption rate, and the first question resolution rate, update at least one of the text understanding model, the retrieval enhancement generation model, the first model, and the second model.

[0015] The present invention also provides an operation and maintenance failure analysis and diagnosis device, comprising: The acquisition module is used to acquire relevant texts of the operation and maintenance failure, including log texts and / or user-inputted problem texts related to the operation and maintenance failure. The determination module is used to match the relevant text with a pre-built knowledge graph and determine at least one recommended question text corresponding to the relevant text from the knowledge graph; The diagnostic module is used to diagnose the reasons for the operation and maintenance failure based on the recommended question texts.

[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the operation and maintenance failure analysis and diagnosis method as described above.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the operation and maintenance failure analysis and diagnosis method as described above.

[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the operation and maintenance failure analysis and diagnosis method as described above.

[0019] The present invention provides a method, apparatus, electronic device, and storage medium for analyzing and diagnosing operational and maintenance (O&M) failures. This involves acquiring relevant text related to O&M failures, including log text and / or user-inputted question text related to the failure; matching the relevant text with a pre-built knowledge graph to determine at least one recommended question text corresponding to the relevant text; and diagnosing the cause of the O&M failure based on each recommended question text. Since the knowledge graph is built specifically for the O&M failure domain, matching the relevant text with the knowledge graph allows for the determination of at least one recommended question text to be presented to the user. Based on these recommended question texts, accurate diagnosis and analysis of the cause of the O&M failure are achieved, enabling personalized fault diagnosis for users. This improves the accuracy and efficiency of O&M failure cause diagnosis, while also enhancing user problem-solving efficiency and user experience. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is one of the flowcharts of the operation and maintenance failure analysis and diagnosis method provided by the present invention.

[0022] Figure 2 This is the second flowchart of the operation and maintenance failure analysis and diagnosis method provided by the present invention.

[0023] Figure 3 This is a schematic diagram of the operation and maintenance failure analysis and diagnosis device provided by the present invention.

[0024] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0026] To better understand the various embodiments of this application, the relevant prior art will first be described.

[0027] Existing build failure diagnosis techniques primarily rely on manual log analysis, static rule matching, traditional machine learning methods (such as logistic regression and random forests), and direct use of general large language models (LLMs) for error analysis. However, these methods have significant limitations when dealing with complex build environments, multi-stage build dependencies, and massive log data, mainly in the following aspects: (1) Limitations of General Large Models: When directly calling general large language models (such as GPT-4, deepseek, LLaMA, and Yanxi) for compilation log analysis, there are significant compatibility issues. First, general large models often trigger the token length limit due to the large log size (such as tens of thousands of lines of build output), resulting in the truncation or omission of key error information. That is, the input length (Token) limit of general large models may cause the build log to be truncated, making it impossible to fully analyze long sequence error information and affecting the accuracy of diagnosis. In addition, long context processing is inefficient and inference costs are high, making it difficult to meet the real-time requirements of high-frequency build scenarios. Second, general large models lack professional knowledge in the compilation and build domain, and the generated answers have terminological biases or logical errors, making it difficult to accurately identify the special patterns of vertical scenarios such as compilation errors, linking errors, and environment dependency issues. This results in generalized but not accurate analysis results, requiring manual knowledge base maintenance and lagging updates. Moreover, they can only respond to explicit user questions and cannot actively infer related issues based on context, resulting in a lengthy and inefficient problem-solving path.

[0028] (2) Low accuracy due to lack of vertical knowledge: Although the general-purpose model has natural language understanding capabilities, it has not been specifically trained for the compilation and build domain (such as Makefile parsing, dependency conflict detection, compiler-specific error codes, etc.), nor has it fully integrated with the knowledge base of the compilation and build domain (such as compiler error codes, build toolchain behavior patterns, system dependencies, etc.). As a result, when analyzing the reasons for build failure, the model may give seemingly reasonable but actually incorrect suggestions. The diagnostic suggestions it generates have the following problems: biased understanding of technical terms (such as linking errors, undefined symbols, missing header files); inability to associate with the contextual logic of the build toolchain (such as GCC, CMake, Bazel); and generalized suggestions (such as "check code syntax") without specific actionability. For example, the failure to associate with known defects of specific compiler versions or industry best practices of build scripts makes the diagnostic results deviate from the real problem.

[0029] (3) Limitations of Static Rules and Machine Learning Methods: Traditional methods rely on regular expressions, predefined rules, or static code analysis tools (such as static checkers and parsers), but their coverage is limited, making it difficult to cope with dynamic problems in complex build environments (such as cross-platform compatibility and implicit dependency conflicts), and also difficult to cope with the diversity of compilation errors. In addition, the rule base has high maintenance costs and cannot adapt to emerging build tools (such as Bazel and CMake) or rapidly evolving programming language features (such as the new C++20 / 23 standard). Traditional machine learning has weak generalization ability, that is, supervised learning models rely on a large amount of labeled data, but compilation error patterns evolve rapidly with the technology stack, making the model easily obsolete and unable to handle unseen error types.

[0030] (4) High cost and low efficiency of manual intervention: Existing tools (such as Jenkins plugins and log aggregation platforms) only provide raw error display, and developers still need to manually investigate the root cause. For distributed builds or microservice architectures, the implicit dependencies between multiple modules further increase the difficulty of manual analysis, and the mean time to repair (MTTR) is significantly extended.

[0031] (5) Few-shot learning and data sparsity issues: Scenarios of compilation failures have long-tail characteristics, and there is very little sample data for some rare errors (such as toolchain version conflicts and hardware architecture-related failures), making it difficult for traditional machine learning models or small-scale vertical models to learn effectively. While general large models have strong generalization ability, they may generate irrelevant or misleading conclusions when there is a lack of domain data for fine-tuning.

[0032] (6) Conflict between real-time performance and resource consumption: General-purpose large models have high inference latency and computational resource consumption, making it difficult to meet the real-time diagnostic needs of development pipelines (such as CI / CD scenarios). While lightweight models have fast response times, they cannot handle complex error chains (such as cascaded build failures) due to insufficient capacity. Existing technologies lack efficient model fusion mechanisms and cannot achieve a balance between speed and accuracy.

[0033] (7) Insufficient multimodal data processing capabilities: Build failure analysis requires simultaneous processing of structured data (such as Makefiles and build configurations), unstructured logs (such as compiler outputs and stack traces), and system environment information (such as dependency library versions and OS variables). Existing methods are mostly limited to a single data modality and lack cross-modal correlation analysis capabilities, resulting in the loss of key contextual information.

[0034] (8) Lack of dynamic environment adaptability and feedback loop: Frequent updates to the toolchain and development environment make historical training data quickly outdated, while existing models lack online learning or incremental update mechanisms, making it difficult to adapt to newly emerging error patterns. In addition, there is a lack of interactive feedback loop between the diagnostic system and developers, making it impossible to continuously optimize the model based on actual repair results.

[0035] (9) Shortcomings in interpretability and operability: Diagnostic suggestions generated by general large models may lack interpretable technical basis (such as not pointing to specific lines of code or construction steps), while traditional methods (such as log keyword matching), although intuitive, are not comprehensive. Developers find it difficult to quickly verify the correctness of the suggestions, which reduces the practical value of the methods.

[0036] The comparison shows that existing technologies have failed to effectively address the core contradictions of vertical domain knowledge fusion, long context processing, and real-time accurate analysis. There is an urgent need to combine the generalization ability of large models with the domain specificity of small models to construct a hybrid intelligent operations and maintenance (AIOPS) method that adapts to compilation and building scenarios.

[0037] The following is combined Figures 1-2 This invention describes the operation and maintenance failure analysis and diagnosis method.

[0038] Figure 1 This is one of the flowcharts illustrating the operation and maintenance failure analysis and diagnosis method provided by this invention, such as... Figure 1 As shown, the method includes the following steps 101-103.

[0039] Step 101: Obtain relevant texts related to the operation and maintenance failure. The relevant texts include key error texts corresponding to log texts, and / or problem texts related to the operation and maintenance failures entered by the user.

[0040] It should be noted that the operation and maintenance failure analysis and diagnosis method provided by this invention can be applied to the analysis and diagnosis of operation and maintenance failures in operation and maintenance vertical scenarios, such as failure analysis and diagnosis during compilation, deployment, or monitoring. The executing entity of this method can be an operation and maintenance failure analysis and diagnosis device, such as an electronic device, a large model running on the electronic device, or a control module in the operation and maintenance failure analysis and diagnosis device for executing the operation and maintenance failure analysis and diagnosis method. The operation and maintenance failure analysis and diagnosis method provided by this invention can be applied to artificial intelligence (AI) assistant tools, which use large models to execute the operation and maintenance failure analysis and diagnosis method. The large model can be GPT-4, deepseek, LLaMA, or the Yanxi large model.

[0041] Specifically, when a user's operations and maintenance fail, the user can click the AI ​​Analysis button in the AI ​​Assistant tool to obtain the log text of the operation and maintenance failure. Users can also directly input problem text related to the operation and maintenance failure into the large model. For example, the problem text entered by the user may be "How to resolve dependency conflicts?" The problem text entered by the user includes the problem text currently entered by the user and / or the problem text entered in the past.

[0042] The key error text is obtained based on a text understanding model, which is trained on sample log text and labeled data.

[0043] Specifically, the sample log text representation is the log text obtained by performing structured preprocessing on the original log text. This structured preprocessing involves segmenting the original log text based on log features (such as multi-level error stacks and dependency chain information) using regular expressions and a syntax parser. Noise filtering is then applied to the segmented log text to remove interfering words. Interfering words represent useless words, reducing their impact on the text understanding model's computation. Furthermore, segmentation can shorten the token length of the original log text, compressing the average input token from over 10k to less than 800. The label data includes at least one of the following: error type, key lines of code, and dependencies.

[0044] The text understanding model is used for terminology verification and logical consistency checks. It employs a Bidirectional Encoder Representations from Transformers (BERT) model, trained on sample log text and labeled data. This trained model is then tested and validated using test sample log text, resulting in a well-trained text understanding model for the operational failure domain. Cross-validation combining training and testing ensures the accuracy of the model's output. After obtaining the text understanding model, segmented and labeled log text acquired in real-time can be input into it to generate key error text (i.e., text summary information). This key error text includes the error type, error location, and associated components, enabling dynamic generation of key error text and compressing the average number of tokens in the input log text from over 10k to less than 800. Furthermore, entity standardization and scenario classification can be performed on the key error text to create standardized input that can be efficiently processed by large models.

[0045] Step 102: Match the relevant text with a pre-built knowledge graph, and determine at least one recommended question text corresponding to the relevant text from the knowledge graph.

[0046] Specifically, the construction of a knowledge graph includes the following steps: extracting entities from unstructured data documents (such as GCC error codes and Maven dependency coordinates) based on key error information, and constructing a searchable knowledge graph based on the extracted entities. The unstructured data documents include answer texts corresponding to historical question texts, compiler documentation, or build tool manuals. Entities in the knowledge graph correspond to question texts, question texts represent key error information, and the relationships between entities represent the answer texts corresponding to the key error information (i.e., the answer texts corresponding to the question texts). Therefore, the pre-constructed knowledge graph includes at least one question text and the answer texts corresponding to each question text, with the answer texts representing the failure reasons for each question text.

[0047] By matching the key error text and / or issue text corresponding to the log text with the pre-built knowledge graph, at least one recommended issue text corresponding to the key error text and / or issue text can be determined from the knowledge graph. The number of recommended issue texts can be set according to the actual situation and there is no limit to it. For example, the number of recommended issue texts is 3, that is, the TOP3 issue texts.

[0048] Step 103: Based on the recommended question texts, diagnose the reasons for the operation and maintenance failure.

[0049] Specifically, based on the recommended question texts, the reasons for the operational failures can be diagnosed.

[0050] Optionally, feasibility scores and risk warnings can be given for the causes of maintenance failures. For example, feasibility scores can be given based on the matching degree between historical successful cases and the causes of maintenance failures, and modification suggestions can be marked for the chain reactions that may be caused by the causes of maintenance failures, so as to assist users in making decisions on whether to adopt or reject the diagnosed causes of maintenance failures.

[0051] The present invention provides a method for analyzing and diagnosing operational failures. This method acquires relevant texts related to operational failures, including log texts and / or user-inputted question texts related to the failures. It then matches these relevant texts with a pre-built knowledge graph to determine at least one recommended question text corresponding to each relevant text. Based on these recommended question texts, the method diagnoses the cause of the operational failure. Since the knowledge graph is built specifically for the operational failure domain, matching relevant texts with the pre-built knowledge graph allows for the determination of at least one recommended question text to be presented to the user. Based on these recommended question texts, accurate diagnosis and analysis of the causes of operational failures are achieved, enabling personalized fault diagnosis for users. This improves the accuracy and efficiency of operational failure cause diagnosis, while also enhancing user problem-solving efficiency and user experience.

[0052] Optionally, the specific implementation of step 102 above includes: A retrieval-enhanced generative model is used to determine multiple hot topic texts corresponding to the relevant texts from the knowledge graph; the similarity between the relevant texts and each hot topic text is determined to obtain multiple similarity scores; the hot topic texts corresponding to the top N similarity scores are determined as the recommended question texts, where N is a positive integer.

[0053] Specifically, based on relevant text, a Retrieval-augmented Generation (RAG) model can be used to calculate recommendation weights from the knowledge graph based on three dimensions: question popularity (high-frequency failure patterns), association strength (dependency chain analysis), and processing timeliness (prioritizing urgent issues). Based on these recommendation weights, multiple hot-button question texts corresponding to the relevant texts are determined. The number of hot-button question texts can be set according to actual circumstances and is not limited in any way; for example, 100 hot-button question texts, i.e., the TOP100 question texts. Then, the similarity between the relevant texts and each hot-button question text is calculated, resulting in multiple similarity scores. All calculated similarities are sorted from largest to smallest, and the hot-button question texts corresponding to the top N similarities are determined as the recommended question texts, where N is a positive integer, for example, N = 3.

[0054] Optionally, the specific implementation of step 103 above includes: If the user selects any of the recommended question texts, the target answer text corresponding to that recommended question text is determined from the knowledge graph, and the target answer text is determined as the reason for the operation and maintenance failure; or, if the user does not select any of the recommended question texts, the reason for the operation and maintenance failure is diagnosed based on the relevant text.

[0055] Specifically, if the user selects any of the recommended question texts, it indicates that the recommended question text is the question the user actually wants to ask. The target answer text corresponding to any recommended question text is then determined from the knowledge graph, and thus the target answer text can be identified as the reason for the maintenance failure. Alternatively, if the user does not select any of the recommended question texts, it indicates that the recommended question text is not the question the user actually wants to ask. Based on the relevant text, the reason for the maintenance failure can be diagnosed.

[0056] In this embodiment, the reason for the operation and maintenance failure is determined by whether the user selects any of the recommended question texts, thereby achieving accurate diagnosis and analysis of the cause of the operation and maintenance failure and improving the accuracy and efficiency of the diagnosis of the cause of the operation and maintenance failure.

[0057] Optionally, when a user selects any of the recommended problem texts, a multi-step diagnostic process including precondition checks, environmental verification steps, and solution trials can be automatically constructed, simulating the expert troubleshooting path and significantly improving the intelligence level of fault diagnosis.

[0058] Optionally, diagnosing the cause of the operation and maintenance failure based on the relevant text includes: The relevant text is input into the first model to obtain the user's actual problem text output by the first model; the actual problem text is matched with the knowledge graph to determine the first matching result corresponding to the actual problem text from the knowledge graph; based on the first matching result, the cause of the operation and maintenance failure is diagnosed.

[0059] Specifically, the first model is used to identify the user's actual question text, that is, to identify the user's intent. The first model can be a Bidirectional Long Short-Term Memory (Bi-LSTM) model.

[0060] If the user does not select any of the recommended question texts, relevant text can be input into the first model. Alternatively, relevant text, along with the compilation environment and tool version, can be input into the first model to predict potential related questions, resulting in the user's actual question text output by the first model; for example, the actual question text might be "Whether to check GCC compatibility." The actual question text is then matched with each question text in the knowledge graph to determine the first matching result. The first matching result indicates whether there is a matching question text in the knowledge graph or not. Based on the first matching result, the cause of the operational failure can be diagnosed.

[0061] In this embodiment, the actual problem text of the user is identified by the first model to predict potential problems. Then, the actual problem text is matched with the problem texts in the knowledge graph to achieve accurate diagnosis and analysis of the cause of operation and maintenance failure, thereby improving the accuracy and efficiency of the diagnosis of the cause of operation and maintenance failure.

[0062] Optionally, if the user accepts or refuses to diagnose the cause of the operation and maintenance failure, the cause of the operation and maintenance failure can be automatically labeled with data, and the labeled data can be used to train the first model to achieve continuous improvement of the performance of the first model.

[0063] Optionally, diagnosing the cause of the operation and maintenance failure based on the first matching result includes: If the first matching result indicates that there is a question text in the knowledge graph that matches the actual question text, the answer text corresponding to the matched question text is determined as the reason for the operation and maintenance failure.

[0064] Specifically, since the question text in the knowledge graph is a stock of already occurred question text, if the first matching result indicates that there is a question text in the knowledge graph that matches the actual question text, it means that the user's actual question text is a stock of already occurred question text, and the answer text corresponding to the matched question text can be directly determined as the reason for the operation and maintenance failure.

[0065] Optionally, diagnosing the cause of the operation and maintenance failure based on the first matching result includes: If the first matching result indicates that there is no problem text in the knowledge graph that matches the actual problem text, the actual problem text is matched with at least one error keyword corresponding to at least one error type in the pre-built prompt word template library to obtain a second matching result; based on the second matching result, the cause of the operation and maintenance failure is diagnosed.

[0066] Specifically, a prompt template library is pre-built, including at least one error keyword and diagnostic logic flow corresponding to at least one error type. The number of error types can be set according to actual needs, with no limit. For example, there could be 5 or 9 error types. When there are 5 error types, they could be dependency management, syntax checking, environment configuration, build script, and resource conflict. At least one error keyword is the error keyword corresponding to each error type, and this keyword is stored in a domain terminology dictionary. After the prompt template library is built, it is provided to the second model, which is the main model.

[0067] If no matching problem text exists in the knowledge graph represented by the first matching result, it indicates that the user's actual problem text is a new problem text that has not occurred before. The actual problem text is then matched with at least one error keyword corresponding to at least one error type in the pre-built prompt word template library. In other words, the user's actual problem text is aligned with at least one error type in the prompt word template library, and the user's actual problem text is categorized into a certain error type in the prompt word template library to obtain the second matching result. Based on the second matching result, the cause of the operation and maintenance failure can be diagnosed.

[0068] In this embodiment, a second matching result is obtained by matching the actual problem text with at least one error keyword corresponding to at least one error type in a pre-built prompt word template library; then, based on the second matching result, the cause of the operation and maintenance failure is diagnosed, thereby achieving accurate diagnosis and analysis of the cause of the operation and maintenance failure and improving the accuracy and efficiency of the diagnosis of the cause of the operation and maintenance failure.

[0069] Optionally, diagnosing the cause of the operation and maintenance failure based on the second matching result includes: If the second matching result indicates that there is a target error keyword in the prompt word template library that matches the actual problem text, the cause of the operation and maintenance failure is diagnosed based on the diagnostic logic flow corresponding to the error type to which the target error keyword belongs and the knowledge learned by the second model.

[0070] Specifically, if the second matching result indicates that there are target error keywords in the prompt word template library that match the actual problem text, it means that the actual problem text has been categorized into a certain error type in the prompt word template library. Based on the diagnostic logic flow corresponding to the target error keywords and the knowledge already learned by the second model, the cause of the operation and maintenance failure can be accurately diagnosed. The knowledge already learned by the second model includes the knowledge accumulated from historical operation and maintenance failure scenarios and the text corpus used during training in historical operation and maintenance failure scenarios.

[0071] In this embodiment, since the second model has learned relevant knowledge, it has a certain professional reasoning ability. Based on the diagnostic logic flow corresponding to the error type of the matched target error keyword and the knowledge learned by the second model, it can accurately diagnose the cause of operation and maintenance failure, thereby improving the accuracy and efficiency of operation and maintenance failure cause diagnosis.

[0072] Optionally, the method further includes: If the cause of the operation and maintenance failure is verified to be valid, the knowledge graph is updated based on the cause of the operation and maintenance failure.

[0073] Specifically, after obtaining the reason for the operation and maintenance failure, the user verifies the reason for the failure and provides feedback on the verification result. If the reason for the operation and maintenance failure is verified to be valid, the reason for the failure is synchronized to the knowledge graph through a differential update algorithm to ensure that the timeliness of the knowledge graph is controlled within the hour and to ensure the accuracy of the knowledge graph.

[0074] Optionally, the method further includes: Calculate at least one of the following indicators: key error text compression rate, recommended question text adoption rate, and first question resolution rate; based on at least one of the following indicators, update at least one of the text understanding model, retrieval enhancement generation model, first model, and second model.

[0075] Specifically, based on the statistical period, at least one of the following indicators can be calculated: critical error text compression rate, recommended question text adoption rate, and first-response resolution rate. The critical error text compression rate can be obtained by comparing the critical error text obtained from the text understanding model with the target log text; that is, the ratio between the critical error text and the target log text is determined as the critical error text compression rate. The recommended question text adoption rate can be obtained based on whether a user selects at least one recommended question; that is, the ratio of recommended question texts selected by users within the statistical period to the total number of recommended question texts is determined as the recommended question text adoption rate. The first-response resolution rate can be obtained based on user feedback; that is, the ratio of the number of actual user question texts for resolved maintenance failure reasons within the statistical period to the total number of maintenance failure reasons is determined as the first-response resolution rate.

[0076] Based on at least one of the following metrics—critical error text compression rate, recommended question text adoption rate, and first-question resolution rate—update at least one of the following: text understanding model, retrieval-enhanced generative model, first model, and second model. A / B testing is then used to verify the improvement effect of the updated text understanding model, retrieval-enhanced generative model, first model, and second model, ensuring continuous performance optimization. This not only helps to promptly identify and resolve problems in the system but also provides data support for the continuous evolution of the technology.

[0077] Figure 2 This is the second flowchart of the operation and maintenance failure analysis and diagnosis method provided by the present invention, as shown below. Figure 2 As shown, the method includes steps 201-215.

[0078] Step 201: Pre-train the text understanding model. Specifically, obtain the raw log text and tag data of operational failures. The tag data includes at least one of the following: error type, key lines of code, and dependencies. Based on log features, use regular expressions and a syntax parser to segment and tag the raw log text. Then, filter the segmented log text for noise, removing some interfering words to obtain processed log text. Use the processed log text as sample log text. Train the BERT model based on the sample log text and tag data. Then, test the trained text understanding model using test sample log text to verify it, finally obtaining a trained text understanding model for the operational failure domain.

[0079] Step 202: Pre-construct a knowledge graph. The knowledge graph includes at least one question text and the corresponding answer text for each question text. The question text represents key error information, and the answer text represents the failure reason corresponding to each question text. Specifically, based on unstructured data documents, such as answer texts corresponding to historical question texts, compiler documentation, or build tool manuals, entities such as key error information (e.g., GNU Compiler Collection (GCC) error codes, Maven dependency coordinates) are extracted. Based on the extracted entities, a searchable knowledge graph can be constructed. Entities in the knowledge graph correspond to question texts, question texts represent key error information, and the relationships between entities represent the answer texts corresponding to the key error information (i.e., the answer texts corresponding to the question texts).

[0080] Step 203: Pre-build a prompt word template library. The prompt word template library includes at least one error keyword and diagnostic logic flow corresponding to each error type. Specifically, the number of error types can be set according to actual needs, without any limitation. For example, the number of error types can be 5 or 9. When the number of error types is 5, they can be dependency management, syntax checking, environment configuration, build script, and resource conflict. At least one error keyword is the error keyword corresponding to the error type, and at least one error keyword is stored in the domain terminology dictionary. After building the prompt word template library, it is provided to the second model, which is the main model.

[0081] Step 204: Obtain relevant texts related to the operation and maintenance failure. The relevant texts include key error texts corresponding to log texts, and / or, problem texts related to the operation and maintenance failures entered by the user.

[0082] Step 205: Based on the relevant text, a retrieval-enhanced generative model is used to determine multiple hot topic texts corresponding to the relevant texts from the knowledge graph; the similarity between the relevant texts and each hot topic text is determined to obtain multiple similarities; the hot topic texts corresponding to the top N similarities among the multiple similarities are determined as the recommended question texts, where N is a positive integer.

[0083] Step 206: When the user selects any one of the recommended question texts, determine the target answer text corresponding to any one of the recommended question texts from the knowledge graph, and determine the target answer text as the reason for the operation and maintenance failure.

[0084] Step 207: If the user does not select any of the recommended question texts, input the relevant text into the first model to obtain the user's actual question text output by the first model.

[0085] Step 208: Match the actual problem text with the knowledge graph, and determine the first matching result corresponding to the actual problem text from the knowledge graph.

[0086] Step 209: If there is a question text in the knowledge graph that matches the actual question text, the answer text corresponding to the matched question text is determined as the reason for the operation and maintenance failure.

[0087] Step 210: If there is no matching question text in the knowledge graph represented by the first matching result, match the actual question text with at least one error keyword corresponding to at least one error type in the pre-built prompt word template library to obtain the second matching result.

[0088] Step 211: If there are target error keywords that match the actual problem text in the second matching result characterization prompt word template library, diagnose the reason for the operation and maintenance failure based on the diagnostic logic flow corresponding to the error type to which the target error keyword belongs and the knowledge already learned by the second model.

[0089] Step 212: Conduct feasibility assessments and risk warnings for the reasons for operation and maintenance failures.

[0090] Step 213: If the user accepts or refuses to diagnose the cause of the operation and maintenance failure, the cause of the operation and maintenance failure can be automatically labeled with data, and the labeled data can be used to train the first model.

[0091] Step 214: If the cause of the operation and maintenance failure is verified to be valid, update the knowledge graph based on the cause of the operation and maintenance failure.

[0092] Step 215: Calculate at least one of the following indicators: key error text compression rate, recommended question text adoption rate, and first question resolution rate; based on at least one of the following indicators, update at least one of the following: text understanding model, retrieval enhancement generation model, first model, and second model.

[0093] The operational failure analysis and diagnosis method provided by this invention combines a domain-specific small model (i.e., the first model) with a general large model (the second model) to achieve efficient fault diagnosis for complex problems in operational failure scenarios. The domain-specific small model focuses on handling professional knowledge and terminology within a specific domain, enabling it to accurately understand the technical details in the compiled and constructed log text; while the general large model leverages its broad knowledge base and powerful semantic understanding capabilities to provide comprehensive solution suggestions and diagnose the causes of operational failures. This fusion not only accelerates fault diagnosis but also improves diagnostic accuracy and the practicality of the solutions.

[0094] The operation and maintenance failure analysis and diagnosis method provided by this invention improves the average diagnosis time of compilation and build failures by constructing a technical system of "domain knowledge embedding - dynamic interactive optimization - closed-loop learning and evolution", which significantly improves operation and maintenance efficiency. Moreover, the operation and maintenance failure analysis and diagnosis method provided by this invention provides a reusable technical paradigm for the implementation of intelligent operation and maintenance (AIOPS) in the CI vertical field. It can be applied to failure analysis and diagnosis in the process of compilation and build, deployment or monitoring, which reflects the wide applicability and promotion value of operation and maintenance failure analysis.

[0095] The operation and maintenance failure analysis and diagnosis device provided by the present invention is described below. The operation and maintenance failure analysis and diagnosis device described below can be referred to in correspondence with the operation and maintenance failure analysis and diagnosis method described above.

[0096] Figure 3 This is a schematic diagram of the structure of the operation and maintenance failure analysis and diagnosis device provided by the present invention, as shown below. Figure 3 As shown, the operation and maintenance failure analysis and diagnosis device 300 includes: an acquisition module 301, a determination module 302, and a diagnosis module 303; wherein, The acquisition module 301 is used to acquire relevant texts of the operation and maintenance failure, including log texts and / or user-inputted problem texts related to the operation and maintenance failure; The determining module 302 is used to match the relevant text with a pre-built knowledge graph and determine at least one recommended question text corresponding to the relevant text from the knowledge graph; The diagnostic module 303 is used to diagnose the cause of the operation and maintenance failure based on the recommended question texts.

[0097] The operation and maintenance failure analysis and diagnosis device provided by this invention acquires relevant texts of operation and maintenance failures, including log texts and / or user-inputted question texts related to the failures; matches these relevant texts with a pre-built knowledge graph to determine at least one recommended question text corresponding to each relevant text; and diagnoses the cause of the operation and maintenance failure based on each recommended question text. Since the knowledge graph is built specifically for the field of operation and maintenance failures, matching the relevant texts with the pre-built knowledge graph allows for the determination of at least one recommended question text to be presented to the user. Based on these recommended question texts, accurate diagnosis and analysis of the cause of the operation and maintenance failure are achieved, thereby enabling personalized fault diagnosis for users. This improves the accuracy and efficiency of diagnosing the cause of operation and maintenance failures, while also enhancing the efficiency of problem-solving and the user experience.

[0098] Optionally, the diagnostic module 303 is specifically used for: When the user selects any one of the recommended question texts, the target answer text corresponding to the recommended question text is determined from the knowledge graph, and the target answer text is determined as the reason for the operation and maintenance failure. or, If the user does not select any of the recommended question texts, the cause of the maintenance failure is diagnosed based on the relevant texts.

[0099] Optionally, the diagnostic module 303 is further configured to: The relevant text is input into the first model to obtain the user's actual problem text output by the first model; The actual problem text is matched with the knowledge graph, and the first matching result corresponding to the actual problem text is determined from the knowledge graph; Based on the first matching result, the cause of the operation and maintenance failure is diagnosed.

[0100] Optionally, the diagnostic module 303 is further configured to: If the first matching result indicates that there is a question text in the knowledge graph that matches the actual question text, the answer text corresponding to the matched question text is determined as the reason for the operation and maintenance failure.

[0101] Optionally, the diagnostic module 303 is further configured to: If the first matching result indicates that there is no problem text in the knowledge graph that matches the actual problem text, the actual problem text is matched with at least one error keyword corresponding to at least one error type in the pre-built prompt word template library to obtain a second matching result; Based on the second matching result, the cause of the operation and maintenance failure is diagnosed.

[0102] Optionally, the diagnostic module 303 is further configured to: If the second matching result indicates that there is a target error keyword in the prompt word template library that matches the actual problem text, the cause of the operation and maintenance failure is diagnosed based on the diagnostic logic flow corresponding to the target error keyword and the knowledge learned by the second model.

[0103] Optionally, the determining module 302 is specifically used for: A retrieval-enhanced generative model is used to determine multiple hot topic texts corresponding to the relevant texts from the knowledge graph; The similarity between the relevant text and each of the hot topic texts is determined to obtain multiple similarity scores. The top N similarity scores among the multiple similarity scores are identified as the hot topic texts, where N is a positive integer.

[0104] Optionally, the key error text is obtained based on a text understanding model, which is trained based on sample log text and label data.

[0105] Optionally, the operation and maintenance failure analysis and diagnosis device 300 further includes: The first update module is used to update the knowledge graph based on the reason for the operation and maintenance failure if the reason for the failure is verified to be valid.

[0106] The maintenance failure analysis and diagnosis device 300 also includes: The statistics module is used to calculate at least one of the following metrics: key error text compression rate, recommended question text adoption rate, and first question resolution rate. The second update module is used to update at least one of the text understanding model, the retrieval enhancement generation model, the first model, and the second model based on at least one of the following indicators: the key error text compression rate, the recommended question text adoption rate, and the first question resolution rate.

[0107] Figure 4 This is a schematic diagram of the physical structure of an electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device 400 may include a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, communications interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can invoke logical instructions in the memory 430 to execute an operation and maintenance failure analysis and diagnosis method. This method includes: acquiring relevant text of the operation and maintenance failure, including key error text corresponding to log text, and / or, user-inputted question text related to the operation and maintenance failure; matching the relevant text with a pre-built knowledge graph to determine at least one recommended question text corresponding to the relevant text from the knowledge graph; and diagnosing the cause of the operation and maintenance failure based on each recommended question text.

[0108] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0109] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the operation and maintenance failure analysis and diagnosis method provided by the above methods. The method includes: obtaining relevant text of the operation and maintenance failure, the relevant text including key error text corresponding to log text, and / or, question text related to the operation and maintenance failure input by the user; matching the relevant text with a pre-constructed knowledge graph, and determining at least one recommended question text corresponding to the relevant text from the knowledge graph; and diagnosing the cause of the operation and maintenance failure based on each of the recommended question texts.

[0110] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the operation and maintenance failure analysis and diagnosis method provided by the above methods. The method includes: acquiring relevant text of the operation and maintenance failure, the relevant text including key error text corresponding to log text, and / or, question text related to the operation and maintenance failure input by a user; matching the relevant text with a pre-constructed knowledge graph, and determining at least one recommended question text corresponding to the relevant text from the knowledge graph; and diagnosing the cause of the operation and maintenance failure based on each of the recommended question texts.

[0111] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for analyzing and diagnosing operational and maintenance failures, characterized in that, include: Obtain relevant texts related to the operation and maintenance failure, including key error texts corresponding to log texts, and / or, problem texts entered by the user related to the operation and maintenance failure; The relevant text is matched with a pre-constructed knowledge graph, and at least one recommended question text corresponding to the relevant text is determined from the knowledge graph; Based on the recommended question texts, diagnose the reasons for the operation and maintenance failure.

2. The operation and maintenance failure analysis and diagnosis method according to claim 1, characterized in that, The diagnosis of the reasons for the operation and maintenance failure based on the recommended question texts includes: When the user selects any one of the recommended question texts, the target answer text corresponding to the recommended question text is determined from the knowledge graph, and the target answer text is determined as the reason for the operation and maintenance failure. or, If the user does not select any of the recommended question texts, the cause of the maintenance failure is diagnosed based on the relevant texts.

3. The operation and maintenance failure analysis and diagnosis method according to claim 2, characterized in that, The diagnosis of the cause of the operation and maintenance failure based on the relevant text includes: The relevant text is input into the first model to obtain the user's actual problem text output by the first model; The actual problem text is matched with the knowledge graph, and the first matching result corresponding to the actual problem text is determined from the knowledge graph; Based on the first matching result, the cause of the operation and maintenance failure is diagnosed.

4. The operation and maintenance failure analysis and diagnosis method according to claim 3, characterized in that, The diagnosis of the cause of the operation and maintenance failure based on the first matching result includes: If the first matching result indicates that there is a question text in the knowledge graph that matches the actual question text, the answer text corresponding to the matched question text is determined as the reason for the operation and maintenance failure.

5. The operation and maintenance failure analysis and diagnosis method according to claim 3, characterized in that, The diagnosis of the cause of the operation and maintenance failure based on the first matching result includes: If the first matching result indicates that there is no problem text in the knowledge graph that matches the actual problem text, the actual problem text is matched with the error keywords corresponding to at least one error type in the pre-built prompt word template library to obtain a second matching result; Based on the second matching result, the cause of the operation and maintenance failure is diagnosed.

6. The operation and maintenance failure analysis and diagnosis method according to claim 5, characterized in that, The diagnosis of the cause of the operation and maintenance failure based on the second matching result includes: If the second matching result indicates that there is a target error keyword in the prompt word template library that matches the actual problem text, the cause of the operation and maintenance failure is diagnosed based on the diagnostic logic flow corresponding to the error type to which the target error keyword belongs and the knowledge learned by the second model.

7. The operation and maintenance failure analysis and diagnosis method according to claim 1, characterized in that, The step of matching the relevant text with a pre-constructed knowledge graph to determine at least one recommended question text corresponding to the relevant text from the knowledge graph includes: A retrieval-enhanced generative model is used to determine multiple hot topic texts corresponding to the relevant texts from the knowledge graph; The similarity between the relevant text and each of the hot topic texts is determined to obtain multiple similarity scores. The top N similarity scores from the plurality of similarity scores are identified as the hot topic texts, where N is a positive integer.

8. The method for analyzing and diagnosing operational failures according to any one of claims 1 to 7, characterized in that, The key error text is obtained based on a text understanding model, which is trained on sample log text and label data.

9. The operation and maintenance failure analysis and diagnosis method according to any one of claims 1 to 7, characterized in that, The method further includes: If the cause of the operation and maintenance failure is verified to be valid, the knowledge graph is updated based on the cause of the operation and maintenance failure.

10. The operation and maintenance failure analysis and diagnosis method according to claim 8, characterized in that, The method further includes: Statistically analyze at least one of the following indicators: key error text compression rate, recommended question text adoption rate, and first question resolution rate; Based on at least one of the following metrics: the key error text compression rate, the recommended question text adoption rate, and the first question resolution rate, update at least one of the text understanding model, the retrieval enhancement generation model, the first model, and the second model.

11. A device for analyzing and diagnosing operational failures, characterized in that, include: The acquisition module is used to acquire relevant texts of the operation and maintenance failure, including log texts and / or user-inputted problem texts related to the operation and maintenance failure. The determination module is used to match the relevant text with a pre-built knowledge graph and determine at least one recommended question text corresponding to the relevant text from the knowledge graph; The diagnostic module is used to diagnose the reasons for the operation and maintenance failure based on the recommended question texts.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the operation and maintenance failure analysis and diagnosis method as described in any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the operation and maintenance failure analysis and diagnosis method as described in any one of claims 1 to 10.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the operation and maintenance failure analysis and diagnosis method as described in any one of claims 1 to 10.