Fault analysis method and device, electronic equipment and computer program product
By obtaining the operation and maintenance field sequence in the enterprise IT system and analyzing the cause of failures using preset prediction models, the problem of poor accuracy of traditional fault analysis is solved, and the accurate analysis and processing of SaaS, PaaS and IaaS layer faults are achieved.
Patent Information
- Application Number
- CN202411699149.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-18
AI Technical Summary
Traditional failure analysis has poor accuracy in enterprise IT systems, especially in terms of comprehensive root cause analysis of SaaS, PaaS and IaaS layers.
When a target failure occurs on the business platform, the sequence of operation and maintenance fields to be detected is obtained and the preset prediction model is used to analyze it, and the estimated cause of the failure, the associated failure and their respective scores are obtained. Combining the word vector similarity, determine the estimated fault cause with the highest predicted fault score as the target fault cause, and generate disposal opinions for that reason.
It realizes accurate positioning and analysis of enterprise IT system failures, and generates effective disposal opinions, thereby improving the accuracy and efficiency of fault handling.
Smart Images

Figure CN119847800A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a fault analysis method, device, electronic equipment and computer program product. Background Art
[0002] With the acceleration of the digital transformation and upgrading of enterprises, the continuous evolution of enterprise IT system architecture, especially the introduction of new technologies such as microservices, open source middleware, and cloud computing, the system platform is divided into multiple layers, such as SaaS / PaaS / IaaS layers. At the same time, due to the trend of cloud-based system platforms, operators are involved in a large number of cloud-based business platforms. The traditional root cause analysis of the service layer based on call chain data can no longer meet the requirements of comprehensive enterprise monitoring. It is mainly manifested in the following aspects: lack of comprehensive analysis of the SaaS service layer, including root cause services, root cause instances, root cause interfaces, root cause SQL execution, etc.; lack of comprehensive root cause analysis of the PaaS layer component layer dimension; lack of comprehensive root cause analysis of the IaaS resource layer dimension. In other words, traditional fault analysis has the problem of poor accuracy.
[0003] With regard to the problem of poor accuracy of the above-mentioned traditional fault analysis, no effective solution has been proposed so far. Summary of the invention
[0004] The embodiments of the present invention provide a method, an apparatus, an electronic device and a computer program product for fault analysis, so as to at least solve the technical problem that conventional fault analysis has poor accuracy.
[0005] According to one aspect of an embodiment of the present invention, a method for fault analysis is provided, comprising: in the event that a target fault occurs on a service platform, obtaining a sequence of operation and maintenance fields to be detected of the service platform, wherein the sequence of operation and maintenance fields to be detected comprises: a plurality of fields to be detected arranged in chronological order, each of the fields to be detected being used to indicate the operation and maintenance status of the service platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence being used to indicate the operation and maintenance status of the service platform at the time point when the target fault occurs; using a preset prediction model to analyze the plurality of fields to be detected in the sequence of operation and maintenance fields to be detected, obtaining at least one estimated fault cause leading to the target fault, and an estimated fault score of each estimated fault cause, as well as at least one associated fault of the target fault, an associated fault cause of each associated fault, and an associated fault score of each associated fault cause; obtaining a predicted fault score corresponding to each estimated fault cause based on at least one of the estimated fault scores and at least one of the associated fault scores, combined with the similarity of the word vectors between the target fault and the associated fault; determining the estimated fault cause with the highest predicted fault score as the target fault cause, and generating a target handling opinion for the target fault cause.
[0006] Optionally, the preset prediction model includes: a first prediction model and a second prediction model, and the method further includes: detecting whether the estimated fault cause is a hot fault cause, wherein the number of occurrences of the hot fault cause within a preset time period exceeds a preset number threshold; when the estimated fault cause does not belong to the hot fault cause, using the first prediction model to analyze the sequence of operation and maintenance fields to be detected to obtain a predicted fault score corresponding to each of the estimated fault causes, wherein the first prediction model is used at least to predict a first prediction score for each estimated fault cause, and the first prediction score is combined with an average estimated fault score of at least one of the estimated fault causes, the target fault cause, and the predicted fault score. The predicted fault score corresponding to each of the estimated fault causes is determined by the similarity of the word vectors between the target fault and the associated fault and at least one of the associated fault scores; when the estimated fault cause belongs to the popular fault cause, the sequence of operation and maintenance fields to be detected is analyzed using the second prediction model to obtain the predicted fault score corresponding to the estimated fault cause, wherein the second prediction model determines the predicted fault score corresponding to the estimated fault cause based on the average estimated fault score of at least one of the estimated fault causes, the similarity of the word vectors between the target fault and the associated fault, at least one of the associated fault scores and a second prediction score pre-set for the popular fault cause.
[0007] Optionally, before detecting whether the estimated fault cause is a popular fault cause, the method also includes: obtaining a preset operation and maintenance field sequence of the business platform within the preset time period, wherein the preset operation and maintenance field sequence includes multiple preset fields; analyzing the multiple preset fields in the preset operation and maintenance field sequence to obtain multiple preset fault causes that occur on the business platform within the preset time period; counting the number of occurrences of the same preset fault cause within the preset time period; and determining the preset fault cause whose number of occurrences exceeds the preset number threshold as the popular fault cause.
[0008] Optionally, the method further comprises: identifying a sample data set in the operation and maintenance text material of the business platform, wherein the operation and maintenance text material comprises at least: a historical operation and maintenance field sequence of the business platform when historical failures occur, a historical failure cause of each of the historical failures, and a historical handling opinion corresponding to each of the historical failure causes, the historical operation and maintenance field sequence comprises a plurality of historical fields, the historical field at the end of the historical operation and maintenance field sequence represents the operation and maintenance status of the business platform at the time point when the historical failure occurs, and the sample data set comprises a plurality of groups of training data, each group of the training data comprises: a historical failure cause determined based on the historical operation and maintenance field sequence, and the historical failure cause The corresponding historical handling opinions; use the sample data set for self-supervised pre-training to obtain a pre-trained model; use a fault handling question and answer pair set to perform supervised adjustment on the pre-trained model to obtain a pre-adjusted model, wherein each fault handling question and answer pair in the fault handling question and answer pair set includes: a sample fault cause and a corresponding sample handling opinion; use the pre-adjusted model to analyze a plurality of preset test fault causes to obtain a plurality of test handling opinions for each of the test fault causes, sort the plurality of test handling opinions for the same test fault cause in order of confidence from high to low, and adjust the pre-adjusted model based on the sorting result of the test handling opinions to obtain the preset prediction model.
[0009] Optionally, the historical operation and maintenance field sequence is processed as follows: P(u i )=softmax(h n W e T ); where h is the input of each input layer in the pre-trained model, n is the number of layers of the pre-trained model, and the input of the 0th layer of the pre-trained model is: h0 = UW e +W p , the input of the non-0 layer l of the pre-trained model is: U = (ui-k, ..., ui-1) represents the first k historical fields of the i-th historical field, We represents the word encoding matrix; Wp represents the word position encoding matrix, and P(ui) is the probability distribution of the i-th field predicted by the pre-trained model.
[0010] Optionally, the confidence level of each of the test disposition opinions is calculated based on the following preset confidence model: Among them, x is the cause of the test failure, y is the test handling opinion, Pf represents the conditional probability of the pre-adjustment model f, θ represents the parameter vector of the pre-adjustment model f, and ||yi|| is used to eliminate the influence of the length of the test handling opinion on the confidence.
[0011] Optionally, the method further comprises: determining a ranking loss value L according to the difference in confidence between the test disposal opinions. rank ,in, ri<rj means that the ranking of the test treatment opinion yj is higher than the ranking of the test treatment opinion yi; superimposing the ranking loss value and the supervised learning loss value L ft , get the target loss value, where L ft =-∑ t logP f (y i′ |x), i′=argmax i r i , x is the cause of the test failure, y is the test handling opinion, Pf represents the conditional probability of the pre-adjustment model f, and t is the number of update iterations of the model parameters; the model parameters of the pre-adjustment model are adjusted based on the target loss value to obtain the preset prediction model.
[0012] According to another aspect of an embodiment of the present invention, a fault analysis device is also provided, comprising: an acquisition module, used to acquire a sequence of operation and maintenance fields to be detected of the business platform when a target fault occurs on the business platform, wherein the sequence of operation and maintenance fields to be detected comprises: a plurality of fields to be detected arranged in chronological order, each of the fields to be detected being used to represent the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence being used to represent the operation and maintenance status of the business platform at the time point when the target fault occurs; an analysis module, used to use a preset prediction model to analyze the plurality of fields to be detected in the sequence of operation and maintenance fields The field is analyzed to obtain at least one estimated fault cause leading to the target fault, and an estimated fault score of each of the estimated fault causes, as well as at least one associated fault of the target fault, an associated fault cause of each of the associated faults, and an associated fault score of each of the associated fault causes; based on at least one of the estimated fault scores and at least one of the associated fault scores, combined with the similarity of the word vectors between the target fault and the associated faults, a predicted fault score corresponding to each of the estimated fault causes is obtained; the estimated fault cause with the highest predicted fault score is determined as the target fault cause, and a target handling opinion for the target fault cause is generated.
[0013] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned fault analysis method through the computer program.
[0014] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions, which implement the steps of the above fault analysis method when executed by a processor.
[0015] In an embodiment of the present invention, when a target fault occurs on a business platform, a preset prediction model is used to analyze a sequence of operation and maintenance fields to be detected in which the target fault occurs, so as to obtain at least one estimated fault cause leading to the target fault, at least one associated fault of the target fault, and at least one associated fault cause leading to the associated fault, and determine an estimated fault score for each estimated fault cause and an associated fault score for each associated fault cause, and combine the estimated fault score of each estimated fault cause, the associated fault score of each associated fault cause, and the similarity of the word vectors between the target fault and the associated fault to obtain a predicted fault score corresponding to each estimated fault cause, and then determine the estimated fault cause with the highest predicted fault score among multiple estimated fault causes as the target fault cause, thereby achieving a technical effect of accurately determining the target fault cause leading to the target fault, and based on the accurately determined target fault cause, an accurate target handling opinion can be generated, and then based on the target handling opinion, the target fault can be accurately handled, thereby solving the technical problem of poor accuracy in traditional fault analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 is a flow chart of a method for fault analysis according to an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of an end-to-end fault handling process of a service platform according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of a fault analysis device according to an embodiment of the present invention;
[0020] Figure 4 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0024] End-to-end monitoring: A monitoring system that integrates multiple monitoring components and tools can comprehensively monitor and manage the entire application system, including the entire application chain from the client to the server. This monitoring platform can help operation and maintenance personnel quickly locate and solve problems when the system is abnormal or fails.
[0025] According to an embodiment of the present invention, a method embodiment of fault analysis is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0026] Figure 1 is a flow chart of a method for fault analysis according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0027] Step S102: when a target fault occurs on a business platform, a sequence of operation and maintenance fields to be detected of the business platform is obtained, wherein the sequence of operation and maintenance fields to be detected includes: a plurality of fields to be detected arranged in chronological order, each field to be detected is used to indicate the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence is used to indicate the operation and maintenance status of the business platform at the time point when the target fault occurs;
[0028] Step S104, using a preset prediction model to analyze multiple fields to be detected in the sequence of operation and maintenance fields to be detected, to obtain at least one estimated fault cause leading to the target fault, and an estimated fault score for each estimated fault cause, as well as at least one associated fault of the target fault, an associated fault cause of each associated fault, and an associated fault score for each associated fault cause; based on at least one estimated fault score and at least one associated fault score, combined with the similarity of the word vectors between the target fault and the associated fault, to obtain a predicted fault score corresponding to each estimated fault cause; the estimated fault cause with the highest predicted fault score is determined as the target fault cause, and a target handling opinion for the target fault cause is generated.
[0029] In an embodiment of the present invention, when a target fault occurs on a business platform, a preset prediction model is used to analyze a sequence of operation and maintenance fields to be detected in which the target fault occurs, so as to obtain at least one estimated fault cause leading to the target fault, at least one associated fault of the target fault, and at least one associated fault cause leading to the associated fault, and determine an estimated fault score for each estimated fault cause and an associated fault score for each associated fault cause, and combine the estimated fault score of each estimated fault cause, the associated fault score of each associated fault cause, and the similarity of the word vectors between the target fault and the associated fault to obtain a predicted fault score corresponding to each estimated fault cause, and then determine the estimated fault cause with the highest predicted fault score among multiple estimated fault causes as the target fault cause, thereby achieving a technical effect of accurately determining the target fault cause leading to the target fault, and based on the accurately determined target fault cause, an accurate target handling opinion can be generated, and then based on the target handling opinion, the target fault can be accurately handled, thereby solving the technical problem of poor accuracy in traditional fault analysis.
[0030] In the above step S102, the sequence of operation and maintenance fields to be detected is a field sequence of a preset length intercepted from the field to be detected that represents the operation and maintenance status of the business platform, wherein the operation and maintenance status of the business platform is represented by multiple fields to be detected arranged in chronological order, and the field to be detected at the last position in the sequence of operation and maintenance fields to be detected represents the operation and maintenance status at the time point when the target fault occurs.
[0031] In the above step S104, the associated fault may be a preceding fault of the target fault, or the associated fault may be a known fault whose word vector similarity with the target fault is greater than a preset threshold.
[0032] In the above step S104, the preset prediction model can determine the corresponding estimated fault score for at least one estimated fault cause causing the target fault, and can also combine the estimated fault scores of multiple estimated fault causes and the associated fault scores of multiple associated fault causes, and the predicted fault score corresponding to each estimated fault cause, wherein the predicted fault score is the final fault score determined for the estimated fault cause.
[0033] In the above step S104, the preset prediction model may also determine the associated fault score corresponding to each associated fault cause by analyzing the estimated fault score corresponding to each estimated fault cause.
[0034] In the above step S104, the estimated fault score of each estimated fault cause may be divided into a first prediction score and a second prediction score.
[0035] As an optional embodiment, the preset prediction model includes: a first prediction model and a second prediction model, and the method further includes: detecting whether the estimated fault cause is a hot fault cause, wherein the number of occurrences of the hot fault cause within a preset time period exceeds a preset number threshold; when the estimated fault cause does not belong to the hot fault cause, using the first prediction model to analyze the operation and maintenance field sequence to be detected to obtain a predicted fault score corresponding to each estimated fault cause, wherein the first prediction model is at least used to predict a first prediction score for each estimated fault cause, and the first prediction score is combined with an average estimated fault score of at least one estimated fault cause, a similarity of a word vector between a target fault and an associated fault, and at least one associated fault score to determine a predicted fault score corresponding to each estimated fault cause; when the estimated fault cause belongs to the hot fault cause, using the second prediction model to analyze the operation and maintenance field sequence to be detected to obtain a predicted fault score corresponding to the estimated fault cause, wherein the second prediction model determines the predicted fault score corresponding to the estimated fault cause based on the average estimated fault score of at least one estimated fault cause, the similarity of a word vector between a target fault and an associated fault, at least one associated fault score, and a second prediction score pre-set for the hot fault cause.
[0036] In the above-mentioned embodiment of the present application, a popular fault cause is a frequently occurring fault cause, and the popular fault cause has a large number of samples. Therefore, a more accurate and clear second prediction score can be provided for the popular fault cause. Then, when analyzing the predicted fault score corresponding to the estimated fault cause, it is possible to first determine whether the estimated fault cause is a popular fault cause. When the estimated fault cause does not belong to the popular fault cause, the first prediction model can be used for analysis, and the estimated fault score corresponding to the estimated fault cause can be determined as the first prediction score, and the predicted fault score corresponding to the estimated fault cause can be further determined based on the first prediction score; when the estimated fault cause belongs to the popular fault cause, the second prediction model can be used for analysis, and the estimated fault score corresponding to the estimated fault cause can be determined as the second prediction score, and the predicted fault score corresponding to the estimated fault cause can be further determined based on the second prediction score.
[0037] Optionally, the first prediction model is:
[0038]
[0039] Where u represents the target fault, i represents the estimated fault cause, and P(u,i) represents the predicted fault score of the estimated fault cause i. represents the average score of the target fault u (such as the average estimated fault score of at least one of the estimated fault causes leading to the target fault), P u The word vector representing the target fault name, v represents the associated fault of the target fault, and P v The word vector representing the associated fault name of the associated fault v, sim (P u ,P v ) indicates P u and P v The word vector similarity between them, V represents the set of all associated faults of the target fault, r vi represents the correlation fault score of the correlation fault cause that causes the correlation fault v, represents the average score of the associated fault v (e.g., the average of the scores of at least one associated fault), r ui Represents the first prediction score.
[0040] Optionally, the second prediction model is specifically:
[0041]
[0042] Among them, r b Represents the second prediction score, the second prediction score r b It is a preset fixed score, and other parameters are the same as those in the first prediction model.
[0043] As an optional embodiment, before detecting whether the estimated fault cause is a popular fault cause, the method also includes: obtaining a preset operation and maintenance field sequence of the business platform within a preset time period, wherein the preset operation and maintenance field sequence includes multiple preset fields; analyzing the multiple preset fields in the preset operation and maintenance field sequence to obtain multiple preset fault causes that occur on the business platform within the preset time period; counting the number of occurrences of the same preset fault cause within the preset time period; and determining a preset fault cause whose number of occurrences exceeds a preset number threshold as a popular fault cause.
[0044] In the above-mentioned embodiment of the present application, based on the historical fault information of the final fault device, statistics are collected on the preset fault causes at different occurrence times to obtain the number of occurrences of each preset fault cause. When the number of occurrences of the preset fault cause is greater than or equal to the preset number, the preset fault cause is determined to be a hot fault cause, thereby realizing the determination of the hot fault cause.
[0045] As an optional embodiment, the method further includes: identifying a sample data set in the operation and maintenance text data of the business platform, wherein the operation and maintenance text data at least includes: a historical operation and maintenance field sequence of the business platform when a historical failure occurs, a historical failure cause of each historical failure, and a historical handling opinion corresponding to each historical failure cause, the historical operation and maintenance field sequence includes multiple historical fields, and the historical field at the last position in the historical operation and maintenance field sequence represents the operation and maintenance status of the business platform at the time point when the historical failure occurs, and the sample data set includes multiple groups of training data, each group of training data includes: a historical failure cause determined based on the historical operation and maintenance field sequence, and a historical handling opinion corresponding to the historical failure cause. Corresponding historical handling opinions; using a sample data set for self-supervised pre-training to obtain a pre-trained model; using a fault handling question and answer pair set to perform supervised adjustment on the pre-trained model to obtain a pre-adjusted model, wherein each fault handling question and answer pair in the fault handling question and answer pair set includes: a sample fault cause and a corresponding sample handling opinion; using the pre-adjusted model to analyze multiple preset test fault causes to obtain multiple test handling opinions for each test fault cause, sorting multiple test handling opinions for the same test fault cause in order from high to low confidence, and adjusting the pre-adjusted model based on the sorting results of the test handling opinions to obtain a preset prediction model.
[0046] In the above-mentioned embodiment of the present application, the preset prediction model can be trained according to the operation and maintenance text data of the business platform. By processing the operation and maintenance text data, a sample data set can be obtained, and then the sample data set is used for self-supervised pre-training to obtain a pre-trained model, and then the pre-trained model is supervised and adjusted using a pre-configured fault handling question and answer set to obtain a more accurate pre-adjusted model; finally, the pre-adjusted model is used to analyze the preset multiple test fault causes to obtain multiple test handling opinions for each test fault cause, and the obtained multiple test handling opinions are sorted in order from high to low according to the confidence level, and then the pre-adjusted model is further adjusted based on the test handling opinions to obtain a more accurate preset prediction model, so that when training the preset prediction model, based on self-supervised pre-training and supervised fine-tuning, as well as alignment training and fine-tuning based on confidence feedback, it is possible to achieve rapid training of the preset prediction model while ensuring that the trained preset prediction model has better accuracy.
[0047] As an optional embodiment, the historical operation and maintenance field sequence is processed as follows: P(u i )=softmax(h n W e T ); where h is the input of each input layer in the pre-trained model, n is the number of layers in the pre-trained model, and the input of the 0th layer of the pre-trained model is: h0 = UW e +W p , the input of the non-0 layer l of the pre-trained model is: U = (ui-k, ..., ui-1) represents the first k historical fields of the i-th historical field, We represents the word encoding matrix; Wp represents the word position encoding matrix, and P(ui) is the probability distribution of the i-th field predicted by the pre-trained model.
[0048] In the above-mentioned embodiments of the present application, the pre-trained model adopts the Transformer architecture. The Transformer only uses the self-attention mechanism to process the input sequence and the output sequence, which enables parallel calculations, greatly improves the calculation efficiency, and can quickly identify the historical fault causes of each historical fault and the historical handling opinions corresponding to each historical fault cause from the historical operation and maintenance field sequence.
[0049] As an optional embodiment, each test disposition opinion is calculated according to the confidence level based on the following preset confidence model: Among them, x is the cause of the test failure, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, θ represents the parameter vector of the pre-adjustment model f, and ||yi|| is used to eliminate the influence of the length of the test disposal opinion on the confidence.
[0050] In the above-mentioned embodiment of the present application, after using the pre-adjustment model to analyze the preset multiple test failure causes and obtaining multiple test handling opinions for each test failure cause, the confidence of each test handling opinion can be calculated through the preset confidence model, and then the multiple test handling opinions for a test failure cause can be sorted based on the calculated confidence.
[0051] As an optional embodiment, the ranking loss value L is determined according to the difference in confidence between the test treatment opinions. rank ,in, ri<rj means that the ranking of the test treatment opinion yj is higher than the ranking of the test treatment opinion yi; the superposition ranking loss value and the supervised learning loss value L ft , get the target loss value, where L ft =-∑ t logP f (y i′ |x), i′=arg max i r i , x is the cause of the test failure, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, and t is the number of update iterations of the model parameters; the model parameters of the pre-adjustment model are adjusted based on the target loss value to obtain the preset prediction model.
[0052] The above-mentioned embodiment of the present application, based on the ranking loss value, implements further adjustment of the pre-adjustment model based on the ranking results of the test disposal opinions to obtain a preset prediction model with more accurate prediction results.
[0053] The present invention also provides a preferred embodiment, which provides an end-to-end fault handling method for a business platform, which can improve the efficiency of existing business fault locating, so as to accurately perform fault potential analysis and decision-making during the operation of the business platform.
[0054] Figure 2 FIG. 1 is a schematic diagram of an end-to-end fault handling process of a service platform according to an embodiment of the present invention. Figure 2 As shown, the following steps are included:
[0055] Step S202, obtaining the operation and maintenance text data of the business platform.
[0056] Among them, the operation and maintenance text materials include: business platform specifications, business standards, alarm analysis, fault cases, SaaS, PaaS, IaaS layers, etc. Based on the operation and maintenance text materials, self-supervised pre-training of the operation and maintenance large model can be carried out.
[0057] Specifically, the bytes in the operation and maintenance text of the business platform are encoded in Unicode, and the position of each word is recorded to form a sequence U = {u1, ..., u n}.
[0058] Optionally, the operation and maintenance model adopts the Transformer architecture, which performs the following processing on the input operation and maintenance text sequence:
[0059] h0=UW e +W p ;
[0060]
[0061] P(u i )=softmax(h n W e T );
[0062] Among them, h0 represents the input of the operation and maintenance model, 0 represents the input layer of the operation and maintenance model; U = (u i-k , ..., u i-1 ) represents the first k bytes of the i-th byte, where the i-th byte is the byte where the fault point is located; W e represents the word encoding matrix; W p represents the word position encoding matrix; h l represents the input of the operation and maintenance model, l represents the input layer of the operation and maintenance model; n represents the number of layers of the operation and maintenance model based on the Transformer architecture, which is consistent with the dimension of the operation and maintenance text sequence U; P(u i ) is the probability distribution of the i-th byte predicted by the model.
[0063] Optionally, calculate the loss function L1 of the current operation and maintenance model:
[0064] L1(U)=-∑ i logP f (u i ∣u i-k ,…,u i-1 ;θ);
[0065] Where L1(U) represents the loss function of the operation and maintenance model in the pre-training stage; i represents the sequence number of the i-th byte in the text sequence; k represents the first k bytes of the business platform operation and maintenance text sequence; P f represents the conditional probability of the operation and maintenance model f, and θ represents the parameter vector of the operation and maintenance model f.
[0066] Optionally, in the step of updating the model parameters of the Transformer-based operation and maintenance large language model based on the AdaGrad method based on the L1 loss, the update expression is:
[0067]
[0068] Where gt represents the gradient vector of the parameter vector θt+1; t is the number of iterations of model parameter update in the pre-training phase; α is the total learning rate, and ∈ represents a smoothing term to avoid division by zero.
[0069] Step S204, using instruction learning to perform supervised fine-tuning on the self-supervised pre-trained operation and maintenance large model, and obtain the supervised fine-tuned operation and maintenance large model (that is, obtain the first prediction model).
[0070] It should be noted that the purpose of this supervised fine-tuning is to enable the fine-tuned model to perform alarm discovery, analysis, fault handling and recovery, and output fault analysis results and handling opinions.
[0071] Specifically, the business platform fault handling question and answer pairs are subjected to instruction learning, wherein a question and answer in the fault handling question and answer pair set is represented as Q=(y1, ..., y n |x1,...,x n ), where x1, ..., x n is the business platform alarm problem, y1,...,y n At the same time, when the operation and maintenance large model trained in step S202 is fine-tuned in a supervised manner, the loss function L2 of the operation and maintenance large model in the fine-tuning stage is calculated:
[0072] L2(Q)=-∑ (x,y) logP f (y 1 ,…,y n ∣x 1 ,…,x n θ f );
[0073] Among them, L2(Q) is the loss function of the operation and maintenance model in the fine-tuning stage; f represents the operation and maintenance model.
[0074] Optionally, the AdaGrad method is used to update the model parameters based on the L2 loss, and the update expression is:
[0075]
[0076] Where t+1 and t+2 represent the number of iterations of model parameter update in the fine-tuning stage.
[0077] Step S206, fine-tune the supervised fine-tuned large model again using human feedback alignment training to obtain the operation and maintenance large model that has been aligned with human feedback (i.e., obtain the second prediction model).
[0078] Specifically, the operation and maintenance big model is given to the operation and maintenance personnel for testing. Each time, the operation and maintenance personnel provide the big model with an alarm problem x=(x1, ..., x m ), the operation and maintenance model will give d answers according to the prediction rules. The operation and maintenance personnel will sort the answers given by the operation and maintenance model according to the rationality of the answers, and give the first answer y1 to the dth answer y d Through the ranking given by the operation and maintenance personnel, a loss function suitable for model training is constructed. For answers with higher rankings, there should be a greater probability of output.
[0079] Optionally, the confidence of the answer whose output ranking R(x, yi)=ri is calculated by the calculation model, and the specific calculation formula is as follows:
[0080]
[0081] Among them, ||y i || is used to eliminate the impact of answer length on answer confidence. The ranking loss value can be calculated by the difference between answer confidences:
[0082]
[0083] Among them, r i <r j Refers to the answer y j rank higher than y i At the same time, we hope that the model can learn the answer with the highest score, so we also increase the loss value of some fine-tuning supervised learning, which is expressed as:
[0084] i′=arg max i r i
[0085]
[0086] Then the final loss function value is: L3=L rank +L ft .
[0087] Optionally, the AdaGrad method is used to update the model parameters based on the L3 loss. The main update steps are as follows:
[0088]
[0089] Here, t is the number of iterations.
[0090] Step S208, according to the alarm information of the business platform, the target fault root cause of the host being in an abnormal working state that finally generates the alarm is determined through the operation and maintenance big model, and a corresponding answer is given. That is, the first prediction model and the second prediction model are used to perform prediction to obtain a prediction result.
[0091] Specifically, for the alarm information of the service platform, various fault alarms are processed by the first prediction model to obtain the prediction score of each fault root cause. The first prediction model is:
[0092]
[0093] Where u represents the target fault, i represents the fault cause, and P(u,i) represents the prediction score of fault cause i. represents the average score of the target fault u, P u The word vector representing the target fault name, v represents the associated fault of the target fault, and P v The word vector representing the associated fault name of the associated fault v, sim (P u ,P v ) indicates P u and P v The word vector similarity between them, V represents the set of all associated faults of the target fault, r vi represents the score of the fault cause that caused the associated fault v, represents the average score of the associated fault v, r ui Indicates the first preset score.
[0094] Optionally, the historical fault information of the final faulty device includes multiple faults and scores of multiple fault causes causing the faults, and the multiple faults include associated faults v and target faults u.
[0095] Optionally, The acquisition method includes: obtaining scores of multiple fault causes that cause the target fault from historical fault information; and determining the average value of the scores of the multiple fault causes as the average score of the target fault.
[0096] Optionally, How to obtain The method of obtaining is similar.
[0097] Optionally, r ui It indicates that when the fault cause i of the target fault u is an error cause and the score of the fault cause i that causes the target fault u is the highest, the first preset score needs to be subtracted.
[0098] Optionally, based on the historical fault information of the final faulty device, the fault causes at different occurrence times are counted to obtain the number of occurrences of the fault cause, and when the number of occurrences of the fault cause is greater than or equal to a preset number, the fault cause is determined to be a hot cause.
[0099] Optionally, when the fault cause is a popular cause, the auxiliary decision-making device determines the prediction score of the fault cause by using a second prediction model, wherein the second prediction model is specifically:
[0100]
[0101] Among them, r b represents the second preset score, the second preset score r b A preset fixed score.
[0102] Optionally, when the fault cause is a non-popular cause, the second preset score is determined as the predicted score of the fault cause; and the fault cause with the largest predicted score among the multiple fault causes is determined as the target fault cause.
[0103] In the above-mentioned embodiment of the present application, the alarm information of the current business platform is obtained, and the operation and maintenance large model that completes human feedback alignment is used for query, and the fault analysis results and handling opinions of the business platform are output. The operation and maintenance model that completes human feedback alignment is based on a pre-trained large language model based on the Transformer architecture. It first adopts supervised fine-tuning, and then uses human feedback alignment training for secondary fine-tuning. The operation and maintenance large model gives recommended answers according to the prediction rules (determining the target fault cause according to the first preset score and the second preset score). This method can realize the generation of reference text for business platform fault handling, has a good scope of use and accuracy, and can accurately assist decision-making during the operation and maintenance of the business platform.
[0104] According to an embodiment of the present invention, a device embodiment of a fault analysis is also provided. It should be noted that the device for fault analysis can be used to execute the method for fault analysis in the embodiment of the present invention, and the method for fault analysis in the embodiment of the present invention can be executed in the device for fault analysis.
[0105] Figure 3 is a schematic diagram of a fault analysis device according to an embodiment of the present invention, such as Figure 3As shown, the device may include: an acquisition module 32, which is used to acquire a sequence of operation and maintenance fields to be detected of the business platform when a target fault occurs on the business platform, wherein the sequence of operation and maintenance fields to be detected includes: multiple fields to be detected arranged in chronological order, each field to be detected is used to represent the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence is used to represent the operation and maintenance status of the business platform at the time point when the target fault occurs; an analysis module 34, which is used to use a preset prediction model to analyze multiple fields to be detected in the sequence of operation and maintenance fields to be detected, and obtain at least one estimated fault cause leading to the target fault, and an estimated fault score of each estimated fault cause, as well as at least one associated fault of the target fault, an associated fault cause of each associated fault, and an associated fault score of each associated fault cause; based on at least one estimated fault score and at least one associated fault score, combined with the similarity of the word vectors between the target fault and the associated fault, obtain a predicted fault score corresponding to each estimated fault cause; determine the estimated fault cause with the highest predicted fault score as the target fault cause, and generate a target handling opinion for the target fault cause.
[0106] It should be noted that the acquisition module 32 in this embodiment can be used to execute step S102 in the embodiment of the present application, and the analysis module 34 in this embodiment can be used to execute step S104 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.
[0107] In an embodiment of the present invention, when a target fault occurs on a business platform, a preset prediction model is used to analyze a sequence of operation and maintenance fields to be detected in which the target fault occurs, so as to obtain at least one estimated fault cause leading to the target fault, at least one associated fault of the target fault, and at least one associated fault cause leading to the associated fault, and determine an estimated fault score for each estimated fault cause and an associated fault score for each associated fault cause, and combine the estimated fault score of each estimated fault cause, the associated fault score of each associated fault cause, and the similarity of the word vectors between the target fault and the associated fault to obtain a predicted fault score corresponding to each estimated fault cause, and then determine the estimated fault cause with the highest predicted fault score among multiple estimated fault causes as the target fault cause, thereby achieving a technical effect of accurately determining the target fault cause leading to the target fault, and based on the accurately determined target fault cause, an accurate target handling opinion can be generated, and then based on the target handling opinion, the target fault can be accurately handled, thereby solving the technical problem of poor accuracy in traditional fault analysis.
[0108] As an optional embodiment, the preset prediction model includes: a first prediction model and a second prediction model, and the device also includes: a detection submodule, which is used to detect whether the estimated fault cause is a hot fault cause, wherein the number of occurrences of the hot fault cause within a preset time period exceeds a preset number threshold; a first analysis submodule, which is used to use the first prediction model to analyze the sequence of operation and maintenance fields to be detected when the estimated fault cause does not belong to the hot fault cause, and obtain a predicted fault score corresponding to each estimated fault cause, wherein the first prediction model is used to at least predict a first prediction score for each estimated fault cause, and the first prediction score is combined with the average estimated fault cause of at least one estimated fault cause. The predicted fault score corresponding to each estimated fault cause is determined by using the fault score, the similarity of the word vectors between the target fault and the associated fault, and at least one associated fault score; a second analysis submodule is used to use the second prediction model to analyze the operation and maintenance field sequence to be detected when the estimated fault cause belongs to a popular fault cause, so as to obtain the predicted fault score corresponding to the estimated fault cause, wherein the second prediction model determines the predicted fault score corresponding to the estimated fault cause based on the average estimated fault score of at least one estimated fault cause, the similarity of the word vectors between the target fault and the associated fault, at least one associated fault score, and a second prediction score pre-set for the popular fault cause.
[0109] As an optional embodiment, the device also includes: an acquisition submodule, which is used to obtain a preset operation and maintenance field sequence of the business platform within a preset time period before detecting whether the estimated fault cause is a popular fault cause, wherein the preset operation and maintenance field sequence includes multiple preset fields; a third analysis submodule, which is used to analyze the multiple preset fields in the preset operation and maintenance field sequence to obtain multiple preset fault causes that appear on the business platform within the preset time period; a statistical submodule, which counts the number of occurrences of the same preset fault cause within the preset time period; and a determination submodule, which is used to determine a preset fault cause whose number of occurrences exceeds a preset number threshold as a popular fault cause.
[0110] As an optional embodiment, the device also includes: an identification unit, which is used to identify a sample data set in the operation and maintenance text data of the business platform, wherein the operation and maintenance text data at least includes: a historical operation and maintenance field sequence of the business platform when historical failures occur, a historical failure cause of each historical failure, and a historical handling opinion corresponding to each historical failure cause, the historical operation and maintenance field sequence includes multiple historical fields, and the historical field at the last position in the historical operation and maintenance field sequence represents the operation and maintenance status of the business platform at the time point when the historical failure occurs, and the sample data set includes multiple groups of training data, each group of training data includes: a historical failure cause determined based on the historical operation and maintenance field sequence, and a historical handling opinion corresponding to the historical failure cause ; A training unit, used to perform self-supervised pre-training using a sample data set to obtain a pre-trained model; a first adjustment unit, used to perform supervised adjustment on the pre-trained model using a fault handling question and answer pair set to obtain a pre-adjusted model, wherein each fault handling question and answer pair in the fault handling question and answer pair set includes: a sample fault cause and a corresponding sample handling opinion; a second adjustment unit, used to use the pre-adjusted model to analyze a plurality of preset test fault causes to obtain a plurality of test handling opinions for each test fault cause, sort the plurality of test handling opinions for the same test fault cause in order of confidence from high to low, and adjust the pre-adjusted model based on the sorting result of the test handling opinions to obtain a preset prediction model.
[0111] As an optional embodiment, the historical operation and maintenance field sequence is processed as follows: P(u i )=softmax(h n W e T ); where h is the input of each input layer in the pre-trained model, n is the number of layers in the pre-trained model, and the input of the 0th layer of the pre-trained model is: h0 = UW e +W p , the input of the non-0 layer l of the pre-trained model is: U = (ui-k, ..., ui-1) represents the first k historical fields of the i-th historical field, We represents the word encoding matrix; Wp represents the word position encoding matrix, and P(ui) is the probability distribution of the i-th field predicted by the pre-trained model.
[0112] As an optional embodiment, each test disposition opinion is calculated according to the confidence level based on the following preset confidence model: Among them, x is the cause of the test failure, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, θ represents the parameter vector of the pre-adjustment model f, and ||yi|| is used to eliminate the influence of the length of the test disposal opinion on the confidence.
[0113] As an optional embodiment, the device further includes: a determination subunit, configured to determine a ranking loss value L according to the difference in confidence between the test disposal opinions. rank ,in, ri<rj means that the ranking of the test treatment opinion yj is higher than the ranking of the test treatment opinion yi; the superposition subunit is used to superimpose the ranking loss value and the supervised learning loss value L ft , get the target loss value, where L ft =-∑ t logP f (y i′ |x), i′=arg max i r i , x is the test failure cause, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, and t is the number of update iterations of the model parameters; the adjustment subunit is used to adjust the model parameters of the pre-adjustment model based on the target loss value to obtain the preset prediction model.
[0114] An embodiment of the present invention may provide an electronic device, which may be a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.
[0115] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0116] In this embodiment, the computer terminal can execute the following steps of the fault analysis method: when a target fault occurs on a business platform, a sequence of operation and maintenance fields to be detected of the business platform is obtained, wherein the sequence of operation and maintenance fields to be detected includes: a plurality of fields to be detected arranged in chronological order, each field to be detected is used to indicate the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence is used to indicate the operation and maintenance status of the business platform at the time point when the target fault occurs; a plurality of fields to be detected in the sequence of operation and maintenance fields to be detected are analyzed using a preset prediction model to obtain at least one estimated fault cause leading to the target fault, and an estimated fault score of each estimated fault cause, as well as at least one associated fault of the target fault, an associated fault cause of each associated fault, and an associated fault score of each associated fault cause; based on at least one estimated fault score and at least one associated fault score, combined with the similarity of the word vectors between the target fault and the associated fault, a predicted fault score corresponding to each estimated fault cause is obtained; the estimated fault cause with the highest predicted fault score is determined as the target fault cause, and a target handling opinion for the target fault cause is generated.
[0117] Figure 4 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 4 As shown, the computer terminal 40 may include: one or more (only one is shown in the figure) processors 42 , and a memory 44 .
[0118] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the method and device for fault analysis in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method for fault analysis. The memory 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 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal 40 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.
[0119] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: when a target fault occurs on the business platform, obtain a sequence of operation and maintenance fields to be detected of the business platform, wherein the sequence of operation and maintenance fields to be detected includes: multiple fields to be detected arranged in chronological order, each field to be detected is used to represent the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence is used to represent the operation and maintenance status of the business platform at the time point when the target fault occurs; use a preset prediction model to analyze the multiple fields to be detected in the sequence of operation and maintenance fields to obtain at least one estimated fault cause leading to the target fault, and an estimated fault score of each estimated fault cause, as well as at least one associated fault of the target fault, an associated fault cause of each associated fault, and an associated fault score of each associated fault cause; based on at least one estimated fault score and at least one associated fault score, combined with the similarity of the word vectors between the target fault and the associated fault, obtain a predicted fault score corresponding to each estimated fault cause; determine the estimated fault cause with the highest predicted fault score as the target fault cause, and generate a target handling opinion for the target fault cause.
[0120] Optionally, the preset prediction model includes: a first prediction model and a second prediction model, and the processor may also execute the following program code: detecting whether the estimated fault cause is a hot fault cause, wherein the number of occurrences of the hot fault cause within a preset time period exceeds a preset number threshold; when the estimated fault cause does not belong to the hot fault cause, using the first prediction model to analyze the operation and maintenance field sequence to be detected to obtain a predicted fault score corresponding to each estimated fault cause, wherein the first prediction model is at least used to predict a first prediction score for each estimated fault cause, and combining the first prediction score with an average estimated fault score of at least one estimated fault cause, the similarity of the word vectors between the target fault and the associated fault, and at least one associated fault score to determine the predicted fault score corresponding to each estimated fault cause; when the estimated fault cause belongs to the hot fault cause, using the second prediction model to analyze the operation and maintenance field sequence to be detected to obtain a predicted fault score corresponding to the estimated fault cause, wherein the second prediction model determines the predicted fault score corresponding to the estimated fault cause based on the average estimated fault score of at least one estimated fault cause, the similarity of the word vectors between the target fault and the associated fault, at least one associated fault score, and a second prediction score pre-set for the hot fault cause.
[0121] Optionally, the processor may also execute the program code of the following steps: obtaining a preset operation and maintenance field sequence of the business platform within a preset time period, wherein the preset operation and maintenance field sequence includes multiple preset fields; analyzing the multiple preset fields in the preset operation and maintenance field sequence to obtain multiple preset fault causes that occur on the business platform within the preset time period; counting the number of occurrences of the same preset fault cause within the preset time period; and determining a preset fault cause whose number of occurrences exceeds a preset number threshold as a hot fault cause.
[0122] Optionally, the processor may also execute the program code of the following steps: in the operation and maintenance text data of the business platform, a sample data set is identified, wherein the operation and maintenance text data at least includes: a historical operation and maintenance field sequence of the business platform when historical failures occur, a historical failure cause of each historical failure, and a historical handling opinion corresponding to each historical failure cause, the historical operation and maintenance field sequence includes multiple historical fields, and the historical field at the last position in the historical operation and maintenance field sequence represents the operation and maintenance status of the business platform at the time point when the historical failure occurs, and the sample data set includes multiple groups of training data, each group of training data includes: a historical failure cause determined based on the historical operation and maintenance field sequence, and a historical handling opinion corresponding to each historical failure cause. historical handling opinions corresponding to the fault cause; use the sample data set for self-supervised pre-training to obtain a pre-trained model; use the fault handling question and answer pair set to perform supervised adjustment on the pre-trained model to obtain a pre-adjusted model, wherein each fault handling question and answer pair in the fault handling question and answer pair set includes: a sample fault cause and a corresponding sample handling opinion; use the pre-adjusted model to analyze multiple preset test fault causes to obtain multiple test handling opinions for each test fault cause, sort the multiple test handling opinions for the same test fault cause in order from high to low confidence, and adjust the pre-adjusted model based on the sorting results of the test handling opinions to obtain a preset prediction model.
[0123] Optionally, the processor may further execute the following program code: perform the following processing on the historical operation and maintenance field sequence: P(u i )=softmax(h n W e T ); where h is the input of each input layer in the pre-trained model, n is the number of layers in the pre-trained model, and the input of the 0th layer of the pre-trained model is: h0 = UW e +W p , the input of the non-0 layer l of the pre-trained model is: U = (ui-k, ..., ui-1) represents the first k historical fields of the i-th historical field, We represents the word encoding matrix; Wp represents the word position encoding matrix, and P(ui) is the probability distribution of the i-th field predicted by the pre-trained model.
[0124] Optionally, the processor may further execute a program code of the following steps: calculating each test disposition opinion according to the confidence level based on the following preset confidence model: Among them, x is the cause of the test failure, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, θ represents the parameter vector of the pre-adjustment model f, and ||yi|| is used to eliminate the influence of the length of the test disposal opinion on the confidence.
[0125] Optionally, the processor may further execute the program code of the following steps: determining the ranking loss value L according to the difference in confidence between the test disposal opinions rank ,in, ri<rj means that the ranking of the test treatment opinion yj is higher than the ranking of the test treatment opinion yi; the superposition ranking loss value and the supervised learning loss value L ft , get the target loss value, where L ft =-∑ t logP f (y i′ |x), i′=arg max i r i , x is the cause of the test failure, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, and t is the number of update iterations of the model parameters; the model parameters of the pre-adjustment model are adjusted based on the target loss value to obtain the preset prediction model.
[0126] In an embodiment of the present invention, when a target fault occurs on a business platform, a preset prediction model is used to analyze a sequence of operation and maintenance fields to be detected in which the target fault occurs, so as to obtain at least one estimated fault cause leading to the target fault, at least one associated fault of the target fault, and at least one associated fault cause leading to the associated fault, and determine an estimated fault score for each estimated fault cause and an associated fault score for each associated fault cause, and combine the estimated fault score of each estimated fault cause, the associated fault score of each associated fault cause, and the similarity of the word vectors between the target fault and the associated fault to obtain a predicted fault score corresponding to each estimated fault cause, and then determine the estimated fault cause with the highest predicted fault score among multiple estimated fault causes as the target fault cause, thereby achieving a technical effect of accurately determining the target fault cause leading to the target fault, and based on the accurately determined target fault cause, an accurate target handling opinion can be generated, and then based on the target handling opinion, the target fault can be accurately handled, thereby solving the technical problem of poor accuracy in traditional fault analysis.
[0127] It can be understood by those skilled in the art that Figure 4 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 4 The structure of the electronic device is not limited. For example, the computer terminal 40 may also include Figure 4 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 4 Different configurations shown.
[0128] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a computer program. The computer program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0129] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the fault analysis method provided in the above embodiment.
[0130] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0131] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: in the event that a target fault occurs on a business platform, obtaining a sequence of operation and maintenance fields to be detected of the business platform, wherein the sequence of operation and maintenance fields to be detected includes: a plurality of fields to be detected arranged in chronological order, each field to be detected being used to indicate the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence being used to indicate the operation and maintenance status of the business platform at the time point when the target fault occurs; using a preset prediction model to analyze the plurality of fields to be detected in the sequence of operation and maintenance fields to be detected, to obtain at least one estimated fault cause leading to the target fault, and an estimated fault score of each estimated fault cause, as well as at least one associated fault of the target fault, an associated fault cause of each associated fault, and an associated fault score of each associated fault cause; based on at least one estimated fault score and at least one associated fault score, combined with the similarity of the word vectors between the target fault and the associated fault, obtaining a predicted fault score corresponding to each estimated fault cause; determining the estimated fault cause with the highest predicted fault score as the target fault cause, and generating a target handling opinion for the target fault cause.
[0132] Optionally, in this embodiment, the preset prediction model includes: a first prediction model and a second prediction model, and the non-volatile storage medium is configured to store program codes for executing the following steps: detecting whether the estimated fault cause is a hot fault cause, wherein the number of occurrences of the hot fault cause within a preset time period exceeds a preset number threshold; when the estimated fault cause does not belong to the hot fault cause, using the first prediction model to analyze the sequence of operation and maintenance fields to be detected to obtain a predicted fault score corresponding to each estimated fault cause, wherein the first prediction model is at least used to predict a first prediction score for each estimated fault cause, and combining the first prediction score with at least one estimated fault cause. The predicted fault score corresponding to each estimated fault cause is determined based on the average estimated fault score of the cause, the similarity of the word vectors between the target fault and the associated fault, and at least one associated fault score; when the estimated fault cause belongs to a popular fault cause, the second prediction model is used to analyze the sequence of operation and maintenance fields to be detected to obtain the predicted fault score corresponding to the estimated fault cause, wherein the second prediction model determines the predicted fault score corresponding to the estimated fault cause based on the average estimated fault score of at least one estimated fault cause, the similarity of the word vectors between the target fault and the associated fault, at least one associated fault score, and a second prediction score pre-set for the popular fault cause.
[0133] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining a preset operation and maintenance field sequence of the business platform within a preset time period, wherein the preset operation and maintenance field sequence includes multiple preset fields; analyzing the multiple preset fields in the preset operation and maintenance field sequence to obtain multiple preset fault causes that occur on the business platform within the preset time period; counting the number of occurrences of the same preset fault cause within the preset time period; and determining a preset fault cause whose number of occurrences exceeds a preset number threshold as a hot fault cause.
[0134] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: in the operation and maintenance text material of the business platform, a sample data set is identified, wherein the operation and maintenance text material at least includes: a historical operation and maintenance field sequence of the business platform when historical failures occur, a historical failure cause of each historical failure, and a historical handling opinion corresponding to each historical failure cause, the historical operation and maintenance field sequence includes multiple historical fields, and the historical field at the last position in the historical operation and maintenance field sequence represents the operation and maintenance status of the business platform at the time point when the historical failure occurs, and the sample data set includes multiple groups of training data, each group of training data includes: historical failures determined based on the historical operation and maintenance field sequence The method comprises the following steps: first, analyzing the fault causes of a sample and the historical handling opinions corresponding to the historical fault causes; second, using the sample data set for self-supervised pre-training to obtain a pre-trained model; third, using the fault handling question-answer pair set for supervised adjustment of the pre-trained model to obtain a pre-adjusted model, wherein each fault handling question-answer pair in the fault handling question-answer pair set includes: a sample fault cause and a corresponding sample handling opinion; fourth, using the pre-adjusted model to analyze multiple preset test fault causes to obtain multiple test handling opinions for each test fault cause, and sorting the multiple test handling opinions for the same test fault cause in order from high to low confidence, and adjusting the pre-adjusted model based on the sorting results of the test handling opinions to obtain a preset prediction model.
[0135] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: performing the following processing on the historical operation and maintenance field sequence: P(u i )=softmax(h n W e T ); where h is the input of each input layer in the pre-trained model, n is the number of layers in the pre-trained model, and the input of the 0th layer of the pre-trained model is: h0 = UW e +W p , the input of the non-0 layer l of the pre-trained model is: U = (ui-k, ..., ui-1) represents the first k historical fields of the i-th historical field, We represents the word encoding matrix; Wp represents the word position encoding matrix, and P(ui) is the probability distribution of the i-th field predicted by the pre-trained model.
[0136] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: calculating each test disposition opinion according to the confidence level based on the following preset confidence model: Among them, x is the cause of the test failure, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, θ represents the parameter vector of the pre-adjustment model f, and ||yi|| is used to eliminate the influence of the length of the test disposal opinion on the confidence.
[0137] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: determining a ranking loss value L according to the difference in confidence between the test disposition opinions; rank ,in, ri<rj means that the ranking of the test treatment opinion yj is higher than the ranking of the test treatment opinion yi; the superposition ranking loss value and the supervised learning loss value L ft , get the target loss value, where L ft =-∑ t logP f (y i′ |x), i′=arg max i r i , x is the cause of the test failure, y is the test disposal opinion, Pf represents the conditional probability of the pre-adjustment model f, and t is the number of update iterations of the model parameters; the model parameters of the pre-adjustment model are adjusted based on the target loss value to obtain the preset prediction model.
[0138] The embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the steps of the fault analysis method provided in the above embodiment are implemented.
[0139] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0140] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0141] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0143] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0144] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0145] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for fault analysis, characterized in that: include: In the case where a target fault occurs on a business platform, a sequence of operation and maintenance fields to be detected of the business platform is obtained, wherein the sequence of operation and maintenance fields to be detected includes: a plurality of fields to be detected arranged in chronological order, each of the fields to be detected is used to indicate the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence is used to indicate the operation and maintenance status of the business platform at the time point when the target fault occurs; Use a preset prediction model to analyze multiple fields to be detected in the sequence of operation and maintenance fields to be detected, and obtain at least one estimated fault cause leading to the target fault, and an estimated fault score of each of the estimated fault causes, as well as at least one associated fault of the target fault, an associated fault cause of each of the associated faults, and an associated fault score of each of the associated fault causes; based on at least one of the estimated fault scores and at least one of the associated fault scores, combined with the similarity of the word vectors between the target fault and the associated faults, obtain a predicted fault score corresponding to each of the estimated fault causes; determine the estimated fault cause with the highest predicted fault score as the target fault cause, and generate a target handling opinion for the target fault cause.
2. The method according to claim 1, characterized in that: The preset prediction model includes: a first prediction model and a second prediction model, and the method further includes: Detecting whether the estimated fault cause is a popular fault cause, wherein the number of occurrences of the popular fault cause within a preset time period exceeds a preset number threshold; In the case where the estimated fault cause does not belong to the popular fault cause, the first prediction model is used to analyze the sequence of operation and maintenance fields to be detected to obtain a predicted fault score corresponding to each of the estimated fault causes, wherein the first prediction model is used at least to predict a first prediction score for each of the estimated fault causes, and the first prediction score is combined with an average estimated fault score of at least one of the estimated fault causes, a similarity of the word vectors between the target fault and the associated fault, and at least one of the associated fault scores to determine a predicted fault score corresponding to each of the estimated fault causes; In the case where the estimated fault cause belongs to the popular fault cause, the second prediction model is used to analyze the operation and maintenance field sequence to be detected to obtain a predicted fault score corresponding to the estimated fault cause, wherein the second prediction model determines the predicted fault score corresponding to the estimated fault cause based on an average estimated fault score of at least one of the estimated fault causes, the similarity of the word vectors between the target fault and the associated fault, at least one of the associated fault scores, and a second prediction score pre-set for the popular fault cause.
3. The method according to claim 2, characterized in that Before detecting whether the estimated fault cause is a hot fault cause, the method further includes: Acquire a preset operation and maintenance field sequence of the service platform within the preset time period, wherein the preset operation and maintenance field sequence includes a plurality of preset fields; Analyze the plurality of preset fields in the preset operation and maintenance field sequence to obtain a plurality of preset fault causes occurring on the service platform within the preset time period; Counting the number of occurrences of the same preset fault cause within the preset time period; The preset fault cause whose occurrence times exceeds the preset number threshold is determined as the hot fault cause.
4. The method according to claim 1, characterized in that The method further comprises: In the operation and maintenance text data of the business platform, a sample data set is identified, wherein the operation and maintenance text data at least includes: a historical operation and maintenance field sequence of the business platform when a historical fault occurs, a historical fault cause of each of the historical faults, and a historical disposal opinion corresponding to each of the historical fault causes, the historical operation and maintenance field sequence includes a plurality of historical fields, the historical field at the last position in the historical operation and maintenance field sequence represents the operation and maintenance situation of the business platform at the time point when the historical fault occurs, and the sample data set includes a plurality of groups of training data, each group of the training data includes: a historical fault cause determined based on the historical operation and maintenance field sequence, and the historical disposal opinion corresponding to the historical fault cause; Using the sample data set to perform self-supervised pre-training to obtain a pre-training model; Using a set of fault handling question-answer pairs to perform supervised adjustment on the pre-trained model to obtain a pre-adjusted model, wherein each fault handling question-answer pair in the set of fault handling question-answer pairs includes: a sample fault cause and a corresponding sample handling opinion; Use the pre-adjustment model to analyze multiple preset test failure causes to obtain multiple test handling opinions for each of the test failure causes, sort the multiple test handling opinions for the same test failure cause in descending order of confidence, and adjust the pre-adjustment model based on the sorting results of the test handling opinions to obtain the preset prediction model.
5. The method according to claim 4, characterized in that The historical operation and maintenance field sequence is processed as follows: Wherein, h is the input of each input layer in the pre-trained model, n is the number of layers of the pre-trained model, and the input of the 0th layer of the pre-trained model is: h0 = UW e +W p , the input of the non-0 layer l of the pre-trained model is: U = (ui-k, ..., ui-1) represents the first k historical fields of the i-th historical field, We represents the word encoding matrix; Wp represents the word position encoding matrix, and P(ui) is the probability distribution of the i-th field predicted by the pre-trained model.
6. The method according to claim 4, characterized in that The confidence level of each of the test disposition opinions is calculated based on the following preset confidence model: Wherein, x is the cause of the test failure, y is the test handling opinion, P f represents the conditional probability of the pre-adjustment model f, θ represents the parameter vector of the pre-adjustment model f, and ||yi|| is used to eliminate the influence of the length of the test disposal opinion on the confidence.
7. The method according to claim 5, characterized in that The method further comprises: According to the difference in confidence between the test disposition opinions, the ranking loss value L is determined rank ,in, ri<rj means that the ranking of test disposition yj is higher than the ranking of test disposition yi; Superimpose the ranking loss value and the supervised learning loss value L ft , get the target loss value, where L ft =-∑ t logP f (y i′ |x), i′=arg max i r i , x is the cause of the test failure, y is the test handling opinion P f represents the conditional probability of the pre-adjusted model f, and t is the number of update iterations of the model parameters; The model parameters of the pre-adjusted model are adjusted based on the target loss value to obtain the preset prediction model.
8. A device for fault analysis, characterized in that: include: an acquisition module, configured to acquire a sequence of operation and maintenance fields to be detected of the business platform when a target fault occurs on the business platform, wherein the sequence of operation and maintenance fields to be detected includes: a plurality of fields to be detected arranged in chronological order, each of the fields to be detected is used to indicate the operation and maintenance status of the business platform at a corresponding time point, and the field to be detected at the last position in the operation and maintenance field sequence is used to indicate the operation and maintenance status of the business platform at the time point when the target fault occurs; An analysis module is used to use a preset prediction model to analyze multiple fields to be detected in the sequence of operation and maintenance fields to be detected, and obtain at least one estimated fault cause leading to the target fault, and an estimated fault score of each of the estimated fault causes, as well as at least one associated fault of the target fault, an associated fault cause of each of the associated faults, and an associated fault score of each of the associated fault causes; based on at least one of the estimated fault scores and at least one of the associated fault scores, combined with the similarity of the word vectors between the target fault and the associated faults, obtain a predicted fault score corresponding to each of the estimated fault causes; determine the estimated fault cause with the highest predicted fault score as the target fault cause, and generate a target handling opinion for the target fault cause.
9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the fault analysis method according to any one of claims 1 to 7 through the computer program.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the fault analysis method described in any one of claims 1 to 7 are implemented.