Abnormity detection method and tool during micro-service operation

Through the combination of trace-log hierarchical graph and graph neural network model, the problem of insufficient information utilization and difficulty in learning graph features of existing microservice anomaly detection methods is solved, and more efficient anomaly detection and visual display are achieved.

CN118550810APending Publication Date: 2024-08-27BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410726811.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing microservice runtime anomaly detection methods have deficiencies in information utilization. Template-based and serialization methods lose information, resulting in low performance; graphs constructed using graph-based methods have large-scale and flat characteristics, and graph neural networks cannot be effective. Learning long-range features results in loss of detection performance.

Method used

Propose a trace-log hierarchical graph construction algorithm that combines trace and log information to construct a trace-log graph with a two-layer hierarchical structure, and designs a graph neural network model for anomaly detection during microservice system runtime, propagating through topological order messages. and hierarchical graph training technology, combined with global attention pooling and deep support vector description algorithms, to improve detection performance.

Benefits of technology

Effectively combining tracking and log information, it improves the performance of anomaly detection in microservice systems, can effectively learn long-distance features in graphs, and improves detection accuracy and visual display capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550810A
    Figure CN118550810A
Patent Text Reader

Abstract

The invention provides an anomaly detection method during micro-service operation. The method comprises the following steps: designing a tracking-log hierarchical graph construction algorithm combining tracking and log information to construct a tracking-log graph from the tracking and log information generated during the operation of a micro-service system, designing and training an anomaly detection graph neural network model during the operation of the micro-service system, and taking the tracking-log graph as input; judging whether the micro-service system is abnormal during operation or not; detecting that the micro-service system is abnormal during operation on line, and visually displaying the operation state of the micro-service system; the invention further provides a micro-service anomaly detection tool which comprises four modules, namely a micro-service runtime tracking and log collecting and processing module, a runtime data analysis module, a micro-service runtime state display module and a data communication and caching module. The problem that the existing template-based and sequence-based methods do not use tracking and log information generated during operation of the micro-service system at the same time, and lost information can cause low performance of micro-service anomaly detection is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computers, and more specifically, to a microservice runtime anomaly detection method and tool. Background Art

[0002] Microservices are a service-oriented software architecture style that uses container technology. Microservices are based on microservice individuals that are loaded in containers and focus on specific functions and responsibilities, and are combined into complex large-scale services in a modular way. During the design process of the microservice system, the system is divided into different parts according to business functions and design processes. Compared with the simple monolithic system, the microservice architecture poses new challenges to system operation and maintenance. The microservice system in the industry is usually a large-scale distributed system consisting of thousands to tens of thousands of microservice individuals running on different servers. Under the microservice architecture, there are frequent distributed cross-network collaborations and mutual remote calls between the instances of many microservice individuals. In such a high-traffic microservice system, once a microservice individual is delayed, it may exhaust system resources in a short time, and ultimately have catastrophic consequences, which brings great difficulties to the operation and maintenance of the microservice system.

[0003] Currently, in the industry, distributed link tracking systems are widely used in the intelligent operation and maintenance of microservice systems. Such systems can track the call and execution process in the microservice system, obtain the three types of microservice system runtime data of tracking, logging, and monitoring in real time, and record them. The microservice anomaly detection method is based on the three types of runtime data tracked by the distributed link tracking system. The existing microservice runtime anomaly detection technology can be divided into template-based, serialization-based, and Figure 3 When training the model, the template-based runtime data modeling method for microservice systems extracts the corresponding template set from the tracing and log data set, converts the runtime data generated by each microservice system call into the corresponding template, and builds a graph of the template according to the relationship between the data to obtain a set of template graphs corresponding to normal and abnormal data; when training the model, the serialization modeling method for runtime data of microservice systems merges the tracing and log data in the training set to construct a corpus, and splices the tracing and log texts generated by each call in the data set in chronological order to obtain the text set corresponding to each call, and uses LSTM, GRU and other neural network models for learning serialized data to train this information to extract the tracing and log features of normal and abnormal data; the graph-based modeling method builds a graph of the runtime data generated by the microservice system, and uses a graph neural network model to learn the features in the graph.

[0004] The problems existing in the prior art are:

[0005] 1. Existing template-based and sequence-based methods do not use the tracking and log information generated by the microservice system at runtime. The lost information will lead to low performance of microservice anomaly detection;

[0006] 2. When constructing graphs, the existing graph-based microservice system runtime anomaly detection methods obtain graphs with large-scale and flattened characteristics. Graph neural networks cannot learn long-distance features in the graphs well, resulting in loss of detection performance. Summary of the invention

[0007] The purpose of the embodiments of the present disclosure is to provide a method and tool for detecting anomalies during microservice runtime.

[0008] In a general aspect, a method for detecting anomalies during microservice runtime is provided, a trace-log hierarchical graph construction algorithm combining trace and log information is designed to construct a trace-log graph from the trace and log information generated when the microservice system is running, a microservice system runtime anomaly detection graph neural network model is designed and trained, and the trace-log graph is used as input to determine whether the microservice system has runtime anomalies; the microservice system is detected to have runtime anomalies online, and the running status of the microservice system is visualized;

[0009] The tracking-log hierarchical graph construction algorithm is a two-layer hierarchical structure, including a bottom layer graph and an upper layer graph;

[0010] When constructing the underlying graph of the trace-log, the spans and logs in the trace are taken as points in the graph, and the calling relationship between spans, the inclusion relationship between spans and logs, and the timing relationship between logs are taken as edges in the graph. First, the span nodes are graphed according to the calling relationship between spans, and then the log nodes are inserted into the corresponding trace nodes according to the timing relationship and the inclusion relationship, and finally the underlying graph of the trace-log graph is constructed.

[0011] When constructing the upper-level graph of the tracking-log graph, the span nodes in the tracking are divided according to the span type, the span node of the category Entry is used as the starting point, and the span node of the category Exit is used as the end point, and the span and log nodes between the starting point and the corresponding one or more end points are collapsed into a super node in the top-level graph, the nodes of the bottom-level graph and the super nodes of the upper-level graph are connected according to the inclusion relationship during the collapse, and the super nodes are connected according to the connection relationship between the nodes in the bottom-level graph they contain.

[0012] The microservice anomaly detection graph neural network model receives a trace-log graph as input. After receiving a trace-log graph as input data, a neural network is constructed to perform three rounds of propagation operations on the graph. In each round of propagation, the neural network first uses a gated recurrent unit to perform forward and reverse information propagation on the bottom graph in topological order. After the propagation is completed, the new state of the node in the bottom graph is pushed up to the upper graph to update the state of the super node in the upper graph. After that, the neural network uses a gated recurrent unit to perform forward and reverse information propagation on the upper graph in topological order. After the propagation is completed, the new state of the super node in the upper graph is pushed up to the bottom graph to update the state of the node in the bottom graph.

[0013] After completing three rounds of propagation operations and obtaining the new states of the nodes in the underlying graph, the neural network uses the global attention pooling technology to calculate the state vector of the entire graph from the states of the nodes in the underlying graph, and sends the state vector of the graph to the deep support vector description algorithm to update the radius of the hypersphere maintained by the deep support vector description algorithm, and uses the Loss function to backpropagate and update the parameters in the graph neural network.

[0014] During the training process, the layered graph training technology is used. The bottom graph composed of spans and logs is first trained. After the trained state is pushed up to the top graph, secondary training is performed on the top graph. After the training is completed, the state of the top graph nodes is pushed to the bottom graph.

[0015] In another general aspect, a microservice anomaly detection tool is provided, which includes four modules: a microservice runtime tracing and log collection and processing module, a runtime data analysis module, a microservice runtime status display module, and a data communication and caching module;

[0016] The microservice runtime tracking and log collection and processing module obtains the tracking and log information collected by the distributed link tracking system from the storage module of the distributed link tracking system, and performs text processing, vectorization, and construction of a tracking-log graph. The runtime data analysis module applies a microservice runtime anomaly detection method to send the constructed tracking-log graph into the pre-trained graph neural network for anomaly detection. The microservice runtime status detection module visualizes the detected tracking-log graph data and provides real-time warning for abnormal data.

[0017] The data communication and cache module periodically pulls data from the data storage module, and each time it pulls data, it obtains tracking and log data that has not been detected for anomalies from the data storage module of Apache SkyWalking, and caches it using Redis. When the runtime data accumulated in the Redis cache reaches a threshold, or the microservice runtime anomaly detection module actively requests data from the data communication and cache module, the data in the cache is handed over to the data communication and cache module for anomaly detection.

[0018] The microservice runtime status display module has two modes for obtaining data. First, when the runtime data accumulated in its own Redis cache reaches a threshold, the data communication and cache module sends the data to the microservice runtime anomaly detection module. Second, the microservice runtime anomaly detection module will try to request data from the data cache and communication module after it has been idle for a period of time.

[0019] After acquiring the data, the microservice runtime status display module first extracts the template of the log data, and then performs text preprocessing on the trace and log templates respectively. After completing the text preprocessing and vectorization, the module will use the trace-log graph construction algorithm to construct the trace and log sentence vector group into a trace-log hierarchical graph, and then send it to the detection model composed of the entry control graph neural network and the deep support vector description for anomaly detection. After the detection is completed, the trace-log graph and the detection results are handed over to the data communication and cache module for caching.

[0020] The innovation of the embodiment of the present invention lies in:

[0021] The present invention proposes a hierarchical graph modeling method for microservice runtime tracking and log data, and based on this method proposes a microservice system anomaly detection graph neural network model, and based on the above method and model, proposes a microservice system runtime anomaly detection method based on tracking and log information. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other objects and features of the present disclosure will become more apparent from the following description in conjunction with the accompanying drawings.

[0023] Figure 1 is a schematic diagram showing a trace-log hierarchical graph according to an embodiment of the present disclosure;

[0024] Figure 2 is a schematic diagram showing a microservice anomaly detection graph neural network model according to an embodiment of the present disclosure;

[0025] Figure 3 is a schematic diagram showing a microservice anomaly detection tool according to an embodiment of the present disclosure;

[0026] Figure 4Schematic diagram of a microservice anomaly detection tool workflow diagram according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] The following specific embodiments are provided to help the reader obtain a comprehensive understanding of the methods, devices and / or systems described herein. However, after understanding the disclosure of the present application, various changes, modifications and equivalents of the methods, devices and / or systems described herein will be clear. For example, the order of operations described herein is only an example and is not limited to those orders set forth herein, but can be changed as will be clear after understanding the disclosure of the present application, except for operations that must occur in a specific order. In addition, for greater clarity and simplicity, the description of features known in the art may be omitted.

[0028] The features described herein can be implemented in different forms and should not be construed as being limited to the examples described herein. Rather, the examples described herein have been provided to illustrate only some of the many possible ways to implement the methods, devices, and / or systems described herein, which will be clear after understanding the disclosure of the present application.

[0029] As used herein, the term "and / or" includes any one of the associated listed items and any combination of any two or more.

[0030] Although terms such as "first", "second", and "third" may be used herein to describe various members, components, regions, layers, or portions, these members, components, regions, layers, or portions should not be limited by these terms. Instead, these terms are only used to distinguish one member, component, region, layer, or portion from another member, component, region, layer, or portion. Therefore, without departing from the teachings of the examples described herein, the first member, first component, first region, first layer, or first portion referred to in the examples may also be referred to as the second member, second component, second region, second layer, or second portion.

[0031] In the specification, when an element (such as a layer, a region or a substrate) is described as being “on”, “connected to” or “coupled to” another element, the element may be directly “on”, “connected to” or “coupled to” another element, or one or more other elements may be present therebetween. Conversely, when an element is described as being “directly on”, “directly connected to” or “directly coupled to” another element, there may be no other elements present therebetween.

[0032] The terms used herein are only used to describe various examples and are not intended to limit the disclosure. Unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. The terms "comprise", "include" and "have" indicate the presence of the described features, quantities, operations, components, elements and / or combinations thereof, but do not exclude the presence or addition of one or more other features, quantities, operations, components, elements and / or combinations thereof.

[0033] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by a person of ordinary skill in the art to which the present disclosure belongs after understanding the present disclosure. Unless explicitly defined as such herein, terms (such as those defined in a general dictionary) should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and should not be interpreted in an idealized or overly formal manner.

[0034] Furthermore, in the description of examples, when it is considered that a detailed description of a well-known related structure or function would cause vague interpretation of the present disclosure, such a detailed description will be omitted.

[0035] According to a method for detecting anomalies during runtime of a microservice according to an embodiment of the present disclosure, an algorithm for constructing a trace-log hierarchical graph that combines tracing and log information is proposed to solve the problem of detecting anomalies during runtime of a microservice system, and a neural network model for detecting anomalies during runtime of a microservice system is designed and trained. The model receives a trace-log graph constructed by tracing and log information generated during the runtime of a microservice system as input, and determines whether there are runtime anomalies in the microservice system. In order to improve the performance of the model, the present invention uses topological order message propagation technology, as well as hierarchical graph construction and training technology. At the same time, the present invention designs and implements a runtime anomaly detection tool for large-scale microservice systems, which can collect runtime data from a running microservice system, detect online whether there are runtime anomalies in the microservice system, and visualize the running status of the microservice system.

[0036] Tracking-Log layered graph construction method:

[0037] Aiming at the large-scale and flat characteristics of the graph constructed by the existing graph-based microservice system anomaly detection method, the present invention designs a trace-log graph construction technology. This technology comprehensively considers the call relationship between spans in the trace, the inclusion relationship between spans and logs, and the temporal relationship between logs, and constructs a trace-log graph with a two-layer hierarchical structure.

[0038] When constructing the bottom-level graph of the trace-log, the present invention uses the spans and logs in the trace as points in the graph, and uses the calling relationship between spans, the inclusion relationship between spans and logs, and the timing relationship between logs as edges in the graph to construct the bottom-level graph of the trace-log graph. When constructing the top-level graph of the trace-log graph, the present invention divides the span nodes in the trace according to the span type, uses the span node of the Entry category as the starting point, and uses the span node of the Exit category as the end point, and shrinks the span and log nodes between the starting point and the corresponding one or more end points into a supernode in the top-level graph. The nodes of the bottom-level graph are connected to the supernodes of the upper-level graph according to the inclusion relationship during shrinkage, and the supernodes are connected according to the connection relationship between the nodes in the bottom-level graph they contain. The schematic diagram of the trace-log hierarchical graph constructed by the present invention is shown as follows. Figure 1 As shown, when the present invention constructs the bottom-level graph, the red span nodes No. 0-3 and No. 11-15 are first constructed according to the call relationship between spans, and then the green log nodes No. 4 and No. 10-13 are inserted into the corresponding tracking nodes according to the timing relationship and the inclusion relationship, and finally the bottom-level graph is constructed. When the present invention constructs the upper-level graph, the bottom-level graph is divided from the nodes of the Entry category, and the red nodes No. 0-2 and the green nodes No. 11-13 are merged into the H0 supernode, and the red nodes No. 3. No. 11-15 and the green node No. 4 are merged into the H1 supernode, and finally a complete tracking-log hierarchical graph is obtained.

[0039] Microservice Anomaly Detection Graph Neural Network Model:

[0040] The graph neural network model constructed by the present invention is divided into three layers. The first layer is the message propagation layer on the tracking-log layered graph. The second layer is the pooling layer based on the global attention pooling technology. These two layers perform forward propagation. The third layer is based on the deep support vector description and uses a specific loss function for back propagation.

[0041] The microservice system defect detection graph neural network designed by the present invention receives a trace-log graph as input. After receiving a trace-log graph as input data, the neural network performs three rounds of propagation operations on the graph on the message propagation layer. In each round of propagation, the neural network first uses a gated recurrent unit to perform forward and reverse information propagation on the underlying graph in a topological order. After the propagation is completed, the new state of the node in the underlying graph is pushed to the upper-level graph to update the state of the super-node in the upper-level graph. After that, the neural network uses a gated recurrent unit to perform forward and reverse information propagation on the upper-level graph in a topological order. After the propagation is completed, the new state of the super-node in the upper-level graph is pushed to the underlying graph to update the state of the node in the underlying graph.

[0042] During the training process, the present invention uses a layered graph training technology. During the training process, the bottom-level graph composed of spans and logs is first trained. After the trained state is pushed up to the top-level graph, secondary training is performed on the top-level graph. After the training is completed, the state of the top-level graph node is pushed to the bottom-level graph. The specific layered graph training algorithm process is as follows: In the first step, the layered graph training algorithm uses a gated graph neural network to update the state of the bottom-level graph to obtain the node state of the bottom-level graph at time t. In the second step, the layered graph training algorithm updates the state of the top-level graph node. Specifically, for the top-level graph node v, the new state of its corresponding bottom-level graph node is calculated and passed to the top-level graph node. The message is used to call the nodes of the top-level graph. In the third step, the layered graph training algorithm uses the gated graph neural network to update the state of the upper graph and obtain the new node state of the upper graph at time t. In the fourth step, the layered graph training algorithm uses the Attention technology to calculate the weight of the top-level graph node for each different bottom-level graph node, and uses the weight to update the node state of the bottom-level graph.

[0043] After completing three rounds of propagation operations and obtaining the new states of the nodes in the underlying graph, the neural network uses global attention pooling technology in the second layer to calculate the state vector of the entire graph from the states of the nodes in the underlying graph. Most of the tracking, span, and log information generated when the microservice system is running are normal data, and abnormal runtime data accounts for a very small part of all data. In order to solve the problem of imbalanced training samples, the classifier part of the graph neural network model of the present invention uses a deep support vector description algorithm that is widely used in the field of anomaly detection. After completing the pooling, the present invention sends the state vector of the graph to the deep support vector description algorithm of the third layer, updates the radius of the hypersphere maintained by the deep support vector description algorithm, and uses the following Loss function to back-propagate and update the parameters in the graph neural network.

[0044]

[0045] The overall structure of the model is as follows Figure 2 shown.

[0046] Microservice anomaly detection tools:

[0047] Based on the microservice system runtime anomaly detection model based on graph neural network proposed by the present invention, the present invention designs and implements a microservice system runtime anomaly detection tool. The microservice runtime anomaly detection tool includes the following three modules: microservice runtime tracking and log collection and processing module, runtime data analysis module, and microservice runtime status display module. After the developer deploys the distributed link tracking system including this tool in the microservice system, the microservice runtime tracking and log collection and processing module of this tool will obtain the tracking and log information collected by the distributed link tracking system from the storage module of the distributed link tracking system, and perform text processing, vectorization, and construction of the tracking-log graph. The runtime data analysis module sends the constructed tracking-log graph to the pre-trained graph neural network for anomaly detection. The microservice runtime status detection module visualizes the detected tracking-log graph data and provides real-time warning for abnormal data. The architecture diagram of the tool is shown below. Figure 3 shown.

[0048] This tool develops and implements data communication and caching modules, microservice anomaly detection modules and microservice anomaly detection result display modules.

[0049] The data communication and cache module will periodically pull data from the data storage module. Each time it pulls data, it will obtain tracking and log data that has not been detected for anomalies from the Apache SkyWalking data storage module and cache it using Redis. When the runtime data accumulated in the Redis cache reaches the threshold, or the microservice runtime anomaly detection module actively requests data from the data communication and cache module, the data in the cache will be handed over to the data communication and cache module for anomaly detection.

[0050] The microservice runtime anomaly detection module has two modes for acquiring data. When the runtime data accumulated in the data communication and cache module in its own Redis cache reaches the threshold, the data will be sent to the microservice runtime anomaly detection module. In addition, the microservice runtime anomaly detection module will try to request data from the data cache and communication module after it has been idle for a period of time. After obtaining the data through the above two modes, the module will first perform template extraction on the log data, and then perform text preprocessing on the tracking and log templates respectively. After completing the text preprocessing and vectorization, the module will use the tracking-log graph construction algorithm proposed in the present invention to construct the tracking and log sentence vector group into a tracking-log hierarchical graph, and then send it to the detection model composed of the entry control graph neural network and the deep support vector description for anomaly detection. After the detection is completed, the tracking-log graph and the detection results will be handed over to the data communication and cache module for caching.

[0051] The front-end part of the tool is secondary developed based on the tracing page in the native display UI interface of Apache SkyWalking. The list on the left side of the figure is the tracing information of the microservice system call recorded by Apache SkyWalking, as shown in the green dotted box in the figure. On this basis, this tool adds the anomaly detection results of the microservice call process corresponding to each trace, and displays them to the administrator in a visual form, so that the administrator can lock the anomaly of the microservice system and deal with it in time. At the same time, this tool also displays the trace-log graph corresponding to the runtime data generated by the call to the administrator in a visual form on the right. After obtaining the tracing data from the observable analysis platform of Apache SkyWalking, the front-end part of the tool will periodically and asynchronously request the anomaly detection results corresponding to the tracing data from the data communication and cache module, and display them in the form of a graph after obtaining the results.

[0052] The workflow diagram of the three modules of the tool is as follows Figure 4 shown.

[0053] During the initialization phase of the tool, the data communication and cache module, the microservice runtime anomaly detection module, and the microservice anomaly detection result display module will complete the initialization of the modules in their respective operating environments. The microservice runtime anomaly detection module and the microservice anomaly detection result display module will obtain the IP address and port number and other parameters of the data communication and cache module according to their respective configuration files, and use the above parameters to register their own IP address and port number parameters in the data communication and cache module. After registration, the microservice runtime anomaly detection module and the microservice anomaly detection result can communicate bidirectionally with the data communication and cache module. During the initialization process, the data communication and cache module will also determine whether the microservice system is online through the heartbeat information sent by the probe.

[0054] After completing the initialization, the data communication and cache module will continuously pull the runtime information generated by the microservice system obtained by the probe from the data storage module of Apache SkyWalking, including tracking and log data, and cache the above data. When the amount of microservice system runtime information cached by the data communication and cache module reaches the threshold, or the idle time of the microservice runtime anomaly detection module reaches the threshold, the data communication and cache module will send the microservice system runtime information it has saved to the microservice runtime anomaly detection module. After pulling the runtime data, the microservice runtime anomaly detection module will construct the data into a tracking-log graph and send it to the neural network model for anomaly detection. After the detection is completed, the tracking-log graph and the detection results will be sent to the data communication and cache module for caching.

[0055] When the user is viewing the front-end UI of the microservice anomaly detection result display module, the microservice anomaly detection result display module will periodically and asynchronously request the data communication and cache module for the tracking detection results corresponding to each trace when obtaining the tracking data generated by the microservice runtime from the data storage module of Apache SkyWalking. If the detection results have been saved in the data communication and cache module, the detection results will be displayed to the user in the front-end UI. If the data communication and cache module does not contain the results, it will be displayed as being detected and the results will be updated during the next asynchronous request.

[0056] Although some embodiments of the present disclosure have been shown and described, it will be appreciated by those skilled in the art that modifications may be made to the embodiments without departing from the principles and spirit of the present disclosure, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for detecting anomalies during microservice runtime, characterized in that: Design a trace-log hierarchical graph construction algorithm that combines trace and log information. Construct a trace-log graph from the trace and log information generated when the microservice system is running. Design and train a microservice system runtime anomaly detection graph neural network model. Use the trace-log graph as input to determine whether the microservice system has runtime anomalies. Online detection of runtime anomalies in the microservice system and visualization of the running status of the microservice system; The tracking-log hierarchical graph construction algorithm is a two-layer hierarchical structure, including a bottom layer graph and an upper layer graph; When constructing the underlying graph of the trace-log, the spans and logs in the trace are taken as points in the graph, and the calling relationship between spans, the inclusion relationship between spans and logs, and the timing relationship between logs are taken as edges in the graph. First, the span nodes are graphed according to the calling relationship between spans, and then the log nodes are inserted into the corresponding trace nodes according to the timing relationship and the inclusion relationship, and finally the underlying graph of the trace-log graph is constructed. When constructing the upper-level graph of the tracking-log graph, the span nodes in the tracking are divided according to the span type, the span node of the category Entry is used as the starting point, and the span node of the category Exit is used as the end point, and the span and log nodes between the starting point and the corresponding one or more end points are collapsed into a super node in the top-level graph, the nodes of the bottom-level graph and the super nodes of the upper-level graph are connected according to the inclusion relationship during the collapse, and the super nodes are connected according to the connection relationship between the nodes in the bottom-level graph they contain.

2. A microservice runtime anomaly detection method as claimed in claim 1, characterized in that: The microservice anomaly detection graph neural network model receives a trace-log graph as input. After receiving a trace-log graph as input data, a neural network is constructed to perform three rounds of propagation operations on the graph. In each round of propagation, the neural network first uses a gated recurrent unit to perform forward and reverse information propagation on the bottom graph in topological order. After the propagation is completed, the new state of the node in the bottom graph is pushed up to the upper graph to update the state of the super node in the upper graph. After that, the neural network uses a gated recurrent unit to perform forward and reverse information propagation on the upper graph in topological order. After the propagation is completed, the new state of the super node in the upper graph is pushed up to the bottom graph to update the state of the node in the bottom graph. After completing three rounds of propagation operations and obtaining the new states of the nodes in the underlying graph, the neural network uses the global attention pooling technology to calculate the state vector of the entire graph from the states of the nodes in the underlying graph, and sends the state vector of the graph to the deep support vector description algorithm to update the radius of the hypersphere maintained by the deep support vector description algorithm, and uses the Loss function to backpropagate and update the parameters in the graph neural network.

3. A microservice runtime anomaly detection method as claimed in claim 2, characterized in that: During the training process, the layered graph training technology is used. The specific process is as follows: In the first step, the layered graph training algorithm uses the gated graph neural network to update the state of the underlying graph and obtain the node state of the underlying graph at time t; In the second step, the layered graph training algorithm updates the state of the top-level graph node. For the top-level graph node v, the new state of its corresponding bottom-level graph node is calculated and passed to the top-level graph node. The message is used to call the nodes of the top-level graph. Update the status of In the third step, the layered graph training algorithm uses the gated graph neural network to update the state of the upper graph and obtain the new node state of the upper graph at time t; In the fourth step, the layered graph training algorithm uses the Attention technique to calculate the weight of the top-level graph node for each different bottom-level graph node, and uses the weight to update the node status of the bottom-level graph; After completing three rounds of propagation operations and obtaining the new states of the nodes in the underlying graph, the neural network uses the global attention pooling technology in the second layer to calculate the state vector of the entire graph from the states of the nodes in the underlying graph; the classifier part in the graph neural network model uses the deep support vector description algorithm. After pooling, the state vector of the graph is sent to the deep support vector description algorithm in the third layer, the radius of the hypersphere maintained by the deep support vector description algorithm is updated, and the parameters in the graph neural network are updated by backpropagation using the following Loss function: After training, the state of the top-level graph nodes is pushed to the bottom-level graph.

4. A microservice anomaly detection tool, characterized in that: It includes four modules: microservice runtime tracking, log collection and processing module, runtime data analysis module, microservice runtime status display module, and data communication and caching module; The microservice runtime tracking and log collection and processing module obtains the tracking and log information collected by the distributed link tracking system from the storage module of the distributed link tracking system, and performs text processing, vectorization, and construction of a tracking-log graph. The runtime data analysis module applies a microservice runtime anomaly detection method as described in any one of claims 1-3, and sends the constructed tracking-log graph to the pre-trained graph neural network for anomaly detection. The microservice runtime status detection module visualizes the detected tracking-log graph data and provides real-time warning for abnormal data. The data communication and cache module periodically pulls data from the data storage module, and each time it pulls data, it obtains tracking and log data that has not been detected for anomalies from the data storage module of Apache Sky Walking, and caches it using Redis. When the runtime data accumulated in the Redis cache reaches a threshold, or the microservice runtime anomaly detection module actively requests data from the data communication and cache module, the data in the cache is handed over to the data communication and cache module for anomaly detection.

5. A microservice anomaly detection tool as claimed in claim 4, characterized in that: The microservice runtime status display module has two modes for acquiring data. First, when the runtime data accumulated in its own Redis cache reaches a threshold, the data communication and cache module sends the data to the microservice runtime anomaly detection module. Second, the microservice runtime anomaly detection module will try to request data from the data cache and communication module after it has been idle for a period of time; After acquiring the data, the microservice runtime status display module first extracts the template of the log data, and then performs text preprocessing on the trace and log templates respectively. After completing the text preprocessing and vectorization, the module will use the trace-log graph construction algorithm to construct the trace and log sentence vector group into a trace-log hierarchical graph, and then send it to the detection model composed of the entry control graph neural network and the deep support vector description for anomaly detection. After the detection is completed, the trace-log graph and the detection results are handed over to the data communication and cache module for caching.