An AI application exception rapid diagnosis method, system and storage medium

By using graph neural networks to monitor topology changes in a distributed AI application platform in real time, and combining model call logs and resource monitoring metrics, a set of mapping vectors and anomaly correlation paths are constructed. This solves the problems of misjudgment and missed judgment in fault diagnosis under dynamic service topology, and enables fast and accurate anomaly root cause location.

CN122111736AInactive Publication Date: 2026-05-29SHAANXI YUNCHUANG NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAANXI YUNCHUANG NETWORK TECH CO LTD
Filing Date
2026-04-24
Publication Date
2026-05-29
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN122111736A_ABST
    Figure CN122111736A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of anomaly diagnosis, in particular to an AI application anomaly rapid diagnosis method and system and a storage medium. The method comprises the following steps: extracting corresponding embedded representations between a rule condition expression and a micro-service dependency topology graph, and generating a mapping vector set; triggering a rule adaptation process and updating the mapping vector set when detecting that a dependency relationship change amplitude exceeds a preset amplitude, extracting a cross-service delay propagation link and an abnormal index sequence, and determining a potential fault area set; constructing an abnormal correlation path for the potential fault area to confirm an abnormal root location, forming an adaptation embedded representation mechanism; extracting simulation abnormal scene data and determining an accurate fault area, updating overall corresponding embedded representations, and constructing a final diagnosis rule mapping framework. The application solves the problem that in an AI application environment, service topology dynamic changes cause an abnormal root cause to be difficult to quickly locate, and realizes intelligent identification of an abnormal propagation link and rapid and accurate diagnosis of a fault root.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anomaly diagnosis technology, and in particular to a rapid diagnostic method, system, and storage medium for AI application anomalies. Background Technology

[0002] With the widespread application of artificial intelligence (AI) technology in fields such as internet services, intelligent recommendations, image recognition, and natural language processing, an increasing number of AI application platforms are adopting distributed service architectures for deployment and operation. However, due to the large number of microservices, complex call chains, and dynamically changing deployment environments within distributed service architectures, once a service node experiences performance or resource anomalies, the anomaly often propagates along the service call chain throughout the system. This can lead to multiple service nodes experiencing simultaneous response delays, increased error codes, or abnormal resource consumption, ultimately affecting the overall operational stability of the AI ​​application platform.

[0003] In existing technologies, diagnostic methods for anomalies in distributed systems typically rely on pre-configured monitoring rules or static service dependencies for analysis. However, in real-world AI application platforms, frequent updates to model service deployments, dynamic expansion of service instances, and constant changes in service call chains can easily lead to discrepancies between existing static dependencies and rule configurations and the actual operational state. When the microservice topology changes, the correspondence between existing rules and actual service nodes may become invalid, resulting in misjudgments or omissions in the fault localization process. Furthermore, traditional methods usually analyze only a single monitoring metric, making it difficult to comprehensively analyze the correlations between multi-dimensional operational data, thus hindering the accurate identification of anomaly propagation paths in the service call chain.

[0004] Therefore, how to comprehensively utilize service topology information, model call logs, and resource monitoring indicators in a distributed microservice architecture AI application platform to automatically analyze the anomaly propagation process and quickly identify the root cause of anomalies when the topology changes dynamically, thereby achieving rapid diagnosis of AI application anomalies, has become a pressing technical problem to be solved in the current operation and maintenance management of distributed AI applications. Summary of the Invention

[0005] This invention provides a rapid diagnostic method, system, and storage medium for AI application anomalies. It is used to form a diagnostic mechanism from anomaly detection and anomaly propagation analysis to root cause localization and rule mapping optimization by collaboratively analyzing service dependencies, operation log data, and resource monitoring indicators in a distributed service system. This significantly improves the efficiency and accuracy of fault diagnosis for AI applications in complex microservice environments.

[0006] In a first aspect, the present invention provides a rapid diagnostic method for anomalies in AI applications, the method comprising: Step S1: Obtain service layout data and diagnostic rule set in the distributed service system where the AI ​​application is located, extract the corresponding embedded representation of the rule condition expression in the diagnostic rule set and the microservice dependency topology graph in the service layout data, and generate a mapping vector set based on the embedded representation; Step S2: Monitor the topology change signal of the topology graph. When the topology change signal causes the change in dependency to exceed a preset threshold, trigger the rule adaptation process and update the mapping vector set. Based on the updated mapping vector set, obtain the request response latency distribution and resource monitoring indicators in the model call log, extract the latency propagation link and abnormal indicator sequence, and determine the set of potential fault areas. Step S3: For the set of potential fault regions, construct anomaly association paths and confirm the location of the anomaly root cause; enhance the mapping vector set through the location of the anomaly root cause to form an adaptive embedding representation mechanism; Step S4: Based on the adaptive embedding representation mechanism, extract the request response latency distribution and error code sequence under simulated abnormal scenarios to determine the precise fault area; update the overall corresponding embedding representation according to the precise fault area and the latest service layout data, integrate real-time monitoring data, and construct the final diagnostic rule mapping framework.

[0007] As a preferred embodiment of the present invention, step S1, generating a set of mapping vectors, includes: By collecting the microservice dependency topology graph from the service layout data and combining it with the rule condition expressions in the diagnostic rule set, a graph neural network is used to extract features from the rule condition expressions and the microservice dependency topology graph to generate corresponding embedding representations. Based on the embedding representations, a mapping relationship is established between the rule condition expressions and service nodes in the microservice dependency topology graph. Through the mapping relationship, the mapping vector set is constructed.

[0008] As a preferred embodiment of the present invention, step S2, triggering the rule adaptation process and updating the mapping vector set, includes: Real-time acquisition of topology change signals triggered by node adjustment events and expansion events; if the topology change signal causes the dependency relationship change to exceed a preset threshold, the rule adaptation process is triggered; through the rule adaptation process, the corresponding embedding representation of the rule condition expression and the microservice dependency topology graph is recalculated; based on the recalculated embedding representation, the correspondence in the initial mapping vector set is updated to form an updated mapping vector set.

[0009] As a preferred embodiment of the present invention, step S2, determining the set of potential fault regions, includes: Based on the updated mapping vector, request-response latency distribution data from the real-time collected model call logs is obtained; simultaneously, the memory usage peak sequence from the resource monitoring metrics is obtained; by analyzing the request-response latency distribution data, cross-service latency propagation links are extracted; by analyzing the memory usage peak sequence, abnormal indicator sequences are extracted; density clustering is used to group the latency propagation links and the abnormal indicator sequences to generate the potential fault region set.

[0010] As a preferred embodiment of the present invention, step S3, identifying the location of the abnormal root cause, includes: For each region in the potential fault region set, extract the business exception code from the real-time collected model call logs, and combine it with the corresponding embedded representation of the rule condition expression to the service node in the mapping vector set to construct a forward association path from the business exception code to the specific service node, and a reverse association path from the service node to the business exception code, forming a bidirectional association path; analyze the matching completeness of the rule trigger condition expression in the bidirectional association path; when the matching completeness is higher than a preset value, confirm that the exception root cause location belongs to one of the predefined exception types, and generate exception root cause classification data containing exception root cause location identifier and root cause classification label.

[0011] As a preferred embodiment of the present invention, step S3, forming an adaptive embedding representation mechanism, includes: Obtain confirmed anomaly root cause location data and corresponding business anomaly code aggregation statistics; integrate the root cause classification labels of the anomaly root cause location data into the initial mapping vector set using a graph neural network; generate an enhanced rule adaptation embedding representation mechanism based on the integrated mapping vector set; optimize the correspondence between the rule condition expression and the microservice dependency topology graph using the enhanced rule adaptation embedding representation mechanism.

[0012] As a preferred embodiment of the present invention, step S4, determining the precise fault area, includes: Based on the adaptive embedding representation mechanism, the request response latency distribution and error code sequence under simulated abnormal scenarios are extracted; the location reliability of the root cause classification labels under the simulated abnormal scenarios is analyzed; if the location reliability is lower than the preset reliability, the density clustering parameters are iteratively adjusted to tighten the grouping boundaries; and the set of potential fault regions is recalculated using the adjusted grouping boundaries to generate the precise fault regions.

[0013] As a preferred embodiment of the present invention, step S4, generating the final diagnostic rule mapping framework, includes: Based on the precise fault region and the microservice dependency topology graph in the latest collected service layout data, update the rule condition expression to the overall corresponding embedding representation of the service node; integrate the real-time collected model call logs and the resource monitoring indicators to optimize the overall corresponding embedding representation; and construct the final diagnostic rule mapping framework through the optimized overall corresponding embedding representation.

[0014] Secondly, the present invention also provides a rapid diagnostic system for AI application anomalies, for implementing the above-described method, the system comprising: The mapping generation unit is used to obtain service layout data and diagnostic rule set in the distributed service system where the AI ​​application is located, extract the corresponding embedding representation of the rule condition expression in the diagnostic rule set and the microservice dependency topology graph in the service layout data, and generate a mapping vector set based on the embedding representation; The adaptation analysis unit is used to monitor the topological structure change signal of the topology graph. When the topological structure change signal causes the change in dependency to exceed a preset threshold, the rule adaptation process is triggered and the mapping vector set is updated. The fault confirmation unit is used to obtain the request response latency distribution and resource monitoring indicators in the model call log based on the mapping vector set, and extract the latency propagation link and abnormal indicator sequence to determine the set of potential fault areas. Root cause identification unit: For the set of potential fault areas, construct anomaly association paths to identify the location of the anomaly root cause; and enhance the mapping vector set through the location of the anomaly root cause to form an adaptive embedding representation mechanism. The diagnostic mapping unit is used to extract the request response latency distribution and error code sequence under simulated abnormal scenarios based on the adaptive embedding representation mechanism, and determine the precise fault area; update the overall corresponding embedding representation according to the precise fault area and the latest service layout data, integrate real-time monitoring data, and construct the final diagnostic rule mapping framework.

[0015] Thirdly, the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the above-described method.

[0016] The beneficial effects of this invention are as follows: This invention collects service layout data and diagnostic rule sets from a distributed service system, combines them with a microservice dependency topology graph, and uses graph neural networks to extract the embedding representations between rule condition expressions and service nodes. This constructs a set of mapping vectors from rules to service nodes, enabling diagnostic rules to establish semantic associations with actual microservice dependencies. By continuously monitoring topology change signals triggered by node adjustment events and service expansion events, when a dependency change exceeds a set threshold, a rule adaptation process is triggered and the embedding representation is updated, ensuring the diagnostic rules remain effective under topology changes. By extracting request-response latency distribution from model call logs and combining it with peak GPU memory usage sequences from resource monitoring metrics, a structured analysis of service call relationships is performed. Abnormal latency edges are identified, and cross-service latency propagation links are constructed. Simultaneously, abnormal resource sequences are extracted through abnormal indicator detection, and density clustering is used to jointly group latency propagation links and abnormal indicators, generating a set of potential fault regions. This allows the system to quickly narrow down the anomaly localization in a large-scale microservice environment. By constructing a bidirectional association path from the business exception code to the specific service node within the potential fault area and analyzing the matching completeness of the rule triggering condition expression in the path, the root cause location of the exception can be accurately identified, and corresponding root cause classification data can be generated. The root cause classification label is integrated into the original mapping vector set, and an enhanced rule adaptation embedding representation mechanism is formed through a graph neural network, enabling the diagnostic model to continuously learn historical exception patterns and optimize the correspondence between rules and nodes. By simulating exception scenarios to extract request response latency distribution and error code sequences, and combining the root cause location confidence to iteratively adjust the density clustering parameters, the accuracy of fault location is further improved. Finally, the overall embedding representation is updated according to the precise fault area and the latest service layout data, and real-time operation logs and resource monitoring indicators are integrated to construct the final diagnostic rule mapping framework. This enables the system to dynamically adapt to service topology changes during the operation of the AI ​​application platform, achieve rapid identification of exception propagation paths and accurate location of root cause nodes, thereby significantly improving the fault diagnosis efficiency and system stability in a distributed AI application environment. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments 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.

[0018] Figure 1 This is a flowchart of a rapid diagnostic method for AI application anomalies in an embodiment. Figure 2This is a flowchart of the method for triggering rule adaptation and updating the mapping vector set in the embodiment; Figure 3 This is a graph showing the change in location reliability of root cause classification labels during the iterative adjustment of clustering parameters in the example. Figure 4 This is a structural diagram of a rapid diagnostic system for AI application anomalies in an embodiment. Detailed Implementation

[0019] This invention provides a method, system, and storage medium for rapid diagnosis of AI application anomalies. The terms "first," "second," "third," "fourth," etc. (if present)," in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0020] For ease of understanding, the specific process of the embodiments of the present invention will be described below, such as... Figure 1 As shown in the figure, an embodiment of the present invention provides a rapid diagnostic method for AI application anomalies, comprising: Step S1: Obtain service layout data and diagnostic rule set in the distributed service system where the AI ​​application resides; extract the corresponding embedding representations of the rule condition expressions in the diagnostic rule set and the microservice dependency topology graph in the service layout data; and generate a mapping vector set based on the embedding representations; specifically including: By collecting the microservice dependency topology graph from the service layout data and combining it with the rule condition expressions in the diagnostic rule set, a graph neural network is used to extract features from the rule condition expressions and the microservice dependency topology graph to generate corresponding embedding representations. Based on the embedding representations, a mapping relationship is established between the rule condition expressions and service nodes in the microservice dependency topology graph. Through the mapping relationship, the mapping vector set is constructed.

[0021] Specifically, due to frequent changes in the microservice dependency topology in distributed AI application platforms, such as service splitting, traffic adjustment, and version upgrades, traditional fault diagnosis methods based on static rules or fixed dependency templates become ineffective. The rules are disconnected from the real-time running status, resulting in frequent false alarms or missed alarms. Furthermore, it is difficult to accurately trace the causal path when anomalies propagate along the changing links, which leads to excessively long root cause location time and compressed fault recovery window. To achieve rapid diagnosis of AI application anomalies, it is necessary to first construct a set of mapping vectors that can reflect the correspondence between diagnostic rules and distributed service topology.

[0022] During implementation, a graph neural network is used to extract features from the microservice dependency topology graph in the service layout data and combined with the rule condition expressions in the diagnostic rule set. This process generates corresponding embedded representations. Specifically, service layout data from the distributed service system is collected to obtain the call relationships and node deployment information between microservices, thereby constructing a microservice dependency topology graph. This topology graph uses nodes to represent microservice instances and edges to represent dependencies and communication paths between services. Next, the rule condition expressions in the diagnostic rule set are obtained. These rule condition expressions define the conditions for fault diagnosis, such as response latency exceeding a threshold or abnormal resource usage. These rule condition expressions are then converted into a processable sequence form. Specifically, a graph neural network processes the rule condition expressions and the microservice dependency topology graph. As a graph-based deep learning model, the graph neural network extracts the feature representations of nodes in the graph through multi-layer node aggregation and message passing mechanisms. In this process, the microservice dependency topology graph is first input into the input layer of the graph neural network. The initial features of each node include service type, latency data, and running status. Data, historical load data, and resource statistics are collected, and rule condition expressions are embedded into the network as additional features. The graph neural network iteratively updates the node embeddings through convolutional layers, enabling it to capture the correspondence between rules and topology nodes. Finally, the graph neural network outputs the embedding vector for each rule and node, that is, the corresponding rule is input into the feature space of the corresponding node to obtain the corresponding embedding vector, i.e., the above-mentioned embedding representation. The above-mentioned embedding vector includes at least rule conditions and node features. Based on the generated embedding representation, a mapping relationship between rule condition expressions and service nodes in the microservice dependency topology graph is further established. Specifically, using the generated embedding vector, the matching degree between the rule conditions in the embedding vector and the corresponding running data in the service node is calculated, i.e., the approximation degree between the abnormal conditions and the corresponding running data. When the matching degree is greater than the set matching degree, that is, when the node is very close to being abnormal, a mapping relationship between rule conditions and nodes can be established, thereby forming a list of correspondences from rules to nodes. Through the above mapping relationship, an initial set of mapping vectors is constructed for subsequent topology change monitoring and rule adaptation processes. The above-mentioned mapping vectors include at least node identifiers, rule identifiers, and matching degrees.

[0023] The aforementioned mapping vector set is used to monitor changes in the topology in real time. When a node adjustment event occurs, it can quickly update and adapt to the new topology, thereby ensuring that the correspondence between rules and topology is dynamically maintained. This maintains the stable diagnostic capabilities of the distributed service system. Finally, the mapping vector set serves as a data source, supporting real-time querying and rapid updates in fault diagnosis, effectively improving diagnostic efficiency and accuracy. For example, on an AI application platform, if a microservice depends on a topology graph containing 10 nodes, the training of the graph neural network uses historical diagnostic data as a supervision signal to ensure that the embedded representation can effectively distinguish between normal and abnormal dependency paths. This not only improves the accuracy of subsequent mappings but also reduces false positives and false negatives, further enhancing the system's diagnostic effect. In addition, under high load environments, adjusting the number of layers in the graph neural network and incorporating an attention mechanism can effectively improve diagnostic efficiency, shorten extraction time, and enhance the robustness of the algorithm. The above technical solution, through the application of the mapping vector set generated by the graph neural network in a microservice architecture, can efficiently and accurately achieve fault diagnosis, ensuring the synchronous update of rules and topology changes in the distributed service system, thereby achieving real-time and efficient anomaly diagnosis.

[0024] Step S2: Monitor the topology change signal of the topology graph. When the topology change signal causes the change in dependency relationship to exceed a preset threshold, trigger the rule adaptation process and update the mapping vector set. Based on the mapping vector set, obtain the request response latency distribution and resource monitoring indicators in the model call log, extract the latency propagation link and abnormal indicator sequence, and determine the set of potential fault areas. In step S2, the rule adaptation process is triggered and the mapping vector set is updated, such as... Figure 2 As shown, it includes: Real-time acquisition of topology change signals triggered by node adjustment events and expansion events; if the topology change signal causes the dependency relationship change to exceed a preset threshold, the rule adaptation process is triggered; through the rule adaptation process, the corresponding embedding representation of the rule condition expression and the microservice dependency topology graph is recalculated; based on the recalculated embedding representation, the correspondence in the initial mapping vector set is updated to form an updated mapping vector set.

[0025] Specifically, after completing the initial mapping vector set construction between the rule condition expression and the microservice dependency topology graph, in order to ensure that the AI ​​application anomaly rapid diagnosis system can adapt to the constantly changing service dependency structure in the distributed service system, it is necessary to continuously monitor the topology structure changes during system operation and trigger the rule adaptation process when a significant change in the dependency relationship is detected, thereby dynamically updating the above mapping vector set.

[0026] During implementation, node adjustment and expansion events in the distributed service system are collected in real time through a service registry, container orchestration system, or service governance components. Change signals characterizing topology changes are extracted from event logs. Node adjustment events include the addition, deletion, or migration of microservice instances. When such events are detected, the node identifier, adjustment time, and affected dependency paths are recorded in the event logs to obtain node-level topology change data. Simultaneously, expansion events include load changes caused by service instance scaling up or down. By collecting the connection relationships and call frequencies of service call chains before and after expansion, the differences in topology before and after expansion are obtained. Node adjustment information and service expansion information are then fused to form a topology change signal reflecting changes in service dependency structure. After obtaining the above topology... After detecting structural change signals, the degree of change is further quantified to determine whether the rule adaptation process needs to be triggered. Specifically, the microservice dependency topology before and after the change is represented as a weighted graph structure, where nodes represent microservice instances, edges represent call dependencies between services, and edge weights represent service call intensity or average response latency. Subsequently, the edge weight vectors of the topology before and after the change are dimensionally aligned and their differences are calculated. For non-existent edges, the corresponding edge weights are filled with 0. The change magnitude between the two sets of weight vectors is measured by Euclidean distance. When the calculated change magnitude of the dependency relationship exceeds a preset threshold, it is determined that the current topology has changed significantly, thereby triggering the rule adaptation process. By setting the above threshold judgment mechanism, frequent model updates can be avoided under small fluctuations, reducing system computational overhead.

[0027] Once the rule adaptation process is triggered, an updated microservice dependency topology graph is reconstructed based on the aforementioned topology change signals. The weights of changed dependency edges are then re-labeled in the updated topology graph to form topology data that reflects the latest service call relationships. Subsequently, the updated microservice dependency topology graph and the rule condition expressions from the original diagnostic rule set are simultaneously input into the graph neural network. The final output is the corresponding embedding representation between the rule condition expressions and microservice nodes. For larger microservice topologies, a graph attention mechanism is further introduced into the graph neural network. By learning the importance weights of different neighboring nodes, the network prioritizes high-dependency paths when nodes expand or dependencies increase, thereby improving the adaptability of the embedding representation to topology changes while ensuring computational efficiency.

[0028] After obtaining the recalculated embedding representation, the correspondence in the initial mapping vector set is further updated based on the above embedding representation. Specifically, the newly generated rule embedding vector and node embedding vector are aligned with the original mapping vector set. The matching relationship between rules and nodes is re-determined by calculating the matching degree between rule conditions and node features. Mapping relationships with similarity higher than a preset threshold are retained, while the changed parts are replaced, thereby generating a new mapping vector data structure. Subsequently, the updated rule identifiers, node identifiers, and corresponding similarity values ​​are reorganized into a vector set and stored in matrix form, thus forming an updated mapping vector set. This set can accurately reflect the latest correspondence between the current microservice dependency topology and diagnostic rules. Through the above update mechanism, the above mapping vector set can be continuously adjusted as the topology of the distributed service system changes, so that the new rule and node mapping relationship can reflect the current service call path, thereby improving the accuracy and response efficiency of AI application anomaly diagnosis in a dynamic distributed environment.

[0029] Further, in step S2, the set of potential fault regions is determined, including: Based on the updated mapping vector, request-response latency distribution data from the real-time collected model call logs is obtained; simultaneously, the memory usage peak sequence from the resource monitoring metrics is obtained; by analyzing the request-response latency distribution data, cross-service latency propagation links are extracted; by analyzing the memory usage peak sequence, abnormal indicator sequences are extracted; density clustering is used to group the latency propagation links and the abnormal indicator sequences to generate the potential fault region set.

[0030] Specifically, after updating the corresponding embedding representation and mapping vector between the rule condition expression and the microservice dependency topology graph, to achieve rapid diagnosis of AI application anomalies, it is necessary to further analyze the anomaly propagation characteristics based on real-time runtime data to determine the service areas where failures may occur. Specifically, key service nodes to be monitored are identified from the updated mapping vectors from rules to service nodes. These key service nodes are those with a matching degree greater than a set matching degree in the corresponding mapping vector. Real-time model call logs are obtained through a log collection module, and resource monitoring metrics for each service instance are obtained through a resource monitoring agent. The model call logs record the occurrence of each AI model inference or service call request. The system collects the service identifier, target service identifier, request timestamp, and response timestamp. The resource monitoring metrics include the GPU memory usage of the container where each service instance resides. Based on the log data, the system calculates the difference between the response timestamp and the request timestamp to obtain the request-response latency distribution data within the same statistical time window. Multiple request latencies under the same call path are aggregated to form a latency sequence. Simultaneously, the resource monitoring agent collects the GPU memory usage of each service instance at a preset sampling period and selects the maximum value within each sampling period to form a memory usage peak sequence arranged in chronological order. This yields latency data reflecting service performance status and resource metric data reflecting resource pressure status.

[0031] After obtaining the request-response latency distribution data, a structured analysis is performed on the call relationships between services to extract cross-service latency propagation paths. Specifically, a directed service call graph is constructed based on the initiating and target service information in the model call logs. In this graph, nodes represent microservice instances, edges represent service call relationships, and the weight of each edge is obtained by statistically analyzing the average request-response latency along that call path. By calculating the quantile distribution of each edge weight within the current time window in historical data, the current weight is compared with the historical 95th quantile. When the current latency is significantly higher than its historical statistical level, the edge is identified as an abnormal latency edge. After identifying abnormal latency edges, the process is reversed, starting from the target service node corresponding to the abnormal latency edge. A directed graph of service calls is used to find upstream service nodes that can reach a given node. During the traversal, only paths marked as abnormal delay edges are retained, thus forming a subgraph structure consisting of multiple nodes and their dependencies. This subgraph is a cross-service delay propagation link, used to represent the process by which delay anomalies may propagate step by step along the service call path. In another implementation, to improve the accuracy of propagation link identification, a time-series causal relationship analysis can be performed on the delay time series between adjacent services. For example, a Granger causality test can be used to determine whether the delay change of the upstream service statistically leads the delay change of the downstream service, thereby retaining only abnormal delay edges with significant causal relationships to further improve the reliability of delay propagation link identification.

[0032] Meanwhile, to identify service performance issues that may be caused by resource anomalies, the peak GPU memory usage sequence is further analyzed to extract anomaly indicator sequences. Specifically, the peak memory usage sequences of each service instance are standardized to eliminate resource scale differences between different service instances, allowing resource usage of different nodes to be compared on a uniform scale. Subsequently, the local outlier factor algorithm is used to detect anomalies in the standardized time series. By calculating the degree of local density deviation of each time point in its neighborhood, abnormal peak points are identified. When the density of a certain time point is significantly lower than that of its neighboring time points, it is determined to be an abnormal resource usage point, and the corresponding service instance identifier and time position are recorded. Finally, multiple abnormal points are connected in chronological order to form an anomaly indicator sequence, which can characterize which service nodes have abnormal resource usage within a specific time period.

[0033] After obtaining the cross-service delay propagation links and anomaly indicator sequences, a unified feature representation is applied to both types of data, and cluster analysis is performed. Specifically, the anomaly type, service node identifier, and corresponding time window involved in each delay propagation link are encoded to generate a link feature vector. Simultaneously, each anomaly point in the anomaly indicator sequence is encoded according to its corresponding anomaly type, service instance identifier, and corresponding time window information. Alternatively, the service instance identifier encoding can be replaced with the corresponding service node encoding to form an anomaly point feature vector. Subsequently, the link feature vector and the anomaly point feature vector are mapped to the same feature space for fusion representation, and a density-based clustering algorithm is used to perform this fusion on the feature space. The vectors in the interval are grouped and analyzed to aggregate observation points that are highly correlated in the topology or time dimension into the same cluster. Each cluster is defined as a potential fault region, which represents a group of service nodes that are significantly correlated in terms of delayed propagation behavior and resource anomaly indicators. Therefore, it can be inferred that these nodes may be jointly affected by the same underlying fault factor. Through the above technical solution, potential abnormal service regions can be automatically identified in complex distributed AI application environments, providing a clear analytical scope for subsequent anomaly correlation path construction and root cause localization, thereby improving the diagnostic efficiency and localization accuracy of AI application anomaly rapid diagnosis methods in large-scale microservice architectures.

[0034] Step S3: For the set of potential fault regions, construct anomaly association paths and confirm the location of the anomaly root cause; enhance the mapping vector set through the location of the anomaly root cause to form an adaptive embedding representation mechanism; In step S3, identifying the root cause of the anomaly includes: For each region in the potential fault region set, extract the business exception code from the real-time collected model call logs, and combine it with the corresponding embedded representation of the rule condition expression to the service node in the mapping vector set to construct a forward association path from the business exception code to the specific service node, and a reverse association path from the service node to the business exception code, forming a bidirectional association path; analyze the matching completeness of the rule trigger condition expression in the bidirectional association path; when the matching completeness is higher than a preset value, confirm that the exception root cause location belongs to one of the predefined exception types, and generate exception root cause classification data containing exception root cause location identifier and root cause classification label.

[0035] Specifically, after identifying the set of potential fault regions, to further determine the true starting point of AI application anomalies, it is necessary to trace the causal relationship between abnormal events and service topology nodes within the potential fault regions to confirm the root cause of the anomaly. Specifically, for each region in the set of potential fault regions, the correlation between abnormal events and service nodes is analyzed by combining real-time collected model call logs and the previously constructed mapping vector set. The model call logs record business exception codes, call path information, and request time information. These business exception codes include, but are not limited to, request timeout codes, resource overflow codes, or service unavailability codes. By analyzing the log records, the time window in which the exception code occurred and its corresponding service call chain can be determined. Simultaneously, the mapping vector set stores the corresponding embedded representations of rule condition expressions to service nodes in the microservice dependency topology graph. These embedded representations reflect the degree of correlation between each diagnostic rule and a specific service node. After identifying abnormal events within the potential fault regions, the frequency of occurrence within those regions is extracted. Business exception codes with high frequency or concentrated occurrences in time are identified, and these exception codes are associated with specific service nodes based on the call path information in the model call log. Then, by combining the embedding representation relationship between the rule condition expression and the service node in the mapping vector set, a forward association path from the business exception code to the specific service node is constructed. In this process, the target service node where the exception occurred is determined according to the call record corresponding to the exception code, and it is extended to downstream or upstream service nodes along the microservice dependency topology graph, thereby forming a path structure that can reflect the direction of exception propagation. Subsequently, according to the node embedding vector corresponding to the rule condition expression, the matching relationship between the rule and the node is calculated, and the node that meets the rule triggering condition is added to the path structure, thereby forming a forward association path from the business exception code to the potential fault node step by step.

[0036] To verify the causal consistency of the anomaly propagation relationship, a reverse association path from service nodes to business anomaly codes is constructed based on the same data structure. Specifically, a key service node within a potential fault area is used as the starting node. The upstream service nodes are traversed backwards according to the dependencies in the microservice dependency topology graph. Combined with anomaly event records in the model call logs, it is determined whether the resource state change or performance anomaly of the node precedes the occurrence of the corresponding anomaly code in time. Here, the key service node refers to the core microservice node associated with the anomaly propagation link, resource anomaly indicators, or cluster center location. If the node state change and the occurrence of the anomaly code satisfy a temporal sequence, a reverse association is established between the node and the anomaly code. Through the joint construction of the forward and reverse paths, a bidirectional association path connecting the business anomaly code and specific service nodes can be formed, thereby establishing an anomaly propagation link at the topology level. After completing the bidirectional association path... After construction, a matching integrity analysis is further performed on the rule triggering condition expressions corresponding to each node in the path to determine whether the current path can fully explain the cause of the anomaly. Specifically, each node in the bidirectional associated path is traversed, and the rule condition expressions corresponding to that node are extracted. Then, the condition variables in the rule expressions, such as response latency threshold conditions and resource usage anomaly conditions, are compared item by item with the actual indicators in the model call logs and resource monitoring data. By calculating the ratio between the number of variables that meet the conditions and the total number of variables in the rule expression, the matching integrity score of each node is obtained. Subsequently, the node matching results on the entire path are summarized to form a path-level matching integrity index to reflect the degree to which the path explains the current anomaly. For example, when the rule expression contains multiple condition items and most of the conditions are met by the actual data, it indicates that the anomaly propagation relationship described by the path has a high degree of credibility.

[0037] When the matching completeness is higher than a preset value, the service node corresponding to the path is determined to be the root cause of the anomaly. The anomaly is then classified according to the running status of the nodes in the path and the type of rule they trigger. For example, if a significant increase in service call latency is detected in the path, accompanied by network link fluctuations, the root cause type can be classified as network jitter anomaly. If a model service node is found to have resource overflow or operator execution failure, it can be classified as model service operator crash anomaly. The confirmed root cause location identifier and the corresponding root cause classification label are aggregated and encoded to generate anomaly root cause classification data. The classification data records the anomaly node identifier, anomaly type, and occurrence time information in the form of label vectors. This classification data is further input into the subsequent mapping vector set enhancement process and the adaptation embedding representation mechanism construction process, so as to continuously optimize the mapping relationship between rules and service nodes in the subsequent AI application anomaly rapid diagnosis process, thereby improving the accuracy of anomaly localization and the overall system diagnosis efficiency.

[0038] Further, in step S3, an adaptive embedding representation mechanism is formed, including: Obtain confirmed anomaly root cause location data and corresponding business anomaly code aggregation statistics; integrate the root cause classification labels of the anomaly root cause location data into the initial mapping vector set using a graph neural network; generate an enhanced rule adaptation embedding representation mechanism based on the integrated mapping vector set; optimize the correspondence between the rule condition expression and the microservice dependency topology graph using the enhanced rule adaptation embedding representation mechanism.

[0039] Specifically, after confirming the location of the anomaly root cause, to further improve the adaptability of the AI ​​application's rapid anomaly diagnosis method to complex distributed service environments, it is necessary to feed back the identified anomaly root cause information to the microservice dependency topology graph. This will form an adaptive embedding representation mechanism that can continuously learn anomaly patterns. Specifically, the confirmed anomaly root cause location data is extracted from the potential fault lock area set, and business anomaly code records corresponding to the anomaly root cause location are collected from model call logs and monitoring data. By statistically analyzing the frequency and peak distribution of the above anomaly codes over time, aggregated statistical data of business anomaly codes is generated. The statistical data includes anomaly code type, average occurrence frequency per unit time, and time distribution characteristics of anomaly code occurrence. This will establish a stable correlation between the anomaly root cause node and specific business anomaly performance, providing structured input data for subsequent embedding representation enhancement.

[0040] After obtaining the anomaly root cause location data and corresponding anomaly code statistical features, a graph neural network is used to integrate the aforementioned anomaly root cause information into the original mapping vector set. Specifically, the root cause classification labels corresponding to the anomaly root cause locations are fused into the node features. These root cause classification labels include anomaly types such as network jitter, model service operator collapse, or missing parameter configurations, and are represented as vector features using one-hot encoding. Subsequently, based on the graph structure composed of the original rule condition expression nodes and service nodes, the aforementioned root cause features are introduced into the graph neural network as additional node features. A graph convolution aggregation mechanism is used to propagate and compute the node's neighborhood information. In this process, the embedding representation of each node is updated by fusing the features of its neighboring nodes with its own features. For example, a graph convolution function is used to calculate the new embedding vector of the node, making the anomaly root cause... As tags gradually influence the representation of related nodes during network propagation, the original mapping vector set not only includes rule semantic information and service topology information, but also historical anomaly root cause pattern information. With the completion of multi-layer propagation computation of the graph neural network, a mapping vector set fused with anomaly root cause information is obtained. Based on this set, an enhanced rule adaptation embedding representation mechanism is generated. Specifically, by performing linear projection and normalization on the fused mapping vector set, each rule condition expression vector and service node vector are mapped to a unified embedding space, forming an embedding matrix that describes at least rule semantics, topology, and anomaly root causes. This embedding matrix can serve as a unified data representation for subsequent anomaly analysis and rule adaptation computation, thereby enabling rapid identification of potential related nodes when facing new anomaly scenarios.

[0041] Building upon this foundation, an enhanced rule-adaptive embedding representation mechanism is employed to optimize the correspondence between rule condition expressions and microservice dependency topology graphs. Specifically, the matching degree between rule conditions and node features is calculated to determine the degree of matching between the current rule and the service node, and the matching result is used as the rule matching weight. When the matching degree between certain rule condition expressions and target nodes is lower than or equal to the set matching degree, the embedding vector is updated through iterative optimization. This allows the new embedding representation to more accurately reflect the actual relationship between rule conditions and service nodes, thereby establishing a more precise mapping relationship between rule condition expressions and microservice topology. Furthermore, it maintains the effectiveness of diagnostic rules even when the distributed service system undergoes dynamic changes. Through this technical solution, the generated adaptive embedding representation mechanism not only continuously integrates historical anomaly root cause information into the rule mapping structure but also continuously optimizes the relationship between rules and service nodes during the operation of the AI ​​application platform. This enables more accurate identification of anomaly propagation paths, providing a reliable data foundation for subsequent simulation of anomaly scenario data extraction and precise fault area determination. This significantly improves the accuracy and efficiency of anomaly diagnosis and location in complex distributed service environments.

[0042] Step S4: Based on the adaptive embedding representation mechanism, extract the request response latency distribution and error code sequence under simulated abnormal scenarios to determine the precise fault area; update the overall corresponding embedding representation according to the precise fault area and the latest service layout data, integrate real-time monitoring data, and construct the final diagnostic rule mapping framework.

[0043] In step S4, determining the precise fault area includes: Based on the adaptive embedding representation mechanism, the request response latency distribution and error code sequence under simulated abnormal scenarios are extracted; the location reliability of the root cause classification labels under the simulated abnormal scenarios is analyzed; if the location reliability is lower than the preset reliability, the density clustering parameters are iteratively adjusted to tighten the grouping boundaries; and the set of potential fault regions is recalculated using the adjusted grouping boundaries to generate the precise fault regions.

[0044] Specifically, based on the root cause classification labels already integrated into the enhanced rule-adaptive embedding representation mechanism, corresponding simulated abnormal scenario data is selected. The request-response latency distribution is obtained by collecting latency value sequences from model call logs, while the error code sequence is obtained through statistical aggregation of business abnormal codes in the logs. Since the aforementioned adaptation embedding representation mechanism already includes the mapping relationship between rule condition expressions, node features, and root cause classification labels, the mapping vector set can be used to locate historical or simulated abnormal scenarios, thereby extracting data fragments corresponding to the abnormal propagation process. In another possible implementation, the mapping vector set in the aforementioned adaptation embedding representation mechanism is accessed, and the embedding representation segment corresponding to the simulated abnormal scenario is located based on the embedding association relationship between the root cause classification labels and service nodes. Subsequently, request-response latency distribution data is parsed from the log data corresponding to the embedded representation segment. This latency distribution consists of multiple latency statistics, including average request-response latency, peak latency, and latency distribution variance, which reflect the latency propagation characteristics in the cross-service call chain. At the same time, the corresponding error code sequence is extracted from the same embedded representation segment. This error code sequence is obtained by sorting the business exception codes recorded in the model call log by time and statistically analyzing the frequency of occurrence of exception codes and their repetition rate in the service chain, thereby characterizing the propagation of exceptions between different service nodes. This ensures that the extracted request-response latency distribution data and error code sequence have a consistent data correlation with the corresponding embedded representation, thus providing a basis for evaluating the effectiveness of root cause classification labels.

[0045] After obtaining the aforementioned request-response latency distribution data and error code sequences, the confidence analysis of the anomaly localization results is further performed by combining the root cause classification labels in the adaptation embedding representation mechanism. Specifically, the aforementioned root cause classification labels are applied to the extracted simulated anomaly scenario data. The degree of matching of the anomaly pattern is evaluated by comparing the difference between the latency distribution data in the simulated scenario and the latency statistics collected in the corresponding actual operation logs. Subsequently, the explanatory power of the current anomaly pattern is quantitatively evaluated by combining the rule condition expression matching completeness index obtained in the bidirectional correlation path analysis process, and the root cause localization confidence is calculated accordingly. When the simulated latency distribution characteristics, error code occurrence order, and rule matching path are statistically more consistent with the actual observation data, the current root cause label is considered to be able to explain the anomaly propagation process well, thus obtaining a high localization confidence. Conversely, the greater the deviation between the simulation results and the actual observation data, the lower the localization confidence.

[0046] When the above location reliability is higher than the above preset reliability, it indicates that the location of the above-mentioned root cause of the anomaly is accurate; conversely, when the above location reliability is lower than the preset reliability, such as 0.8, it indicates that the root cause of the anomaly is accurately located. Figure 3As shown, the potential fault region is further re-divided by iteratively adjusting the density clustering parameters to tighten the group boundaries and improve the accuracy of fault region division. Specifically, a density-based clustering algorithm is used to cluster the extracted cross-service delay propagation link features and anomaly indicator sequence features. The key parameters of the above clustering algorithm include the neighborhood radius and the minimum number of samples. When the root cause location confidence is insufficient, an iterative optimization process is initiated to tighten the cluster boundaries by gradually reducing the neighborhood radius or increasing the minimum number of samples, so that service nodes originally located on the edge of the cluster are excluded, thereby making the clustering results more concentrated on the real anomaly propagation path. After each parameter adjustment, the clustering calculation is re-executed, and the above steps are repeated to re-evaluate the root cause location confidence based on the new clustering results. When the confidence is significantly improved, the iteration process is terminated; otherwise, the clustering parameters are adjusted again, thereby gradually narrowing the range of potential fault regions and making the clustering results closer to the root cause location. The system employs a realistic anomaly propagation structure. After obtaining optimized clustering parameters, the original set of potential fault regions is recalculated based on new grouping boundaries. By re-clustering the feature vectors of cross-service delay propagation links and anomaly indicator sequences, highly correlated service nodes are reclassified into new anomaly clusters. The final high-confidence anomaly root source location is taken as the precise fault region. This precise fault region typically corresponds to one or a group of key service nodes in the microservice dependency topology graph. These key service nodes are interconnected in the topology and exhibit consistent anomaly characteristics in the time dimension. Through the above technical solution, after the precise fault region is generated, this region information is used as the basis for subsequent rule mapping updates and the generation of diagnostic rule mapping frameworks, thus forming a complete closed-loop process from simulated anomaly scenario analysis to precise fault region determination. This enables more accurate and efficient fault location in complex distributed service environments.

[0047] Further, in step S4, the final diagnostic rule mapping framework is generated, including: Based on the precise fault region and the microservice dependency topology graph in the latest collected service layout data, update the rule condition expression to the overall corresponding embedding representation of the service node; integrate the real-time collected model call logs and the resource monitoring indicators to optimize the overall corresponding embedding representation; and construct the final diagnostic rule mapping framework through the optimized overall corresponding embedding representation.

[0048] Specifically, after accurately identifying the fault area, in order to ensure that the rapid diagnosis process of AI application anomalies remains effective in the dynamically changing environment of the distributed service system, it is necessary to further construct a dynamically updated diagnostic rule mapping structure, thereby forming the final diagnostic rule mapping framework.

[0049] During implementation, based on the precise fault regions and the microservice dependency topology in the latest collected service layout data, the overall correspondence between rule condition expressions and service nodes is recalculated and updated. Specifically, service layout data and diagnostic rule sets in the distributed service system are collected through the service registry and container orchestration system. The service layout data includes the call relationships between microservice instances, node deployment information, and service dependency structures, and an updated rule condition expression and microservice dependency topology are constructed accordingly. Subsequently, the rule condition expression and microservice dependency topology are used as input to a graph neural network. The message passing mechanism of the graph neural network is used to aggregate and calculate the neighborhood features of the topology nodes, so that the embedding vector of each service node can simultaneously reflect its structural dependency relationship and the corresponding diagnostic rule features, thereby obtaining the overall correspondence embedding representation between the rule condition expression and the service node. In this process, the identified precise fault region information is input as an additional feature into the graph neural network, so that the embedding vector can reflect the structural features of the abnormal propagation region during the update process, thereby improving the ability of the rule mapping relationship to express real fault scenarios.

[0050] After obtaining the updated overall corresponding embedding representation, the model call logs and resource monitoring metrics collected in real time are further integrated to optimize the above embedding representation. Specifically, the request timestamps and response timestamps of call requests between services are obtained through the log collection module, and the request-response latency distribution is calculated. At the same time, the resource usage of the container where the service instance is located is collected through the monitoring agent, such as the peak sequence of GPU memory usage. Subsequently, the latency distribution features and resource metric features are introduced into the graph neural network as additional input features to update the original embedding vector with weights. By setting different weights for log latency features and resource metric features, the embedding representation can reflect both service call performance and resource usage status. During the embedding update process, the similarity between the rule condition expression vector and the node vector is calculated, and the vector weights are dynamically adjusted according to the degree of latency anomaly or resource anomaly, making the representation of abnormal nodes more prominent in the embedding space, thereby improving the sensitivity of the overall embedding representation to the real running status. After completing the embedding representation optimization, the final diagnostic rule mapping is constructed based on the optimized overall corresponding embedding representation. The framework specifically organizes the correspondence between rule condition expression vectors and service node vectors into a rule-node mapping structure. Each mapping relationship describes the degree of association between a diagnostic rule and a specific service node. When a new abnormal event is detected during operation, the service node most likely to trigger the abnormality can be quickly located by calculating the matching degree between real-time monitoring data and embedded vectors. Since the above mapping framework has integrated service topology, operation log data, resource monitoring indicators, and precise fault area information during the generation process, this mapping structure can be dynamically updated with changes in microservice dependencies, ensuring that the diagnostic rules always remain consistent with the current operating state of the distributed service system. Through the above technical solution, the constructed final diagnostic rule mapping framework can continuously and quickly locate abnormal events during the operation of the AI ​​application platform. When abnormal situations such as network jitter, missing parameter configurations, or model service operator crashes occur, the corresponding service node can be quickly located by matching request response latency distribution and resource anomaly characteristics, thereby significantly improving the efficiency and accuracy of fault diagnosis in a distributed AI application environment.

[0051] This invention also provides a rapid diagnostic system for AI application anomalies, used to implement the above-described method, such as... Figure 4 As shown, the system includes: The mapping generation unit is used to obtain service layout data and diagnostic rule set in the distributed service system where the AI ​​application is located, extract the corresponding embedding representation of the rule condition expression in the diagnostic rule set and the microservice dependency topology graph in the service layout data, and generate a mapping vector set based on the embedding representation; The adaptation analysis unit is used to monitor the topological structure change signal of the topology graph. When the topological structure change signal causes the change in dependency to exceed a preset threshold, the rule adaptation process is triggered and the mapping vector set is updated. The fault confirmation unit is used to obtain the request response latency distribution and resource monitoring indicators in the model call log based on the mapping vector set, and extract the latency propagation link and abnormal indicator sequence to determine the set of potential fault areas. Root cause identification unit: For the set of potential fault areas, construct anomaly association paths to identify the location of the anomaly root cause; and enhance the mapping vector set through the location of the anomaly root cause to form an adaptive embedding representation mechanism. The diagnostic mapping unit is used to extract the request response latency distribution and error code sequence under simulated abnormal scenarios based on the adaptive embedding representation mechanism, and determine the precise fault area; update the overall corresponding embedding representation according to the precise fault area and the latest service layout data, integrate real-time monitoring data, and construct the final diagnostic rule mapping framework.

[0052] The present invention also provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the above-described method.

[0053] In summary, this invention collects service layout data and diagnostic rule sets from a distributed service system, combines them with a microservice dependency topology graph, and uses graph neural networks to extract the embedding representations between rule condition expressions and service nodes. This constructs a set of mapping vectors from rules to service nodes, enabling diagnostic rules to establish semantic associations with actual microservice dependencies. By continuously monitoring topology change signals triggered by node adjustment events and service expansion events, when a dependency change exceeds a preset range, a rule adaptation process is triggered and the embedding representation is updated, ensuring the diagnostic rules remain effective under topology changes. By extracting request-response latency distribution from model call logs and combining it with peak GPU memory usage sequences from resource monitoring metrics, a structured analysis of service call relationships is performed. Abnormal latency edges are identified, and cross-service latency propagation links are constructed. Simultaneously, abnormal resource sequences are extracted through abnormal indicator detection, and density clustering is used to jointly group latency propagation links and abnormal indicators, thereby generating a set of potential fault regions. This allows the system to quickly narrow down the gaps in a large-scale microservice environment. The system can accurately pinpoint the root cause of anomalies by constructing a bidirectional association path from business exception codes to specific service nodes within potential fault areas and analyzing the matching completeness of rule triggering condition expressions in the path. This generates corresponding root cause classification data. Root cause classification labels are integrated into the original mapping vector set, and an enhanced rule-adaptive embedding representation mechanism is formed through a graph neural network. This allows the diagnostic model to continuously learn historical anomaly patterns and optimize the correspondence between rules and nodes. By simulating anomaly scenarios to extract request response latency distribution and error code sequences, and combining root cause location confidence with iterative adjustments to density clustering parameters, the accuracy of fault location is further improved. Finally, the overall embedding representation is updated based on the precise fault area and the latest service layout data. Real-time operation logs and resource monitoring indicators are integrated to construct the final diagnostic rule mapping framework. This enables the system to dynamically adapt to service topology changes during the operation of the AI ​​application platform, achieving rapid identification of anomaly propagation paths and accurate location of root cause nodes, thereby significantly improving fault diagnosis efficiency and system stability in distributed AI application environments.

[0054] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

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

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

Claims

1. A rapid diagnostic method for AI application anomalies, characterized in that, The method includes: Step S1: Obtain service layout data and diagnostic rule set in the distributed service system where the AI ​​application is located, extract the corresponding embedded representation of the rule condition expression in the diagnostic rule set and the microservice dependency topology graph in the service layout data, and generate a mapping vector set based on the embedded representation; Step S2: Monitor the topology change signal of the topology graph. When the topology change signal causes the change in dependency to exceed a preset threshold, trigger the rule adaptation process and update the mapping vector set. Based on the updated mapping vector set, obtain the request response latency distribution and resource monitoring indicators in the model call log, extract the latency propagation link and abnormal indicator sequence, and determine the set of potential fault areas. Step S3: For the set of potential fault regions, construct anomaly association paths and confirm the location of the anomaly root cause; enhance the mapping vector set through the location of the anomaly root cause to form an adaptive embedding representation mechanism; Step S4: Based on the adaptive embedding representation mechanism, extract the request response latency distribution and error code sequence under simulated abnormal scenarios to determine the precise fault area; update the overall corresponding embedding representation according to the precise fault area and the latest service layout data, integrate real-time monitoring data, and construct the final diagnostic rule mapping framework.

2. The rapid diagnostic method for AI application anomalies according to claim 1, characterized in that, In step S1, a set of mapping vectors is generated, including: By collecting the microservice dependency topology graph from the service layout data and combining it with the rule condition expressions in the diagnostic rule set, a graph neural network is used to extract features from the rule condition expressions and the microservice dependency topology graph to generate corresponding embedding representations. Based on the embedding representations, a mapping relationship is established between the rule condition expressions and service nodes in the microservice dependency topology graph. Through the mapping relationship, the mapping vector set is constructed.

3. The rapid diagnostic method for AI application anomalies according to claim 1, characterized in that, In step S2, triggering the rule adaptation process and updating the mapping vector set includes: Real-time acquisition of topology change signals triggered by node adjustment events and expansion events; if the topology change signal causes the dependency relationship change to exceed a preset threshold, the rule adaptation process is triggered; through the rule adaptation process, the corresponding embedding representation of the rule condition expression and the microservice dependency topology graph is recalculated; based on the recalculated embedding representation, the correspondence in the initial mapping vector set is updated to form an updated mapping vector set.

4. The rapid diagnostic method for AI application anomalies according to claim 3, characterized in that, In step S2, the set of potential fault areas is determined, including: Based on the updated mapping vector, request-response latency distribution data from the real-time collected model call logs is obtained; simultaneously, the memory usage peak sequence from the resource monitoring metrics is obtained; by analyzing the request-response latency distribution data, cross-service latency propagation links are extracted; by analyzing the memory usage peak sequence, abnormal indicator sequences are extracted; density clustering is used to group the latency propagation links and the abnormal indicator sequences to generate the potential fault region set.

5. The rapid diagnostic method for AI application anomalies according to claim 1, characterized in that, In step S3, the location of the root cause of the anomaly is identified, including: For each region in the potential fault region set, extract the business exception code from the real-time collected model call logs, and combine it with the corresponding embedded representation of the rule condition expression to the service node in the mapping vector set to construct a forward association path from the business exception code to the specific service node, and a reverse association path from the service node to the business exception code, forming a bidirectional association path; analyze the matching completeness of the rule trigger condition expression in the bidirectional association path; when the matching completeness is higher than a preset value, confirm that the exception root cause location belongs to one of the predefined exception types, and generate exception root cause classification data containing exception root cause location identifier and root cause classification label.

6. The rapid diagnostic method for AI application anomalies according to claim 1, characterized in that, In step S3, an adaptive embedding representation mechanism is formed, including: Obtain confirmed anomaly root cause location data and corresponding business anomaly code aggregation statistics; integrate the root cause classification labels of the anomaly root cause location data into an initial mapping vector set using a graph neural network; generate an enhanced rule adaptation embedding representation mechanism based on the integrated mapping vector set; optimize the correspondence between the rule condition expression and the microservice dependency topology graph using the enhanced rule adaptation embedding representation mechanism.

7. The rapid diagnostic method for AI application anomalies according to claim 1, characterized in that, In step S4, the precise fault area is determined, including: Based on the adaptive embedding representation mechanism, the request response latency distribution and error code sequence under simulated abnormal scenarios are extracted; the location reliability of the root cause classification labels under the simulated abnormal scenarios is analyzed; if the location reliability is lower than the preset reliability, the density clustering parameters are iteratively adjusted to tighten the grouping boundaries; and the set of potential fault regions is recalculated using the adjusted grouping boundaries to generate the precise fault regions.

8. The rapid diagnostic method for AI application anomalies according to claim 1, characterized in that, In step S4, the final diagnostic rule mapping framework is generated, including: Based on the precise fault region and the microservice dependency topology graph in the latest collected service layout data, update the rule condition expression to the overall corresponding embedding representation of the service node; integrate the real-time collected model call logs and the resource monitoring indicators to optimize the overall corresponding embedding representation; and construct the final diagnostic rule mapping framework through the optimized overall corresponding embedding representation.

9. A rapid diagnostic system for AI application anomalies, used to implement the rapid diagnostic method for AI application anomalies as described in any one of claims 1-8, characterized in that, The system includes: The mapping generation unit is used to obtain service layout data and diagnostic rule set in the distributed service system where the AI ​​application is located, extract the corresponding embedding representation of the rule condition expression in the diagnostic rule set and the microservice dependency topology graph in the service layout data, and generate a mapping vector set based on the embedding representation; The adaptation analysis unit is used to monitor the topological structure change signal of the topology graph. When the topological structure change signal causes the change in dependency to exceed a preset threshold, the rule adaptation process is triggered and the mapping vector set is updated. The fault confirmation unit is used to obtain the request response latency distribution and resource monitoring indicators in the model call log based on the mapping vector set, and extract the latency propagation link and abnormal indicator sequence to determine the set of potential fault areas. Root cause identification unit: For the set of potential fault areas, construct anomaly association paths to identify the location of the anomaly root cause; and enhance the mapping vector set through the location of the anomaly root cause to form an adaptive embedding representation mechanism. The diagnostic mapping unit is used to extract the request response latency distribution and error code sequence under simulated abnormal scenarios based on the adaptive embedding representation mechanism, and determine the precise fault area; update the overall corresponding embedding representation according to the precise fault area and the latest service layout data, integrate real-time monitoring data, and construct the final diagnostic rule mapping framework.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the method as described in any one of claims 1-8.