Task-oriented and viewpoint-invariant multi-modal fault diagnosis method and system
By constructing an instance dependency graph and graph neural network for the microservice system, and uniformly encoding multimodal events, task-oriented learning and cross-modal association are performed, solving the problem of low accuracy in multimodal fault diagnosis in existing technologies, and achieving more efficient fault root cause localization and type identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2023-07-10
- Publication Date
- 2026-07-14
Smart Images

Figure CN116909788B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software engineering microservices technology, and in particular to a task-oriented and perspective-invariant multimodal fault diagnosis method and system. Background Technology
[0002] Microservice architecture has become increasingly popular due to its advantages such as scalability and rapid iteration. Microservice architecture divides a monolithic application into multiple microservices based on business logic. Each microservice contains many instance replicas, and microservices communicate with each other via HTTP and RPC. However, the complex call relationships in microservice systems allow failures to propagate from one microservice instance to others, resulting in a large number of simultaneously failing microservices.
[0003] Fault diagnosis is essential in microservice systems. When a fault occurs, operations personnel need to analyze monitoring data from multiple modalities to quickly locate the faulty microservice instance (e.g., login service), analyze the fault type (e.g., insufficient memory), and implement targeted strategies (e.g., increasing memory allocation). Existing research largely focuses on fault diagnosis based on single-modal monitoring data. For example, GIED and DejaVu extract features from historical metrics for fault detection and location; MicroRank and MicroSketch use trace structure information and call details to infer the most probable faulty microservice; and DyCause uses API log information for fault diagnosis. However, single-modal monitoring data is not comprehensive; for instance, diagnosing hardware resource faults using only trace information is quite challenging.
[0004] In recent years, the fusion of multimodal monitoring data for fault diagnosis has gradually attracted researchers' attention. The challenges of fusing multimodal monitoring data lie in the significant differences in data structure between different modalities, the difficulty in establishing correlations, and the difficulty in aligning time scales. Current work focuses on fusing multimodal monitoring data, broadening the perspective of fault diagnosis tools. For example, DiagFusion employs an early fusion approach, uniformly transforming multimodal monitoring data into event features during data processing for subsequent specific downstream tasks; Eadro uses a mid-term fusion approach, extracting high-dimensional features from different modal data using specific neural networks before fusion.
[0005] In the process of implementing this invention, the inventors of this application discovered that the prior art has at least the following technical problems:
[0006] Compared to methods based on single-modal data that only utilize a portion of the effective information, DiagFusion and Eadro demonstrate better performance in fault diagnosis. However, both methods only perform simple feature extraction before fusing multimodal data features. DiagFusion performs fusion directly at the data level, while Eadro performs fusion at the feature level. The fused data is then directly applied to downstream diagnostic tasks, but neither method undergoes targeted training based on the characteristics of its respective modality and task. Consequently, the accuracy of fault diagnosis is not high. Summary of the Invention
[0007] The purpose of this invention is to provide a task-oriented and perspective-invariant multimodal fault diagnosis method and system, which can solve or at least partially solve the technical problem of low fault diagnosis accuracy in the prior art.
[0008] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0009] The first aspect provides a task-oriented and perspective-invariant multimodal fault diagnosis method, including:
[0010] S1: Construct an instance dependency graph of the microservice system based on tracing information, uniformly extract and encode the multimodal events of each microservice instance on the instance dependency graph, and obtain the multimodal event expression of each microservice instance. The instance dependency graph of the microservice system includes nodes and edges. Nodes represent microservice instances, and edges represent the calling relationship between microservice instances. Nodes include root cause nodes and non-root cause nodes.
[0011] S2: Based on the instance dependency graph, randomly deactivate some non-root cause nodes to obtain the augmented dataset;
[0012] S3: Based on graph neural networks and the acquired multimodal event representations, feature aggregation is performed on the instance dependency graph to obtain multimodal graph-level fault representations. Task-oriented learning and cross-modal associations are then constructed on the multimodal graph-level fault representations.
[0013] S4: Based on graph-level fault representation and augmented dataset, jointly learn two fault diagnosis tasks: root cause localization and fault classification, to obtain the final multimodal fault diagnosis results, including fault root cause ranking and fault type.
[0014] In one implementation, step S1 includes:
[0015] S1.1: Capture the interaction trajectories between microservice instances based on distributed system tracing technology, obtain tracing information by collecting and capturing the interaction trajectories, and construct the instance dependency graph of the microservice system based on the tracing information;
[0016] S1.2: Extract and encode abnormal events from the indicator sequence, extract and encode abnormal events for each span in the trace, and extract and encode log templates from the logs. The trace is used to record the trajectory of user requests in the microservice system.
[0017] S1.3: Encode the event sequences of the three modalities to obtain the event representations of the three modalities.
[0018] In one implementation, step S2 obtains the number of randomly deactivated non-root cause nodes according to the following formula:
[0019]
[0020] in, This represents the proportion of nodes that are randomly deactivated. Representative instance dependency graph The number of all nodes, This represents the number of non-root cause nodes that are randomly deactivated.
[0021] In one implementation, step S3 includes:
[0022] S3.1: For the list of graphs Any instance dependency graph in The kth node The three modal expressions Three encoders based on topological adaptive graph neural networks are used. Feature aggregation is performed on the expressions of each modality to obtain node expressions that incorporate information from neighboring nodes. Furthermore, a multimodal graph-level fault representation is obtained, in which, Representing nodes respectively Event representation in the indicator modality, event representation in the tracking modality, and event representation in the log modality; These are encoders for the tracking mode, the index mode, and the log mode, respectively. They are respectively the index mode The gathering Node representation of information about all neighboring nodes within a hop, in tracking mode. The gathering Node representation of all neighboring nodes within a hop and log mode The gathering A node representation of information about all neighboring nodes within a hop;
[0023] S3.2: Employ task-oriented learning to uncover the potential contribution of each modality to a specific task;
[0024] S3.3: By constructing relationships between multimodalities, we can mine perspective-invariant information, which includes abnormal microservices and the degree of failure.
[0025] In one implementation, the three modalities include an indicator modality, a tracking modality, and a log modality, wherein the method for obtaining the fault representation at the indicator modality graph level includes:
[0026] A TAG graph neural network is used as the encoder to perform feature fusion of the index modalities.
[0027]
[0028] in, The index feature of the z-th neighbor node represents the index feature in the index mode. and These represent the learnable parameters of the TAG network;
[0029] After passing through two layers of graph neural networks, a graph-level fault representation of the metric mode is obtained through a max-pooling layer:
[0030]
[0031] in, This represents the number of all nodes in the instance dependency graph. A graph-level representation of faults that indicate the modalities of an indicator.
[0032] In one implementation, the loss in step S3.2 is a multimodal task-oriented loss, expressed as:
[0033]
[0034] in, , , These represent the losses for the tracking mode, the metric mode, and the log mode, respectively. This represents the task-oriented loss in multimodal scenarios;
[0035] The loss in S3.3 is the cross-modal loss of the three modes, expressed as:
[0036]
[0037] in, This represents the cross-modal contrastive loss between the metric modality and the log modality. This represents the cross-modal contrast loss between the index mode and the tracking mode. The cross-modal loss is for the three modes.
[0038] In one implementation, step S4 includes:
[0039] S4.1: Employing a mid-term fusion approach, multimodal graph-level fault representations are fused during model training.
[0040]
[0041] in, , and These are graph-level fault representations for the indicator mode, the tracking mode, and the log mode, respectively.
[0042] S4.2: Two multilayer perceptrons are used for joint training on the root cause localization and fault classification tasks. For the root cause localization task, the cross-entropy loss function is selected to measure the difference between the obtained root cause and the true root cause.
[0043]
[0044] in, Represents the number of faulty samples. Represents the total number of microservice instances, when the... The root cause of this sample is the microservice instance. hour, ,otherwise ; This indicates the loss in the root cause localization task; Representing the The root cause of this sample is the microservice instance. The probability of;
[0045] For fault classification tasks, cross-entropy loss is chosen as the optimization objective:
[0046]
[0047] in, Represents the total number of fault categories, when the... When the fault type of a sample is type c, ,otherwise , The failure classification task loss is shown; Representing the The fault type of each sample is The probability of;
[0048] S4.3: Considering the losses of the two fault diagnosis tasks, the task-oriented loss, and the cross-modal loss in a unified manner, the final optimization objective can be expressed as:
[0049]
[0050] in, , These represent the weights of each component. This represents the task-oriented loss in multimodal scenarios. This is the cross-modal loss.
[0051] Based on the same inventive concept, a second aspect of the present invention provides a task-oriented and perspective-invariant multimodal fault diagnosis system, comprising:
[0052] The multimodal event expression acquisition module is used to construct the instance dependency graph of the microservice system based on the tracing information, uniformly extract and encode the multimodal events of each microservice instance on the instance dependency graph, and obtain the multimodal event expression of each microservice instance. The instance dependency graph of the microservice system includes nodes and edges. Nodes represent microservice instances, and edges represent the calling relationship between microservice instances. Nodes include root cause nodes and non-root cause nodes.
[0053] The augmented data acquisition module is used to acquire augmented datasets based on the instance dependency graph by randomly deactivating some non-root cause nodes.
[0054] The graph-level fault representation acquisition module is used to perform feature aggregation on the instance dependency graph based on graph neural network and acquired multimodal event representation, obtain multimodal graph-level fault representation, and perform task-oriented learning and construct cross-modal associations on the multimodal graph-level fault representation;
[0055] The multimodal fault diagnosis module is used to jointly learn two fault diagnosis tasks—root cause localization and fault classification—based on graph-level fault representation and augmented datasets, to obtain the final multimodal fault diagnosis results, including fault root cause ranking and fault type.
[0056] Based on the same inventive concept, a third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described in the first aspect.
[0057] Based on the same inventive concept, a fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.
[0058] Compared with the prior art, the advantages and beneficial technical effects of the present invention are as follows:
[0059] This invention discloses a task-oriented and perspective-invariant multimodal fault diagnosis method. First, it constructs an instance dependency graph of a microservice system based on tracking information, uniformly extracts and encodes multimodal events for each instance in the instance dependency graph, and obtains the multimodal event representations of each instance. Then, based on the instance dependency graph, some non-root cause nodes are randomly deactivated to obtain an augmented dataset. Next, it performs feature aggregation on the instance dependency graph based on a graph neural network to obtain graph-level fault representations of the multimodal faults. Task-oriented learning and cross-modal association construction are then performed on these graph-level fault representations. Finally, based on the graph-level fault representations, two fault diagnosis tasks—root cause localization and fault classification—are jointly learned to obtain the final fault root cause ranking and fault type. This application addresses the technical problem of low fault diagnosis accuracy in existing diagnostic tools based on multimodal (trace, metric, and log) monitoring data, which fail to fully exploit the hidden relationships between different modalities and ignore the preference of diagnostic tasks for specific modalities. By deeply mining the hidden relationships between diagnostic tasks and constructing cross-modal connections, this application can screen out the root causes of faults and identify fault types from a large number of faulty microservices. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a flowchart of the task-oriented and perspective-invariant multimodal fault diagnosis method disclosed in the embodiments of the present invention;
[0062] Figure 2 This is the instance dependency graph constructed in this embodiment of the invention;
[0063] Figure 3 This is a schematic diagram of a sequence of indicators in an embodiment of the present invention;
[0064] Figure 4 This is a log example diagram from an embodiment of the present invention;
[0065] Figure 5 This is an architecture diagram of the task-oriented and perspective-invariant multimodal fault diagnosis system in this embodiment of the invention;
[0066] Figure 6 This is a schematic diagram of the parameter experiment for the inactivation ratio p in an embodiment of the present invention;
[0067] Figure 7This is a schematic diagram of the parameter experiment for the dimensional parameter δ in an embodiment of the present invention. Detailed Implementation
[0068] Through extensive research and practice, the inventors of this application have discovered that: most existing fault diagnosis methods are based on single-modality monitoring data. However, the limited information in single-modality monitoring data makes it impossible for the diagnostic tool to cover all fault scenarios. Existing diagnostic tools based on multimodal (tracking, metrics, and logs) monitoring data do not fully explore the hidden relationships between different modalities and ignore the diagnostic task's preference for specific modalities, resulting in low fault diagnosis accuracy.
[0069] To address the aforementioned issues, this invention proposes a task-oriented and perspective-invariant multimodal fault diagnosis method, comprising the following steps: constructing an instance dependency graph of the microservice system based on tracking information; uniformly extracting and encoding multimodal events for each instance on the instance dependency graph to obtain the multimodal event representations of each instance; randomly deactivating some non-root cause nodes based on the instance dependency graph to obtain an augmented dataset; performing feature aggregation on the instance dependency graph based on a graph neural network to obtain multimodal graph-level fault representations; performing task-oriented learning and constructing cross-modal associations on the multimodal graph-level fault representations; and jointly learning two fault diagnosis tasks—root cause localization and fault classification—based on the graph-level fault representations to obtain the final fault root cause ranking and fault type. This application, by deeply mining the hidden associations between diagnostic tasks and different modal data, and constructing cross-modal connections, filters out fault root causes and identifies fault types from a large number of faulty microservices, assisting engineers in fault diagnosis.
[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0071] Example 1
[0072] This embodiment discloses a task-oriented and perspective-invariant multimodal fault diagnosis method. Please refer to [link to relevant documentation]. Figure 1 The method includes:
[0073] S1: Construct an instance dependency graph of the microservice system based on tracing information, uniformly extract and encode the multimodal events of each microservice instance on the instance dependency graph, and obtain the multimodal event expression of each microservice instance. The instance dependency graph of the microservice system includes nodes and edges. Nodes represent microservice instances, and edges represent the calling relationship between microservice instances. Nodes include root cause nodes and non-root cause nodes.
[0074] S2: Based on the instance dependency graph, randomly deactivate some non-root cause nodes to obtain the augmented dataset;
[0075] S3: Based on graph neural networks and the acquired multimodal event representations, feature aggregation is performed on the instance dependency graph to obtain multimodal graph-level fault representations. Task-oriented learning and cross-modal associations are then constructed on the multimodal graph-level fault representations.
[0076] S4: Based on graph-level fault representation and augmented dataset, jointly learn two fault diagnosis tasks: root cause localization and fault classification, to obtain the final multimodal fault diagnosis results, including fault root cause ranking and fault type.
[0077] Specifically, since the amount of data in multimodal fault diagnosis datasets is scarce and manual annotation is difficult, data augmentation can expand the training data. Furthermore, the collection of monitoring data may sometimes result in missing data (for example, data for a certain modality cannot be collected due to network or storage issues). The data augmentation method in this implementation simulates this situation, making the dataset as diverse as possible, thus enabling the trained model to have stronger generalization ability.
[0078] In one implementation, step S1 includes:
[0079] S1.1: Capture the interaction trajectories between microservice instances based on distributed system tracing technology, obtain tracing information by collecting and capturing the interaction trajectories, and construct the instance dependency graph of the microservice system based on the tracing information;
[0080] S1.2: Extract and encode abnormal events from the indicator sequence, extract and encode abnormal events for each span in the trace, and extract and encode log templates from the logs. The trace is used to record the trajectory of user requests in the microservice system.
[0081] S1.3: Encode the event sequences of the three modalities to obtain the event representations of the three modalities.
[0082] Please see Figure 2 The right side shows the instance dependency graph constructed in this embodiment of the invention, and the left side shows the trace information of the microservice system.
[0083] In the specific implementation process, step S1.2, extracting and encoding abnormal events from the indicator sequence, can be achieved in the following way:
[0084] For a given sequence of indicators (such as...) Figure 3As shown, it is an index sequence. The 3-sigma anomaly detection algorithm is used to extract the outliers in the index sequence. The "content" in the event template records the name of the abnormal index and the abnormal direction, where the abnormal direction refers to the position of the outlier relative to the 3-sigma upper and lower bound thresholds. For example, <1684475>398705, S1, CPU_usage, ↑> means that the CPU usage index exceeds the upper bound threshold of 3-sigma.
[0085] Extracting the abnormal events in each span of the trace and encoding them can be achieved in the following way:
[0086] The trace information is as Figure 2 shown in the left figure in the following. The trace records the trajectory of the user request in the microservice system. A trace information consists of multiple spans, and each span is reported by a specific microservice. The span records the processing time, the ID of the parent node, and the ID of the current node. For a given number of trace information, they are classified according to the trace path, and the 3-sigma anomaly detection algorithm is used to extract the outliers in all call delays of each span in the trace path. The "content" in the event template records the callee when the anomaly occurs. For example, <1684475>398705, S1, S2> means that an anomaly occurs when the S1 microservice instance calls the S2 microservice instance.
[0087] Extracting the log templates in the log and encoding them can be achieved in the following way:
[0088] Logs are a type of semi-structured data. Figure 4 The following shows a sample of the log. The log mainly consists of a static log template (now call service: # as a downstream service) and dynamically changing messages (xxService). The key to extracting log events lies in mining the log templates. The widely used Drain log parsing technology can extract the log templates in the log document. The "content" in the event template records the template ID when the event occurs. For example, 17asc28ud in <1684475>398705, S, 17asc28ud> represents the ID of this log template.
[0089] Step S1.3 encodes the event sequences of the three modalities to obtain the event expressions of the three modalities. As Figure 2 shown, the instance dependency graph Each node corresponds to a microservice instance in a microservice system and the call relationships between them. These event sequences are grouped according to the instance ID in the event and added as attributes to the corresponding nodes. The event sequences are analogized to sentences in natural language, and each event in the sequence is analogized to a word in the sentence. The fastText word embedding model is used to encode the event sequence of each modality separately, obtaining a high-dimensional representation of each modality's event. (The diagram is then drawn.) any node It has the following attributes:
[0090] =
[0091] in Representing nodes respectively This involves high-dimensional representations of event sequences from the indicator modality, tracking modality, and log modality. By performing event extraction operations on each historical fault data point, a graph list can be obtained. .
[0092] In one implementation, step S2 obtains the number of randomly deactivated non-root cause nodes according to the following formula:
[0093]
[0094] in, This represents the proportion of nodes that are randomly deactivated. Representative instance dependency graph The number of all nodes, This represents the number of non-root cause nodes that are randomly deactivated.
[0095] Specifically, consider the instance dependency graph. In the analysis of non-root cause microservice instances, abnormal non-root cause microservice instances (non-root cause nodes) and normal microservice instances (root cause nodes) are categorized. First, the absence of normal microservice instances does not affect root cause inference because existing methods, such as MicroRCA and AAMR, are mostly based on monitoring data from abnormal microservices. Second, removing data from some abnormal non-root cause microservice instances actually narrows the scope of root cause localization; therefore, the absence of some non-root cause nodes will not affect root cause inference.
[0096] Please see Figure 6 , is the parameter experimental diagram of the inactivation ratio p. In this embodiment, p=0.2.
[0097] For the list of figures Any instance dependency graph in Dependency graph of randomly deactivated instances From the non-root cause nodes in the middle, we obtain an augmented graph. This achieves the effect of augmenting the data. The number of non-root cause nodes randomly deactivated can be obtained using the aforementioned formula, and the augmented graph obtained after random deactivation... It was also added to the list of figures. In, and with instance dependency graph They share the same root cause and fault type labels.
[0098] In one implementation, step S3 includes:
[0099] S3.1: For the list of graphs Any instance dependency graph in The kth node The three modal expressions Three encoders based on topological adaptive graph neural networks are used. Feature aggregation is performed on the expressions of each modality to obtain node expressions that incorporate information from neighboring nodes. Furthermore, a multimodal graph-level fault representation is obtained, in which, Representing nodes respectively Event representation in the indicator modality, event representation in the tracking modality, and event representation in the log modality; These are encoders for the tracking mode, the index mode, and the log mode, respectively. They are respectively the index mode The gathering Node representation of information about all neighboring nodes within a hop, in tracking mode. The gathering Node representation of all neighboring nodes within a hop and log mode The gathering A node representation of information about all neighboring nodes within a hop;
[0100] S3.2: Employ task-oriented learning to uncover the potential contribution of each modality to a specific task;
[0101] S3.3: By constructing relationships between multimodalities, we can mine perspective-invariant information, which includes abnormal microservices and the degree of failure.
[0102] In one implementation, the three modalities include an indicator modality, a tracking modality, and a log modality, wherein the method for obtaining the fault representation at the indicator modality graph level includes:
[0103] A TAG graph neural network is used as the encoder to perform feature fusion of the index modalities.
[0104]
[0105] in, The index feature of the z-th neighbor node represents the index feature in the index mode. and These represent the learnable parameters of the TAG network;
[0106] After passing through two layers of graph neural networks, a graph-level fault representation of the metric mode is obtained through a max-pooling layer:
[0107]
[0108] in, This represents the number of all nodes in the instance dependency graph. A graph-level representation of faults that indicate the modalities of an indicator.
[0109] In one implementation, the loss in step S3.2 is a multimodal task-oriented loss, expressed as:
[0110]
[0111] in, , , These represent the losses for the tracking mode, the metric mode, and the log mode, respectively. This represents the task-oriented loss in multimodal scenarios;
[0112] The loss in S3.3 is the cross-modal loss of the three modes, expressed as:
[0113]
[0114] in, This represents the cross-modal contrastive loss between the metric modality and the log modality. This represents the cross-modal contrast loss between the index mode and the tracking mode. The cross-modal loss is for the three modes.
[0115] Specifically, after obtaining graph-level fault representations for three modalities, step S3.2 employs task-oriented learning to mine the potential contribution of each modality to a specific task. Taking the tracing modality and root cause localization task as examples, for faults occurring at different times in the same microservice instance, the collected traces are often similar. This is because the microservices affected by the same fault root cause and the fault chain are similar. Therefore, the consensus between the tracing modal information of these two faults can be maximized at the representation level. Specifically, given a small batch of fault samples... The i-th fault sample Graph-level representation including tracking and the corresponding root cause labels Definition and Fault Samples The set of samples with consistent labels is positive sample set Therefore, for tracking modalities and root cause localization tasks, the corresponding task-oriented loss function is... It can be defined as:
[0116]
[0117] in Used to measure tracking expression Does it approximate the positive sample set more closely in a mini-batch? It can be represented as:
[0118]
[0119] in, The function is used to calculate the similarity between two features, given the i-th feature in the trace modality. and the given j-th feature , and The degree of similarity can be calculated as follows:
[0120]
[0121] in, It is a temperature coefficient used to adjust the sensitivity to difficult samples. This represents the cosine similarity between two features. This can amplify the universally applicable and effective information of tracking modalities in small batches of samples with the same root cause of the fault. Similarly, due to the widespread use of indicator modalities in root cause localization, indicator modalities can be used for task-oriented learning in root cause localization tasks; log modalities contain rich system detail information, therefore, log modalities can be used for task-oriented learning in fault identification tasks. The multimodal task-oriented loss can be expressed as:
[0122]
[0123] in, and These represent the task-oriented losses for metrics and logs, respectively.
[0124] Step S3.3, while performing task-oriented learning, can uncover hidden relationships between multimodal representations. Different modalities can be seen as describing the same fault from different perspectives. Although these modalities focus on different layers of the microservice system, some perspective-invariant information exists in all modalities, such as the abnormal microservice and the degree of fault. Therefore, this perspective-invariant information can be mined by constructing associations between multimodal representations. Given a small batch of fault samples... Each fault sample The graph-level representation includes three modalities, where these three modalities are positive samples of each other, and the graph-level representations of different fault samples are negative samples of each other. Therefore, we attempt to shorten the distance between any two modalities in the feature space. and The learning objective can be expressed as:
[0125]
[0126] in, It is the contrast loss between the two modal representations, and this loss can be specifically calculated as follows:
[0127]
[0128] Among them, if ,but ,otherwise Using metrics as the core modality, the graph-level representations of tracking and logging are brought closer to the graph-level representation of metrics. The cross-modal loss of the three modalities can be expressed as:
[0129]
[0130] in, This represents the cross-modal comparison loss between metrics and logs. This represents the cross-modal contrastive loss between the metric and the tracking. (By...) The guidance will enhance the perspective-invariant information among the three modalities.
[0131] In one implementation, step S4 includes:
[0132] S4.1: Employing a mid-term fusion approach, multimodal graph-level fault representations are fused during model training.
[0133]
[0134] in, , and These are graph-level fault representations for the indicator mode, the tracking mode, and the log mode, respectively.
[0135] S4.2: Two multilayer perceptrons are used for joint training on the root cause localization and fault classification tasks. For the root cause localization task, the cross-entropy loss function is selected to measure the difference between the obtained root cause and the true root cause.
[0136]
[0137] in, Represents the number of faulty samples. Represents the total number of microservice instances, when the... The root cause of this sample is the microservice instance. hour, ,otherwise ; This indicates the loss in the root cause localization task; Representing the The root cause of this sample is the microservice instance. The probability of;
[0138] For fault classification tasks, cross-entropy loss is chosen as the optimization objective:
[0139]
[0140] in, Represents the total number of fault categories, when the... When the fault type of a sample is type c, ,otherwise , The failure classification task loss is shown; Representing the The probability that the fault type of a sample is c;
[0141] S4.3: Considering the losses of the two fault diagnosis tasks, the task-oriented loss, and the cross-modal loss in a unified manner, the final optimization objective can be expressed as:
[0142]
[0143] in, , These represent the weights of each component. This represents the task-oriented loss in multimodal scenarios. This is the cross-modal loss.
[0144] Specifically, step S4.1 involves fusing the graph-level fault representations of the three modalities. All three modalities of graph-level fault representations will serve as references for downstream fault diagnosis tasks; therefore, an intermediate fusion approach is adopted, fusing the multimodal graph-level fault representations during model training.
[0145] Both downstream fault diagnosis tasks—root cause localization and fault classification—can be viewed as classification problems. Therefore, step S4.2 uses two multilayer perceptrons (MLPs) to jointly train the root cause localization and fault classification tasks. For the root cause localization task, the cross-entropy loss function is selected to measure the difference between the obtained root cause and the true root cause.
[0146] Then, by considering the losses of the two fault diagnosis tasks, the task-oriented loss, and the cross-modal loss in step S4.3, the final optimization objective is obtained. Since the task-oriented loss and the cross-modal loss are essentially contrastive losses, their sum can be directly expressed as a single term, and parameters can be used to define the objective. Modify the dimensions. Due to static settings. , The values require extensive trial and error and domain knowledge, so a dynamic weighting method is adopted. The magnitudes of the three weights are continuously adjusted during training, and the final optimization objective can be rewritten as:
[0147]
[0148] in, This represents the set of all tasks to be learned, specifically root cause localization and fault classification. Referring to a single specific task. This represents all the learnable parameters of the fault diagnosis method described above. Indicates the weight parameters Down The loss of the mission, Represents a single task Learnable weights (i.e. , In this way, a ranking list of root causes and a specific fault type are obtained, providing operators with a reference for taking appropriate recovery measures.
[0149] The inventive points and improvements of this invention are described below:
[0150] 1. Multimodal data encoding (representation) methods
[0151] Patent Document 1 (CN115640159A A Microservice Fault Diagnosis Method and System) employs a modal-wise learning approach, "using a specific model tailored to the characteristics of each modality to learn the information representation of each modality." This invention, however, uniformly extracts and encodes the multimodal events of each instance on the instance dependency graph, obtaining the multimodal event representations of each instance. Compared to Patent Document 1, this invention transforms heterogeneous multimodal data into unified events, retaining only the important event information from the multimodal data. This reduces the difficulty of multimodal data fusion while also decreasing model complexity, thereby improving the efficiency of feature extraction.
[0152] Patent document 2 (CN115309575A, "Microservice Fault Diagnosis Method, Apparatus, and Equipment Based on Graph Convolutional Neural Network") adopts the following approach: It collects alarm events of the target microservice to be diagnosed within a preset time period before and after a fault. These alarm events are generated based on multimodal data and include at least indicator alarm events, log alarm events, and call chain alarm events. In other words, patent document 2 extracts multimodal data into a single alarm event sequence, which is a combination of three modalities (indicators, logs, and call chains), effectively performing multimodal fusion in the data processing section. This approach extracts event sequences from each of the three modalities separately, resulting in three alarm event sequences. The advantage of this approach is that it allows for the extraction of high-dimensional feature representations from each of the three modalities, and multimodal fusion based on these high-dimensional features yields better results.
[0153] 2. Multimodal fusion method
[0154] In Patent Document 1 (CN115640159A, a microservice fault diagnosis method and system), the log representation HL, KPI representation HK, and tracking representation HT obtained in the previous stage are concatenated into a large vector through a multimodal representation fusion step. This invention, however, aggregates features from the instance dependency graph based on a graph neural network to obtain a multimodal graph-level fault representation. Task-oriented learning and cross-modal association construction are then performed on this multimodal graph-level fault representation. Patent Document 1 simply concatenates the multimodal representations, while this invention provides "task-oriented learning" to enhance the advantages of specific modalities for tasks, and "constructing cross-modal associations" to mine perspective-invariant information between modalities. These two methods can better fuse and mine useful information from multimodal features.
[0155] Patent document 2 (CN115309575A Microservice Fault Diagnosis Method, Apparatus and Equipment Based on Graph Convolutional Neural Network) adopts the following approach: collecting alarm events of the target microservice to be diagnosed within a preset time period before and after a fault. The alarm events are generated based on multimodal data. That is, in patent document 2, the multimodal events are combined into one alarm event sequence, which is equivalent to fusing the multimodality in the data processing part. In contrast, the present invention extracts events from three modalities separately, obtains high-dimensional features, and then fuses them. Furthermore, it adopts "task-oriented learning" and "constructing cross-modal associations" to enhance multimodal fusion, which can fully utilize the hidden information of high-dimensional features and enhance the performance of downstream tasks.
[0156] 3. Data augmentation
[0157] This invention is based on the assumption that "missing non-root cause nodes will not affect the derivation of root causes." It employs a method of "randomly deactivating some non-root cause nodes based on an instance dependency graph to obtain an augmented dataset." Patent Document 2, on the other hand, swaps at least one instance node vector from the initial training dataset with the root cause microservice node labels or microservice fault type labels of the sample microservices to obtain a data-augmented training dataset. This data-augmented training dataset is then used to train an event vector generator, resulting in a trained event vector generator. Therefore, the data augmentation in Patent Document 2 aims to train the event vector generator, i.e., to obtain better initial feature representations of events. However, it does not increase the amount of data in the dataset, nor does it alleviate the problem of scarce multimodal fault diagnosis data. The solution of this invention first proposes, based on domain knowledge, that "missing non-root cause nodes will not affect the derivation of root causes." Then, it simulates the data loss situation that may occur in an online environment, randomly deactivating some non-root cause nodes to obtain new data samples that share the same root cause labels as the original samples, thus achieving the goal of augmenting the dataset.
[0158] Please see Figure 7 This is a schematic diagram of the parameter experiment for the dimensional parameter δ in an embodiment of the present invention.
[0159] To verify the effectiveness and beneficial effects of the method proposed in this invention, specific experimental data are presented below.
[0160] On the datasets GAIA and AIOps-22, the method proposed in this invention (ours) was compared with existing methods (DiagFusion and Eadro) on root cause localization and fault classification tasks. The comparison results are shown in Table 1.
[0161] Table 1. Comparison of the method of the present invention with existing methods
[0162]
[0163] In addition, the present invention also conducted ablation experiments to verify the function of each module, as detailed in Table 2.
[0164] Table 2 Ablation Experiment
[0165]
[0166] In Table 2, AUG represents data augmentation strategy, TO represents task-oriented learning, and CM represents cross-modal association.
[0167] Example 2
[0168] Based on the same inventive concept, this embodiment discloses a task-oriented and perspective-invariant multimodal fault diagnosis system. Please refer to [link to relevant documentation]. Figure 5 The system includes:
[0169] The multimodal event expression acquisition module is used to construct the instance dependency graph of the microservice system based on the tracing information, uniformly extract and encode the multimodal events of each microservice instance on the instance dependency graph, and obtain the multimodal event expression of each microservice instance. The instance dependency graph of the microservice system includes nodes and edges. Nodes represent microservice instances, and edges represent the calling relationship between microservice instances. Nodes include root cause nodes and non-root cause nodes.
[0170] The augmented data acquisition module is used to acquire augmented datasets based on the instance dependency graph by randomly deactivating some non-root cause nodes.
[0171] The graph-level fault representation acquisition module is used to perform feature aggregation on the instance dependency graph based on graph neural network and acquired multimodal event representation, obtain multimodal graph-level fault representation, and perform task-oriented learning and construct cross-modal associations on the multimodal graph-level fault representation;
[0172] The multimodal fault diagnosis module is used to jointly learn two fault diagnosis tasks—root cause localization and fault classification—based on graph-level fault representation and augmented datasets, to obtain the final multimodal fault diagnosis results, including fault root cause ranking and fault type.
[0173] Figure 5 The task-oriented and perspective-invariant multimodal fault diagnosis system shown is a task-oriented and perspective-invariant multimodal fault diagnosis framework. In this framework, event extraction corresponds to the multimodal event representation acquisition module, data augmentation corresponds to the augmented data acquisition module, multimodal joint learning corresponds to the graph-level fault representation acquisition module, and fault diagnosis corresponds to the multimodal fault diagnosis module.
[0174] Since the system described in Embodiment 2 of this invention is the system used to implement the task-oriented and perspective-invariant multimodal fault diagnosis method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0175] Example 3
[0176] Based on the same inventive concept, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the method described in Embodiment 1.
[0177] Since the computer-readable storage medium described in Embodiment 3 of this invention is the same computer-readable storage medium used in implementing the task-oriented and perspective-invariant multimodal fault diagnosis method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer-readable storage medium based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer-readable storage media used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0178] Example 4
[0179] Based on the same inventive concept, this application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method in Embodiment 1.
[0180] Since the computer device described in Embodiment 4 of this invention is the same computer device used to implement the task-oriented and perspective-invariant multimodal fault diagnosis method in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this computer device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer devices used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.
[0181] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0182] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0183] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the embodiments of the invention fall within the scope of the claims of the invention and their equivalents, the invention also intends to include these modifications and variations.
Claims
1. A task-oriented and perspective-invariant multimodal fault diagnosis method, characterized in that, include: S1: Construct an instance dependency graph of the microservice system based on tracing information, uniformly extract and encode the multimodal events of each microservice instance on the instance dependency graph, and obtain the multimodal event expression of each microservice instance. The instance dependency graph of the microservice system includes nodes and edges. Nodes represent microservice instances, and edges represent the calling relationship between microservice instances. Nodes include root cause nodes and non-root cause nodes. S2: Based on the instance dependency graph, randomly deactivate some non-root cause nodes to obtain the augmented dataset; S3: Based on graph neural networks and the acquired multimodal event representations, feature aggregation is performed on the instance dependency graph to obtain multimodal graph-level fault representations. Task-oriented learning and cross-modal associations are then constructed on the multimodal graph-level fault representations. S4: Based on graph-level fault representation and augmented dataset, jointly learn two fault diagnosis tasks: root cause localization and fault classification, to obtain the final multimodal fault diagnosis results, including fault root cause ranking and fault type; Step S3 includes: S3.1: For the list of graphs Any instance dependency graph in The kth node The three modal expressions Three encoders based on topological adaptive graph neural networks are used. Feature aggregation is performed on the expressions of each modality to obtain node expressions that incorporate information from neighboring nodes. Furthermore, a multimodal graph-level fault representation is obtained, in which, Representing nodes respectively Event representation in the indicator modality, event representation in the tracking modality, and event representation in the log modality; These are encoders for the tracking mode, the index mode, and the log mode, respectively. They are respectively the index mode The gathering Node representation of information about all neighboring nodes within a hop, in tracking mode. The gathering Node representation of all neighboring nodes within a hop and log mode The gathering A node representation of information about all neighboring nodes within a hop; S3.2: Employ task-oriented learning to uncover the potential contribution of each modality to a specific task; S3.3: By constructing relationships between multimodalities, we can mine perspective-invariant information, which includes abnormal microservices and the degree of failure.
2. The task-oriented and perspective-invariant multimodal fault diagnosis method as described in claim 1, characterized in that, Step S1 includes: S1.1: Capture the interaction trajectories between microservice instances based on distributed system tracing technology, obtain tracing information by collecting and capturing the interaction trajectories, and construct the instance dependency graph of the microservice system based on the tracing information; S1.2: Extract and encode abnormal events from the indicator sequence, extract and encode abnormal events for each span in the trace, and extract and encode log templates from the logs. The trace is used to record the trajectory of user requests in the microservice system. S1.3: Encode the event sequences of the three modalities to obtain the event representations of the three modalities.
3. The task-oriented and perspective-invariant multimodal fault diagnosis method as described in claim 1, characterized in that, Step S2: Obtain the number of non-root cause nodes that are randomly deactivated according to the following formula: in, This represents the proportion of nodes that are randomly deactivated. Representative instance dependency graph The number of all nodes, This represents the number of non-root cause nodes that are randomly deactivated.
4. The task-oriented and perspective-invariant multimodal fault diagnosis method as described in claim 1, characterized in that, The three modalities include the indicator modality, the tracking modality, and the log modality. The methods for obtaining the fault representation at the indicator modality graph level include: A TAG graph neural network is used as the encoder to perform feature fusion of the index modalities. in, The index feature of the z-th neighbor node represents the index feature in the index mode. and These represent the learnable parameters of the TAG network; After passing through two layers of graph neural networks, a graph-level fault representation of the metric mode is obtained through a max-pooling layer: in, This represents the number of all nodes in the instance dependency graph. A graph-level representation of faults that indicate the modalities of an indicator.
5. The task-oriented and perspective-invariant multimodal fault diagnosis method as described in claim 1, characterized in that, The loss in step S3.2 is the multimodal task-oriented loss, expressed as: in, , , These represent the losses for the tracking mode, the metric mode, and the log mode, respectively. This represents the task-oriented loss in multimodal scenarios; The loss in S3.3 is the cross-modal loss of the three modes, expressed as: in, This represents the cross-modal contrastive loss between the metric modality and the log modality. This represents the cross-modal contrast loss between the index mode and the tracking mode. The cross-modal loss is for the three modes.
6. The task-oriented and perspective-invariant multimodal fault diagnosis method as described in claim 1, characterized in that, Step S4 includes: S4.1: Employing a mid-term fusion approach, multimodal graph-level fault representations are fused during model training. in, , and These are graph-level fault representations for the indicator mode, the tracking mode, and the log mode, respectively. S4.2: Two multilayer perceptrons are used for joint training on the root cause localization and fault classification tasks. For the root cause localization task, the cross-entropy loss function is selected to measure the difference between the obtained root cause and the true root cause. in, Represents the number of faulty samples. Represents the total number of microservice instances, when the... The root cause of this sample is the microservice instance. hour, ,otherwise ; This indicates the loss in the root cause localization task; Representing the The root cause of this sample is the microservice instance. The probability of; For fault classification tasks, cross-entropy loss is chosen as the optimization objective: in, Represents the total number of fault categories, when the... When the fault type of a sample is type c, ,otherwise , The failure classification task loss is shown; Representing the The fault type of each sample is The probability of; S4.3: Considering the losses of the two fault diagnosis tasks, the task-oriented loss, and the cross-modal loss in a unified manner, the final optimization objective can be expressed as: in, , These represent the weights of each component. Represents dimensional parameters. This represents the task-oriented loss in multimodal scenarios. This is the cross-modal loss.
7. A task-oriented and perspective-invariant multimodal fault diagnosis system, characterized in that, include: The multimodal event expression acquisition module is used to construct the instance dependency graph of the microservice system based on the tracing information, uniformly extract and encode the multimodal events of each microservice instance on the instance dependency graph, and obtain the multimodal event expression of each microservice instance. The instance dependency graph of the microservice system includes nodes and edges. Nodes represent microservice instances, and edges represent the calling relationship between microservice instances. Nodes include root cause nodes and non-root cause nodes. The augmented data acquisition module is used to acquire augmented datasets based on the instance dependency graph by randomly deactivating some non-root cause nodes. The graph-level fault representation acquisition module is used to perform feature aggregation on the instance dependency graph based on graph neural network and acquired multimodal event representation, obtain multimodal graph-level fault representation, and perform task-oriented learning and construct cross-modal associations on the multimodal graph-level fault representation; The multimodal fault diagnosis module is used to jointly learn two fault diagnosis tasks—root cause localization and fault classification—based on graph-level fault representation and augmented datasets, to obtain the final multimodal fault diagnosis results, including fault root cause ranking and fault type. Specifically, the graph-level fault representation acquisition module is used for: For the list of figures Any instance dependency graph in The kth node The three modal expressions Three encoders based on topological adaptive graph neural networks are used. Feature aggregation is performed on the expressions of each modality to obtain node expressions that incorporate information from neighboring nodes. Furthermore, a multimodal graph-level fault representation is obtained, in which, Representing nodes respectively Event representation in the indicator modality, event representation in the tracking modality, and event representation in the log modality; These are encoders for the tracking mode, the index mode, and the log mode, respectively. They are respectively the index mode The gathering Node representation of information about all neighboring nodes within a hop, in tracking mode. The gathering Node representation of all neighboring nodes within a hop and log mode The gathering A node representation of information about all neighboring nodes within a hop; Task-oriented learning is used to uncover the potential contribution of each modality to a specific task; By constructing relationships between multimodalities, we can mine perspective-invariant information, which includes abnormal microservices and the degree of failure.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed, it implements the method as described in any one of claims 1 to 6.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Micro-service fault diagnosis method, device and equipment based on graph convolutional neural network
CN115309575A
Micro-service fault diagnosis method and system
CN115640159A
A method for locating abnormal root causes of cloud data centers based on statistical analysis
CN109254865A
Fault root cause positioning method and system for micro-service architecture information system
CN112698975A