Methods, apparatus, equipment, and media for generating abnormal root cause topology maps
Patent Information
- Application Number
- CN202310810151.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-07-03
AI Technical Summary
[0002]随着互联网的发展,各互联网平台会推出各类型在线服务供平台用户使用,例如,提供网络电商平台为买家用户提供的电商购物在线服务,或为卖家用户提供用于管理电商订单的订单管理在线服务等,互联网平台中提供不同类型的在线服务一般由基于微服务架构所构建微服务系统所提供,通过调用微服务系统中微服务所具有的组件形成各类型的在线服务,为了维护各类型平台所构建的在线服务,可通过链路追踪技术(Trace)绘制表征微服务系统下不同在线服务所调用组件之间的调用关系的全局拓扑图以进行异常排查,但当某一组件出现异常时,开发人员需通过全局拓扑图中大量的调度链路确定出与出现异常的组件之间存在调用关系的其他组件,以针对出现异常的组件进行异常根因检测,这将消耗开发人员大量的时间,异常排查效率较低,导致异常无法被快速修复,影响平台中用户使用在线服务的使用体验
[0056]本申请为开发人员提供针对指标数据发生异常的组件的根因拓扑图,根因拓扑图为从全局拓扑图中搜索以指标异常组件为目标组件节点的上一组件节点与下一组件节点,且将搜索出所有的上一组件节点或下一组件节点分别作为前向组件节点与后向组件节点绘制至以指标异常组件的组件节点为中心组件节点的根因拓扑图中,使平台中负责维护微服务系统的开发人员可借助根因拓扑图中前向组件节点路径或后向组件节点路径中存在的组件确认导致组件发生指标异常问题的根因,进而进行针对性修复,解决发生指标异常组件的异常问题,保证微服务系统的稳定性与鲁棒性,相比较传统的存在大量组件之间的调用关系的全局拓扑图,局部突出发生指标异常的组件与部分组件之间的调用关系的根因拓扑图,使得开发人员可快速地确定出发生指标异常的原因,提升异常问题的修复速度,以让使用微服务系统所构建的各类型在线服务的用户拥有更好的使用体验。
Smart Images

Figure CN116760715B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of abnormal root cause detection, and more particularly to a method for generating an abnormal root cause topology map. It also relates to the corresponding apparatus, equipment, and non-volatile storage medium for this method. Background Technology
[0002] With the development of the internet, various internet platforms offer a variety of online services for their users. For example, e-commerce platforms provide online shopping services for buyers, or order management services for sellers. These different types of online services are generally provided by microservice systems built on a microservice architecture. These services are formed by calling the components of the microservices within the microservice system. To maintain these online services, a global topology diagram representing the call relationships between the components called by different online services under the microservice system can be drawn using tracing technology for anomaly detection. However, when a component malfunctions, developers need to identify other components with call relationships to the malfunctioning component through numerous scheduling links in the global topology diagram to perform root cause detection on the malfunctioning component. This consumes a significant amount of developer time, resulting in low anomaly detection efficiency and hindering the rapid repair of anomalies, thus impacting the user experience of online services on the platform.
[0003] In view of the existing problems in troubleshooting component anomalies in microservice systems, the applicant has made corresponding explorations in order to solve these problems. Summary of the Invention
[0004] The purpose of this application is to provide a method for generating anomaly root cause topology maps to meet user needs, and also relates to the corresponding apparatus, devices, and non-volatile storage media.
[0005] To achieve the objectives of this application, the following technical solution is adopted:
[0006] In response to abnormal component metrics events, the target component node corresponding to the abnormal metric component in the global topology graph of the microservice system is identified, and the target component node is used as the central component node of the root cause topology graph.
[0007] Traverse each component node in the global topology graph, determine the previous component node of the target component node, and store the previous component node as the preceding component node of the central component node in the root cause topology graph into the determined node set.
[0008] Using the target component node as the initial search starting point, the next component node of the search starting point is determined from the global topology graph. The next component node is stored as the backward component node of the central component node in the root cause topology graph and stored in the determined node set. The next component node is used as a new search starting point to search for its next component node and determine the corresponding backward component node for storage.
[0009] Based on the forward component nodes and backward component nodes in the determined node set, draw the forward component node path and backward component node path of the central component node in the root cause topology graph.
[0010] In a further embodiment, before the step of responding to a component metric anomaly event, determining the target component node corresponding to the component with the anomaly metric in the global topology graph of the microservice system, and using the target component node as the central component node of the root cause topology graph, the following steps are included:
[0011] Obtain a target call tracing request that acts on a microservice system, and push the target call tracing request to multiple microservices in the microservice system. The target call tracing request contains a target tracing identifier.
[0012] Obtain the target tracing component information pushed by each of the microservices in response to the target call chain tracing request, wherein the target tracing component information includes component information with the target tracing identifier;
[0013] Based on the target tracking component information, a global topology graph is generated that represents the calling relationships between the components corresponding to the target tracking component information.
[0014] In a further embodiment, the step of responding to a component metric anomaly event, determining the target component node corresponding to the component with the anomaly metric in the global topology graph of the microservice system, and using the target component node as the central component node in the root cause topology graph includes:
[0015] In response to abnormal component metrics events, identify the abnormal component corresponding to the abnormal component metrics event.
[0016] Obtain the tracking identifier of the abnormal indicator component, and obtain the global topology map corresponding to the tracking identifier;
[0017] The target component node corresponding to the abnormal indicator component is queried from the global topology graph, and a root cause topology graph is generated that acts on the abnormal indicator event of the component. The target component node is used as the central component node of the root cause topology graph.
[0018] In a further embodiment, the step of traversing each component node in the global topology graph, determining the previous component node of the target component node, and storing the previous component node as the preceding component node of the central component node in the root cause topology graph into the determined node set includes:
[0019] Traverse each component node in the global topology graph, determine the component nodes in the global topology graph that are one level ahead of the target component node, and take these component nodes as the previous component nodes of the target component node;
[0020] Store the corresponding identifiers of each previous component node and the preceding component node in the determined node set.
[0021] In a further embodiment, the steps of using the target component node as the initial search starting point, determining the next component node of the search starting point from the global topology graph, storing the next component node as a downstream component node of the central component node in the root cause topology graph to the determined node set, and using the next component node as a new search starting point to search for its next component node and determine and store the corresponding downstream component node include:
[0022] Store the target component node into the node set to be processed;
[0023] Store the component nodes in the set of nodes to be processed to the starting node set and the determined node set, and clear all component nodes in the set of nodes to be processed.
[0024] Starting from the component nodes in the starting node set, the search begins by traversing each component node in the global topology graph. The search continues to determine if there is a next component node in each component node that is one level behind the starting point. If such a node exists, it is stored in the node set to be processed.
[0025] If a component node exists in the set of nodes to be processed, the starting node set is cleared. The component nodes in the set of nodes to be processed are stored in the starting node set and the set of determined nodes. The set of nodes to be processed is also cleared. The search continues, using the component nodes in the starting node set as the starting point, and the global topology graph is traversed to search for the next component node of the starting point.
[0026] In a further embodiment, the step of drawing the forward component node path and the backward component node path of the central component node in the root cause topology graph based on each of the forward component nodes and backward component nodes in the determined node set includes:
[0027] Obtain the component nodes with forward identifiers from the determined node set, draw these component nodes as the forward component nodes of the central component node in the root cause topology graph, and each of the forward component nodes forms the forward component node path of the central component node.
[0028] Obtain the component nodes with backward identifiers and backward levels in the determined node set. Based on the backward levels of these component nodes, draw these component nodes as backward component nodes of the corresponding backward levels of the central component node in the root cause topology graph. Each of the backward component nodes forms the backward component node path of the central component node.
[0029] In a further embodiment, after drawing the forward component node path and backward component node path of the central component node in the root cause topology graph based on each of the forward component nodes and backward component nodes in the determined node set, the process includes:
[0030] Based on the sequential relationship between component nodes in each node path of the root cause topology graph, an abnormal root cause component list is generated, which represents the call hierarchy relationship between component nodes. The abnormal root cause component list stores the component identifier of each component.
[0031] Based on the abnormal indicators of the abnormal component corresponding to the central component node of the root cause topology graph, obtain the indicator data corresponding to each component node and the abnormal indicator in the root cause topology graph, and store these indicator data in the corresponding component identifier in the abnormal root cause component list.
[0032] Obtain the log data of each component node in the root cause topology graph, and store the log data in the corresponding component identifier in the abnormal root cause component list.
[0033] An anomalous root cause topology map generation apparatus, proposed for the purposes of this application, comprises:
[0034] The component exception response module is used to respond to component metric exception events, determine the target component node corresponding to the metric exception component in the global topology graph of the microservice system, and use the target component node as the central component node of the root cause topology graph.
[0035] The forward node determination module is used to traverse each component node in the global topology graph, determine the previous component node of the target component node, and store the previous component node as the forward component node of the central component node in the root cause topology graph into the determined node set.
[0036] The backward node determination module is used to take the target component node as the initial search starting point, determine the next component node of the search starting point from the global topology graph, store the next component node as the backward component node of the central component node in the root cause topology graph to the determined node set, and use the next component node as a new search starting point to search for its next component node and determine and store the corresponding backward component node.
[0037] The node path drawing module is used to draw the forward component node path and the backward component node path of the central component node in the root cause topology graph based on the forward component nodes and backward component nodes in the determined node set.
[0038] In a further embodiment, the component exception response module includes:
[0039] The indicator anomaly component determination submodule is used to respond to component indicator anomaly events and determine the indicator anomaly component corresponding to the component indicator anomaly event.
[0040] The global topology map acquisition submodule is used to acquire the tracking identifier of the abnormal indicator component and acquire the global topology map corresponding to the tracking identifier;
[0041] The central component node determination submodule is used to query the target component node corresponding to the abnormal indicator component from the global topology graph, generate a root cause topology graph that acts on the abnormal indicator event of the component, and use the target component node as the central component node of the root cause topology graph.
[0042] In a further embodiment, the forward node determination module includes:
[0043] The previous component node determination submodule is used to traverse each component node in the global topology graph, determine the component nodes in the global topology graph that are one layer away from the target component node, and take these component nodes as the previous component nodes of the target component node.
[0044] The forward component node storage submodule is used to store the corresponding previous component node and forward component node identifier in the determined node set.
[0045] In a further embodiment, the backward node determination module includes:
[0046] The target component node to be processed submodule is used to store the target component node into the node to be processed set;
[0047] The search starting point initialization submodule is used to store the component nodes in the node set to be processed to the starting point node set and the determined node set, and clear each component node in the node set to be processed.
[0048] The next component node search submodule is used to traverse each component node in the global topology graph, starting from the component nodes in the starting node set, and search for whether there is a next component node in each component node that is separated from the starting point by one layer of backward relationship. If there is, these next component nodes are stored in the node set to be processed.
[0049] The node search loop submodule checks whether there is a component node in the set of nodes to be processed. If there is, it clears the starting node set, stores the component nodes in the set of nodes to be processed into the starting node set and the set of determined nodes, and clears the set of nodes to be processed. It then continues to use the component nodes in the starting node set as the search starting point and traverses the global topology graph to search for the next component node of the search starting point.
[0050] In a further embodiment, the node path drawing module includes:
[0051] The forward component node path drawing submodule is used to obtain the component nodes with forward identifiers in the determined node set, draw these component nodes as the forward component nodes of the central component node in the root cause topology graph, and each of the forward component nodes forms the forward component node path of the central component node.
[0052] The backward component node path drawing submodule is used to obtain the component nodes with backward identifiers and backward levels in the determined node set, and draw these component nodes as backward component nodes of the corresponding backward level of the central component node in the root cause topology graph according to their respective backward levels. Each of the backward component nodes forms the backward component node path of the central component node.
[0053] To address the aforementioned technical problems, this application also provides a computer device, including a memory and a processor. The memory stores computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of the above-described abnormal root cause topology graph generation method.
[0054] To address the aforementioned technical problems, this application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the above-described abnormal root cause topology graph generation method.
[0055] Compared with existing technologies, the advantages of this application are as follows:
[0056] This application provides developers with a root cause topology graph for components experiencing abnormal metric data. The root cause topology graph searches the global topology graph for the preceding and following component nodes of the component with the abnormal metric as the target node. All the found preceding and following component nodes are then plotted as forward and backward component nodes, respectively, onto the root cause topology graph centered on the component node of the component with the abnormal metric. This allows developers responsible for maintaining the microservice system to identify the root cause of the metric anomaly by referring to the components present in the forward or backward component path of the root cause topology graph. This enables targeted repairs, resolving the anomaly of the affected component and ensuring the stability and robustness of the microservice system. Compared to traditional global topology graphs with numerous inter-component call relationships, this root cause topology graph, which highlights the component with the abnormal metric and its call relationships with a subset of components, allows developers to quickly identify the cause of the metric anomaly, improving the speed of problem-solving and providing a better user experience for users of various types of online services built using the microservice system. Attached Figure Description
[0057] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0058] Figure 1 A typical network deployment architecture diagram related to the implementation of the technical solution of this application;
[0059] Figure 2 This is a flowchart illustrating a typical embodiment of the abnormal root cause topology graph generation method of this application;
[0060] Figure 3 This is a schematic diagram of a global topology graph as described in this application;
[0061] Figure 4 For the purpose of this application regarding a kind of Figure 3 The diagram shown is a schematic of the root cause topology diagram A drawn from the global topology diagram, with the component node "G" as the central component node.
[0062] Figure 5 This is a schematic diagram of a root cause topology graph that plots the paths of forward component nodes, as described in this application.
[0063] Figure 6 This is a schematic diagram of a root cause topology graph in this application that shows the path of backward component nodes;
[0064] Figure 7 This is a flowchart illustrating a specific implementation method for generating a global topology graph by calling link tracing in this application;
[0065] Figure 8 This is a flowchart illustrating a specific implementation method in this application for identifying component nodes of abnormal components from a global topology graph and using these component nodes as the central component nodes of a root cause topology graph.
[0066] Figure 9 This is a flowchart illustrating a specific implementation method for searching forward component nodes that act on the root cause topology graph from the global topology graph in this application.
[0067] Figure 10 This is a flowchart illustrating a specific implementation method in this application for searching backward component nodes that act on the root cause topology graph from the global topology graph.
[0068] Figure 11 This is a flowchart illustrating a specific implementation method for drawing forward component node paths and backward component node paths in a root cause topology graph based on component nodes identified as forward component nodes or backward component nodes in a determined node set.
[0069] Figure 12 This is a flowchart illustrating the specific implementation method of generating a list of abnormal root cause components corresponding to a root cause topology map in this application;
[0070] Figure 13 This is a schematic block diagram of a typical embodiment of the abnormal root cause topology graph generation device of this application;
[0071] Figure 14 This is a basic structural block diagram of a computer device according to an embodiment of this application. Detailed Implementation
[0072] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0073] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0074] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0075] Those skilled in the art will understand that the terms "client," "terminal," and "terminal device" as used herein include both devices that receive wireless signals, devices that only possess wireless signal receiver capabilities without transmission capabilities, and devices with receiving and transmitting hardware, devices that have receiving and transmitting hardware capable of bidirectional communication over a bidirectional communication link. Such devices may include: cellular or other communication devices such as personal computers or tablets, having single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service) that can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant) that may include a radio frequency receiver, pager, internet / intranet access, web browser, notepad, calendar, and / or GPS (Global Positioning System) receiver; and traditional laptops and / or handheld computers or other devices that have and / or include radio frequency receivers. As used herein, "client," "terminal," and "terminal device" can be portable, transportable, installed in a means of transportation (air, sea, and / or land), or suitable and / or configured to operate locally and / or in a distributed manner, operating in any other location on Earth and / or in space. "Client," "terminal," and "terminal device" as used herein can also be a communication terminal, an internet access terminal, or a music / video playback terminal, such as a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a smart TV, set-top box, etc.
[0076] The hardware referred to by the names "server," "client," and "work node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann architecture, such as a central processing unit (including an arithmetic logic unit and a control unit), memory, input devices, and output devices. The computer program is stored in its memory, and the central processing unit loads the program stored in the secondary storage into the main memory to run it, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0077] It should be noted that the concept of "server" used in this application can also be extended to the case of server clusters. Based on the network deployment principles understood by those skilled in the art, the servers should be logically divided. Physically, these servers can be independent of each other but accessible through interfaces, or they can be integrated into a single physical computer or a cluster of computers. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method in this application.
[0078] Please see Figure 1 The hardware infrastructure required for implementing the technical solutions of this application can be deployed according to the architecture shown in the figure. The server 80 mentioned in this application is deployed in the cloud and acts as an online server. It can further connect to relevant data servers and other servers providing related support, thereby forming a logically related service cluster to provide services to relevant terminal devices such as the smartphone 81 and personal computer 82 shown in the figure, or third-party servers (not shown). Both the smartphone and personal computer can access the Internet through known network access methods and establish a data communication link with the cloud server 80 to run terminal applications related to the services provided by the server.
[0079] For servers, the application is usually built as a service process, with corresponding program interfaces exposed for remote calls by applications running on various terminal devices. The relevant technical solutions in this application that are suitable for running on servers can be implemented in servers in this way.
[0080] The application mentioned refers to an application running on a server or terminal device. This application implements the relevant technical solutions of this application in a programmed manner. Its program code can be stored in a non-volatile storage medium that can be recognized by a computer in the form of computer-executable instructions, and is loaded into memory by the central processing unit for execution. The relevant device of this application is constructed by the operation of the application on the computer.
[0081] For servers, the application is usually built as a service process, with corresponding program interfaces exposed for remote calls by applications running on various terminal devices. The relevant technical solutions in this application that are suitable for running on servers can be implemented in servers in this way.
[0082] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.
[0083] Please see Figure 2 The present application discloses a method for generating anomaly root cause topology maps. In a typical embodiment, the method includes the following steps:
[0084] Step S11: Respond to component metric anomaly events, determine the target component node corresponding to the component with the anomaly in the global topology graph of the microservice system, and use the target component node as the central component node of the root cause topology graph:
[0085] The aforementioned component metric anomaly event refers to an event triggered when a component within a microservice in a microservice system is found to have abnormal metric data. For example, if a component is responsible for generating e-commerce orders, and the success rate of e-commerce order generation is a metric, then when the success rate falls below a preset minimum success rate threshold, a component metric anomaly event will be triggered to respond to this event and perform root cause detection for the component's abnormal metric data. Of course, the description of the component responsible for generating e-commerce orders and its metric anomaly is for illustrative purposes only. Those skilled in the art should understand that events triggered by other components in a microservice system exhibiting abnormal metric data are also considered component metric anomaly events. Metric data generally refers to data expressions such as KPIs set by the platform for each component, pointing to a specific indicator; these will not be elaborated upon here.
[0086] Upon responding to the component metric anomaly event in the microservice system, the abnormal component whose metric data is abnormal will be identified from the microservice system, and a global topology map of the component nodes containing the abnormal component will be determined. The target component node corresponding to the abnormal component will then be identified from the global topology map. The server or terminal generally has multiple global topology maps with different tracing identifiers. Different tracing identifiers represent different component scheduling paths in different microservice systems. The component call path generally refers to the path in the microservice system that calls components of various types of microservices for a certain online service or online function.
[0087] Regarding the construction of a global topology map for corresponding component call chains, the server or terminal obtains the target call chain request set by developers based on scenarios such as online services or online functions, and pushes the target call chain request to each microservice under the server system. Each component in the microservice responds to the target call chain request, checks whether its own tracing identifier (such as a trace identifier) matches the tracing identifier of the target call chain request. If so, it returns its own component information as target tracing component information. Based on the component characteristic data and the called level represented by the returned target tracing component information, the server or terminal generates a global topology map representing the call relationships between the components corresponding to these target tracing component information. The tracing identifier is mapped and stored with the global topology map to facilitate the generation of root cause topology maps for querying the global topology map corresponding to the abnormal component whose indicator data is abnormal.
[0088] Please refer to Figure 3 and Figure 4 For example, when such Figure 3 When component node "G" in the global topology diagram is the component node for which a root cause topology diagram needs to be generated, then the root cause topology diagram to be generated for component node "G" is as follows: Figure 4 As shown in the root cause topology diagram A, it can be found that... Figure 4 The root cause topology diagram A shown is Figure 3 The global topology diagram shown consists of component nodes that have a scheduling relationship with node "G". This can also be understood as representing the action of component node "G" on... Figure 3 The local topology diagram of the global topology diagram shown is the root cause topology diagram of the component that has an abnormal metric in the global topology diagram. This is to narrow down the location of the component with the abnormal metric in the microservice system that has a calling relationship with it, so that developers can find the root cause of the abnormal metric more quickly, thereby improving the efficiency of developers in fixing the abnormal problems corresponding to the abnormal metric.
[0089] Once the abnormal metric component is identified, the target component node corresponding to that abnormal metric component is queried from the global topology graph. A root cause topology graph is then generated that acts on the abnormal metric event of that component. That is, the root cause topology graph corresponding to the component where the metric abnormality occurred is generated, and the target component node is taken as the central component node of the root cause topology graph. With the central component node as the center, the forward component node and the backward component node of the center are determined. For the method of determining the forward component node and the backward component node, please refer to the subsequent steps. This step will not be elaborated here.
[0090] Step S12: Traverse each component node in the global topology graph, determine the previous component node of the target component node, and store the previous component node as the preceding component node of the central component node in the root cause topology graph into the determined node set:
[0091] After identifying the target component node corresponding to the abnormal component from the global topology graph, the previous component node of the target component node will be searched from the global topology graph, and these previous component nodes will be identified as forward component nodes in the root cause topology graph with the target component node as the central component node.
[0092] Please refer to Figure 3 The aforementioned "previous component node" refers to a component node in the global topology graph that has a calling relationship with the target component node that is one level below it. In other words, it is the parent component of the target component node's abnormal metrics that has a calling relationship with it within the microservice system. Figure 3 As shown, Figure 3 The components corresponding to component nodes "A", "B", and "C" are all parent components of the target component node "G" that have a calling relationship with the abnormal component in the microservice system. Component node "A" is two levels away from component node "B" and the target component node "G", while component node "C" is one level away from component node "D" and the target component node "G". Therefore, component nodes "C" and "D" will be determined as the parent component nodes of the target component node "G". Of course, this embodiment is only for illustrative purposes. Those skilled in the art can set the corresponding number of levels to divide the target component node into its parent component nodes determined from the upstream component nodes in the global topology graph. This will not be elaborated here.
[0093] Please refer to Figure 3 and Figure 4 After determining the previous component node of the target component node in the global topology graph, these previous component nodes are stored in the determined node set along with their corresponding forward component node identifiers. This allows the previous component nodes to be identified as forward component nodes in the root cause topology graph centered on the target component node for drawing. Figure 3 In the global topology diagram shown, the parent component nodes of the target component node "G" are identified as component node "C" and component node "D". Therefore, in Figure 4 In the root cause topology diagram with the target component node "G" as the center component node, the component node "C" and the component node "D" are drawn as the forward component nodes of the center component node "G".
[0094] Step S13: Using the target component node as the initial search starting point, determine the next component node of the search starting point from the global topology graph, store the next component node as the downstream component node of the central component node in the root cause topology graph in the determined node set, and use the next component node as a new search starting point to search for its next component node and determine and store the corresponding downstream component node:
[0095] When traversing the global topology graph to find the previous component node corresponding to the target component node of the abnormal indicator component, and determining the forward component node corresponding to the root cause topology graph with the target component node as the central component node, the next component node corresponding to the target component node will also be found in the global topology graph at the same time, and then the found next component node will be determined as the backward component node in the root cause topology graph.
[0096] When searching for the next component node in the global topology graph, the search is performed on the node position of the component node that is determined as the search starting point. The component node determined as the next component node is a component node that is one level away from the component node of the search starting point, and the next component node is a subclass component node of the component node of the search starting point. That is, the component call of the next component node is the component of the component node of the search starting point. It can also be understood that the next component node is a component node that is one level away from the component node of the search starting point.
[0097] Please refer to Figure 3 and Figure 4 As mentioned above, Figure 3 The component node "G" shown is the target component node representing the abnormal component. When component node "G" is used as the starting point for searching the next component node, then... Figure 3 The next component nodes found in the global topology graph shown are: component node "H", component node "I", and component node "J". These component nodes will be the next component nodes of component node "G", and also the component nodes centered on component node "G". Figure 4 The backward component nodes in the root cause topology graph A are shown.
[0098] When starting the search for the next component node of the target component node in the global topology graph, the target component node is used as the initial search starting point. First, the search for the next component node with the target component node as the search starting point is performed in the global topology graph. After one or more corresponding next component nodes are found, these next component nodes are used as new search starting points. Then, the search for the next component node with these next component nodes as the search starting points is performed in the global topology graph. This process continues until no next component node with the latest searched next component node as the search starting point can be found in the global topology graph.
[0099] Please refer to Figure 3 It should be noted that when searching for the next component node in the global topology graph, there may be a situation where a component node is the next component node for multiple search starting points. In this case, it is sufficient to retain only one next component node relationship, such as... Figure 3 In the global topology diagram shown, when the shown component nodes "H", "I", and "J" are all used as the search starting points, it can be seen that during the search, the shown component node "L" is the next component node of both shown component nodes "H" and "I". In this case, it is sufficient to retain either the relationship that shown component node "L" is the next component node of shown component node "H" or the relationship that shown component node "L" is the next component node of shown component node "I".
[0100] Please refer to Figure 3 The next component node searched from the global topology graph will be stored in the determined node set to identify each searched next component node as a backward component node in the root cause topology graph. To ensure the hierarchical relationship between backward component nodes in the generated backward node path, in addition to storing the searched next component node and its corresponding backward component node identifier in the determined node set to indicate that the next component node is a backward component node in the root cause topology graph, the component node identifier representing the search starting point of the next component node will also be stored. For example, when starting from... Figure 3 When the next component node found in the search is the shown component node "K", it can be seen that the search starting point of the shown component node "K" is the shown component node "H". In addition to storing the shown component node "K" and the backward component node identifier that represents it as a backward component node, the determined node set will also store the component node identifier of the shown component node "H" which is the search starting point of the shown component node "K", so as to facilitate the location of the shown component node "K" in the subsequent node path of the root cause topology graph.
[0101] In addition to the already determined node set, there will also be a pending node set and a starting node set for searching the next component node in the global topology graph. The pending node set is used to cache component nodes waiting to be used as the search starting point, while the starting node set is used to store the component nodes currently used as the search starting point. Specifically, starting from the first search for the next component node in the global topology graph, the target component node corresponding to the abnormal component is stored in the pending node set. Then, the component nodes in the pending node set are stored in the starting node set and the already determined node set. The component nodes in the pending node set are cleared, thereby using the starting node set... Starting from a component node, the search proceeds by traversing all component nodes in the global topology graph. It searches for a next component node that is one level removed from the starting point. If such a node exists, it stores it in the set of nodes to be processed. Then, it checks if a component node exists in the set of nodes to be processed. If so, it clears the starting point node set, stores the component nodes from the set of nodes to be processed in both the starting point node set and the already determined node set, and clears the set of nodes to be processed. The search continues, using the component nodes in the starting point node set as the starting point, traversing the global topology graph to search for a next component node from the starting point.
[0102] Step S14: Based on the forward component nodes and backward component nodes in the determined node set, draw the forward component node path and backward component node path of the central component node in the root cause topology graph:
[0103] After searching for any previous or next component node in the global topology graph, and storing the searched previous component node as a forward component node or the next component node as a backward component node in the determined node set, the forward component node or the backward component node is simultaneously drawn into the root cause topology graph to draw the forward component node path composed of forward component nodes and the backward component node path composed of backward component nodes in the root cause topology graph.
[0104] Please refer to Figure 3 and Figure 5 ,from Figure 3 In the global topology graph shown, the component node "E" is found to be the predecessor of the component node "G" corresponding to the component with the abnormal indicator. Furthermore, the predecessor component node "E" is stored in the determined node set. Then, the graph will be drawn. Figure 5 The forward component node path in the root cause topology graph B shown, with component node "G" as the center, can be seen to be composed of component node "E".
[0105] Please refer to Figure 3 and Figure 6 , when Figure 3 The global topology diagram shown uses component node "G" as the starting point for the search. Component nodes "H", "I", and "J" are identified as the next component nodes of component node "G" from the global topology diagram. These next component nodes are then stored as backward component nodes in the determined node set, and the resulting graph will be drawn. Figure 5 In the root cause topology graph C shown, there are multiple backward component node paths centered on the component node "G". It can be seen that the component nodes "H", "I", and "J" respectively form the backward component node paths shown in the root cause topology graph C.
[0106] After searching the global topology graph and finding all previous or next component nodes as forward and backward component nodes respectively, storing them in a determined node set, and drawing all forward and backward component nodes in the determined node set onto a root cause topology graph centered on the component with the abnormal metric, the completed root cause topology graph is stored in a root cause topology graph library. This allows the client responsible for maintaining the microservice system to query the root cause topology graph corresponding to the component's abnormal metric event from the root cause topology graph library, detect the root cause of the abnormal event, and then perform targeted repairs based on the components in the forward or backward component node paths in the root cause topology graph. This addresses the component's abnormal metric event, resolves the corresponding anomaly, and ensures the stability and robustness of the microservice system. Compared to traditional global topology graphs with numerous component call relationships, root cause topology graphs that highlight the component with the abnormal metric and the call relationships between some components allow developers to quickly identify the cause of the abnormal metric, improving the speed of anomaly repair and providing a better user experience for users of various types of online services built using the microservice system.
[0107] The above typical embodiments and their variations fully disclose the implementation scheme of the abnormal root cause topology map generation method of this application. However, various variations of the method can still be derived by changing and expanding some technical means. Other embodiments are briefly described below:
[0108] In one embodiment, please refer to Figure 3 and 7 Before the step of responding to abnormal component metric events, determining the target component node corresponding to the abnormal metric component in the global topology graph of the microservice system, and using the target component node as the central component node in the root cause topology graph, the process includes:
[0109] Step S08: Obtain the target call tracing request acting on the microservice system, and push the target call tracing request to multiple microservices in the microservice system. The target call tracing request contains a target tracing identifier.
[0110] The target call tracing request includes a target tracing identifier. By pushing the target call tracing request to each microservice in the microservice system, it is possible to detect whether there are components with the target tracing identifier in each microservice. It can be seen that each component has one or more tracing identifiers. By pre-setting corresponding tracing identifiers for each component, and since components with the same tracing identifier generally have a call relationship, the target call tracing request can be pushed to query the components in the call chain corresponding to the tracing identifier contained in the request.
[0111] Step S09: Obtain the target tracing component information pushed by each microservice in response to the target call tracing request. The target tracing component information includes component information with the target tracing identifier.
[0112] The target tracking component information generally includes component feature data that characterizes the component and call level data that characterizes its call level in the call chain.
[0113] Step S10: Based on the target tracking component information, generate a global topology graph representing the calling relationships between the components corresponding to the target tracking component information.
[0114] Please refer to Figure 3 After obtaining the target tracing component information of the component with the target tracing identifier contained in the target call chain tracing request, a global topology map is drawn based on the component feature data and call hierarchy data contained in each tracing component information, using component node links to represent the call chains composed of each component call chain. The global topology map is as follows: Figure 3 As shown.
[0115] In this embodiment, by obtaining a global topology map of a call chain composed of multiple components with call relationships, when there is an abnormal component among the components with call relationships, the upstream and downstream components corresponding to the abnormal component can be searched based on the global topology map, thereby generating a root cause topology map composed of components with a strong relationship with the abnormal component in the global topology map.
[0116] In one embodiment, please refer to Figure 8 The step of responding to abnormal component metric events, identifying the target component node corresponding to the abnormal metric component in the global topology graph of the microservice system, and using the target component node as the central component node in the root cause topology graph includes:
[0117] Step S111: Respond to the component metric abnormality event and determine the metric abnormal component corresponding to the component metric abnormality event:
[0118] The system monitors the metrics data of components under each microservice in the microservice system in real time, such as KPI data. However, when the metric data of any component exceeds the preset abnormal threshold, a component metric abnormal event will be triggered to act on that component.
[0119] Step S112: Obtain the tracking identifier of the abnormal indicator component, and obtain the global topology graph corresponding to the tracking identifier.
[0120] Based on the tracking identifier of the abnormal component that is currently experiencing an anomaly, obtain the global topology map corresponding to the tracking identifier, that is, obtain the global topology map representing the component call chain where the abnormal component exists.
[0121] Step S113: Query the target component node corresponding to the abnormal indicator component from the global topology graph, generate a root cause topology graph acting on the abnormal indicator event of the component, and use the target component node as the central component node of the root cause topology graph:
[0122] After obtaining the global topology graph, the target component node corresponding to the abnormal indicator component will be queried from the component nodes of the global topology graph, and then the root cause topology graph corresponding to the component tracking abnormal event acting on the abnormal indicator component will be generated, and the target component node will be determined as the central component node of the root cause topology graph.
[0123] In this embodiment, when an anomaly is detected in the metric data of any component in the microservice system, the global topology graph of the component node with the abnormal metric will be obtained, and the component node of the abnormal metric will be used as the central component node of the root cause topology graph. Then, the upstream and downstream component nodes of the abnormal metric will be searched from the global topology graph to draw the forward and backward node paths of the central component node in the root cause topology graph, so as to improve the efficiency of determining the root cause of the component's abnormal metric problem.
[0124] In one embodiment, please refer to Figure 3 , Figure 4 and Figure 9 The step of traversing each component node in the global topology graph, determining the previous component node of the target component node, and storing the previous component node as the preceding component node of the central component node in the root cause topology graph into the determined node set includes:
[0125] Step S121: Traverse all component nodes in the global topology graph, determine the component nodes in the global topology graph that are one level ahead of the target component node, and take these component nodes as the previous component nodes of the target component node:
[0126] Please refer to Figure 3 ,by Figure 3 In the global topology diagram shown, component node “G” is the target component node that has an abnormal index. By traversing each component node in the global topology diagram shown, the component nodes that are one level away from component node “G” are found to be component node “E” and component node “F”. Component node “E” and component node “F” are the previous component nodes of component node “G”.
[0127] Step S122: Store the corresponding identifiers of each previous component node and the preceding component node into the determined node set:
[0128] Please refer to Figure 3 and Figure 4 , Figure 4 For Figure 3 The global topology diagram shown is a root cause topology diagram with component node "G" as the central component node. This is achieved by... Figure 3 In the global topology graph shown, the previous component node "E" and previous component node "F" that act on component node "G" are searched and stored in the determined node set along with their corresponding identifiers. Then, when the previous component node "E" and previous component node "F" are drawn onto the root cause topology graph centered on component node "G", the results will be as follows: Figure 4 The root cause topology diagram shows forward component nodes "E" and "F".
[0129] In this embodiment, the component nodes of the parent components of the component with the abnormal indicator are searched from the global search graph, and the calling level of the parent components is restricted. Instead of drawing the component nodes of all parent components of the component with the abnormal indicator as the forward component nodes of the root cause topology graph, the scope of the parent components is narrowed, the number of parent components that need to be searched for to confirm the root cause of the abnormality is reduced, and the efficiency of confirming the root cause of the abnormality is improved.
[0130] In one embodiment, please refer to Figure 3 and Figure 10The steps of taking the target component node as the initial search starting point, determining the next component node of the search starting point from the global topology graph, storing the next component node as the successor component node of the central component node in the root cause topology graph to the determined node set, and using the next component node as a new search starting point to search for its next component node and determine and store the corresponding successor component node include:
[0131] Step S131: Store the target component node in the set of nodes to be processed.
[0132] First, the target component node corresponding to the abnormal component in the global topology graph is stored in the search processing node set, so as to use the target component node as the initial search starting point for the next component node search processing.
[0133] Step S132: Store the component nodes in the node set to be processed to the starting node set and the determined node set, and clear all component nodes in the node set to be processed.
[0134] The set of nodes to be processed is mainly used to temporarily store the component nodes that will be used as the starting point of the search, as well as to temporarily store the next component node that will be searched from the global topology graph. This allows the component nodes in the set of nodes to be processed to be stored in the starting point node set, and the component nodes in the starting point node set to be used as the starting point of the search for the next component node of these component nodes.
[0135] The purpose of clearing the set of component nodes to be processed in the search is to prevent a component node that has been used as the starting point for the search from being used as the starting point for the search of the next component node.
[0136] Step S133: Using the component nodes in the starting node set as the search starting point, traverse each component node in the global topology graph and search for whether there is a next component node that is one level behind the search starting point. If so, store these next component nodes in the node set to be processed.
[0137] Please refer to Figure 3 , Figure 3 The component node "G" shown is the target component node corresponding to the component with the abnormal indicator. When initially starting the search for the next component node, the component node "G" is first stored in the starting node set shown, so that component node "G" is used as the initial search starting point. Figure 3 The global topology graph shown is searched to find the next component node that is one level behind the shown component node "G". This next component node is... Figure 3In the global topology diagram shown, component nodes "H", "I", and "J" are searched to be the next component nodes of component node "G". These component nodes are then stored in the set of nodes to be processed. In the next search for the next component node, component nodes "H", "I", and "J" in the set of nodes to be processed are stored in the set of starting nodes as a new search starting point.
[0138] Step S134: Detect whether a component node exists in the set of nodes to be processed. If it does, clear the starting node set, store the component nodes in the set of nodes to be processed into the starting node set and the set of determined nodes, and clear the set of nodes to be processed. Continue to use the component nodes in the starting node set as the search starting point, and traverse the global topology graph to search for the next component node of the search starting point.
[0139] The presence of a component node in the set of nodes to be processed indicates whether the next component node of the current starting point can be found from the global topology graph. For example, when the current set of starting point nodes contains component nodes... Figure 3 When we look at component node “M” in the global topology diagram, it can be seen that we cannot find the next component node “M” in the global topology diagram. Therefore, there will be no component node in the set of nodes to be processed at this time, which means that there is no next component node in the global topology diagram. At this time, we will stop the operation of searching for the next component node in the global topology diagram.
[0140] In this embodiment, by using the set of nodes to be processed to cache component nodes waiting to be used as the starting point of the search, and by using the set of starting point nodes to store the component nodes currently used as the starting point of the search, the newly searched next component node can be used as a new starting point to continuously search for the next component node from the global topology graph, ensuring the orderly progress of searching for the next component node from the global topology graph.
[0141] In one embodiment, please refer to Figure 3 , Figure 4 and Figure 11 The step of drawing the path of the forward component node and the path of the backward component node of the central component node in the root cause topology graph based on each of the forward component nodes and backward component nodes in the determined node set includes:
[0142] Step S141: Obtain the component nodes with forward identifiers in the determined node set, and draw these component nodes as the forward component nodes of the central component node in the root cause topology graph. Each of the forward component nodes forms the forward component node path of the central component node.
[0143] Please refer to Figure 3 and Figure 4 ,when Figure 3 The component node "G" shown in the global topology diagram is an example of the target component node of the abnormal indicator component. Figure 3 In the global topology graph shown, the preceding component nodes of component node "G" are found to be component node "E" and component node "F". These component nodes will then be stored in the determined node set as preceding component nodes. Figure 4 The root cause topology diagram A shown has the component node “G” as the central component node. The root cause topology diagram A has two forward component node paths, namely the forward node path composed of the component node “E” as the forward component node and the forward node path generated by the component node “F” as the forward component node.
[0144] Step S142: Obtain the component nodes with backward identifiers and backward levels in the determined node set. Based on the backward levels of these component nodes, draw these component nodes as backward component nodes of the corresponding backward level of the central component node in the root cause topology graph. The backward component nodes constitute the backward component node path of the central component node.
[0145] Please refer to Figure 3 and Figure 4 , when Figure 3 In the global topology diagram shown, component node "G" is the target component node of the abnormal component. Using component node "G" as the initial search starting point, the next component nodes searched in the global topology diagram are component nodes "H", "I", "J", "K", "L", and "M". Specifically, component node "M" is the next component node starting from component node "L", component node "L" is the next component node starting from component node "I", component node "K" is the next component node starting from component node "H", and component nodes "H", "I", and "J" are the next component nodes starting from component node "G". Therefore, in... Figure 4 In the root cause topology diagram A with component node “G” as the central component node, the backward component node paths shown are the backward component node paths composed of component node “H” and component node “K”, the backward component node paths composed of component node “I”, component node “K” and component node “M”, and the backward component node paths composed of component node “J”.
[0146] In this embodiment, by using the previous or next component node searched from the global topology graph as the forward and backward component nodes respectively, the forward and backward component node paths in the root cause topology graph are drawn. This provides developers with a layout topology graph of component nodes for components with abnormal indicators as a root cause topology graph for confirming the root cause of the abnormality, thereby improving the efficiency of developers in fixing abnormalities.
[0147] In one embodiment, please refer to Figure 4 and Figure 12 After drawing the forward and backward component node paths of the central component node in the root cause topology graph based on the determined forward and backward component node paths of each of the forward and backward component nodes in the node set, the process includes:
[0148] Step S15: Based on the sequential relationships between component nodes in each node path of the root cause topology graph, generate an abnormal root cause component list representing the call hierarchy relationship between component nodes. The abnormal root cause component list stores the component identifier of each component.
[0149] Please refer to Figure 4 The abnormal root cause component list stores the component identifiers of the components corresponding to each component node in the root cause topology graph in sequence. The storage order of each component node in the abnormal root cause component list is determined based on its node path (forward component node path and backward component node path) and its level in the node path in the root cause topology graph, so that the abnormal root cause index list can represent the abnormal root cause component list that represents the call hierarchy relationship between the components of each component node, such as... Figure 4In the root cause topology diagram A shown, the central component node is component node "G". Component node "E" is a forward component node in the forward component node path. The component identifier of the component corresponding to component node "E" will generally be stored in the first storage location in the abnormal root cause index list, thus having a call hierarchy identifier representing a parent-class call hierarchy relationship. For example, the call hierarchy identifier could be "parent call, 1". Component node "K" shown in root cause topology diagram A is a backward component node in the backward component node path headed by component node "H". The node's call level identifier will be "subclass call, H(2)", to indicate that it is the second node in the backward component node path starting with the shown component node "H". The storage location of the component identifier of the shown component node in the abnormal root cause component list is generally the storage location after the storage location of the component identifier of the shown component node "H". Of course, those skilled in the art can flexibly design the storage location of each component identifier in the abnormal root cause component list and the data format of the call level identifier mapped to each component identifier, following the logic described in this embodiment. This will not be elaborated here.
[0150] Step S16: Based on the abnormal indicators of the abnormal components corresponding to the central component nodes of the root cause topology graph, obtain the indicator data corresponding to each component node and the abnormal indicator in the root cause topology graph, and store these indicator data in the corresponding component identifier in the abnormal root cause component list:
[0151] For example, when the abnormal indicator of the abnormal component corresponding to the central component node of the root cause topology graph is the crash rate indicator, the crash rate indicators of each component node in the root cause topology graph will be obtained as its indicator data, and these indicator data will be stored in the storage location of the component identifier of each component node in the abnormal root cause component list, and the indicator data and component identifier will be mapped and stored.
[0152] Step S17: Obtain the log data of each component node in the root cause topology graph, and store the log data in the corresponding component identifier in the abnormal root cause component list:
[0153] In addition to storing the indicator data of each component node in the root cause topology graph into the abnormal root cause component list, the log data corresponding to the components of these component nodes will also be stored in the abnormal root cause component list, and the log data will be mapped and stored to the component identifier of the component node to which it belongs.
[0154] In this embodiment, by obtaining the component identifier, call level identifier, indicator data and log data of each component node in the root cause topology diagram, the abnormal root cause component list corresponding to the generation is pushed to the platform's management terminal. This allows developers on the management terminal to not only confirm the root cause of indicator anomalies using the root cause topology diagram, but also to improve the efficiency of anomaly repair by using the abnormal root cause component list.
[0155] Furthermore, by functionalizing the various steps in the methods disclosed in the above embodiments, an abnormal root cause topology map generation device of this application can be constructed. Following this approach, please refer to... Figure 13 In one typical embodiment, the device includes: a component anomaly response module 11, used to respond to component metric anomaly events, determine the target component node corresponding to the metric anomaly component in the global topology graph of the microservice system, and use the target component node as the central component node of the root cause topology graph; a forward node determination module 12, used to traverse each component node in the global topology graph, determine the previous component node of the target component node, and store the previous component node as the forward component node of the central component node in the root cause topology graph to the determined node set; and a backward node determination module 13, used to... The target component node serves as the initial search starting point. The next component node of the search starting point is determined from the global topology graph. The next component node is stored as the backward component node of the central component node in the root cause topology graph and added to the determined node set. The next component node is then used as a new search starting point to search for its next component node and determine and store the corresponding backward component node. The node path drawing module 14 is used to draw the forward component node path and the backward component node path of the central component node in the root cause topology graph based on each forward component node and backward component node in the determined node set.
[0156] In one embodiment, the component anomaly response module 11 includes: an indicator anomaly component determination submodule, used to respond to a component indicator anomaly event and determine the indicator anomaly component corresponding to the component indicator anomaly event; a global topology graph acquisition submodule, used to acquire the tracking identifier of the indicator anomaly component and acquire the global topology graph corresponding to the tracking identifier; and a central component node determination submodule, used to query the target component node corresponding to the indicator anomaly component from the global topology graph, generate a root cause topology graph acting on the component indicator anomaly event, and use the target component node as the central component node of the root cause topology graph.
[0157] In one embodiment, the forward node determination module 12 includes: a previous component node determination submodule, used to traverse each component node in the global topology graph, determine the component nodes in the global topology graph that are one layer ahead of the target component node, and take these component nodes as the previous component nodes of the target component node; and a forward component node storage submodule, used to store each previous component node and the forward component node identifier in the determined node set.
[0158] In one embodiment, the backward node determination module 13 includes: a target component node processing submodule, used to store the target component node in a node set to be processed; a search starting point initialization submodule, used to store the component nodes in the node set to be processed in a starting point node set and a determined node set, and clear each component node in the node set to be processed; a next component node search submodule, used to take the component nodes in the starting point node set as the search starting point, traverse each component node in the global topology graph, and search for whether there is a next component node in each component node that is separated from the search starting point by one backward relationship. If there is, these next component nodes are stored in the node set to be processed; a node search loop submodule, used to detect whether there is a component node in the node set to be processed. If there is, the starting point node set is cleared, the component nodes in the node set to be processed are stored in the starting point node set and the determined node set, and the node set to be processed is cleared. The search continues to take the component nodes in the starting point node set as the search starting point and traverse the global topology graph to search for whether there is a next component node of the search starting point.
[0159] In one embodiment, the node path drawing module 14 includes: a forward component node path drawing submodule, used to obtain component nodes with forward identifiers in the determined node set, and draw these component nodes as forward component nodes of the central component node in the root cause topology graph, wherein each of the forward component nodes constitutes the forward component node path of the central component node; and a backward component node path drawing submodule, used to obtain component nodes with backward identifiers and backward levels in the determined node set, and draw these component nodes as backward component nodes of the corresponding backward level of the central component node in the root cause topology graph according to their respective backward levels, wherein each of the backward component nodes constitutes the backward component node path of the central component node.
[0160] To address the aforementioned technical problems, embodiments of this application also provide a computer device for running a computer program implemented according to the abnormal root cause topology graph generation method. Please refer to [link / reference] for details. Figure 14 , Figure 14 This is a basic structural block diagram of the computer device in this embodiment.
[0161] like Figure 14 The diagram shows the internal structure of a computer device. The computer device includes a processor, non-volatile storage medium, memory, and a network interface connected via a system bus. The non-volatile storage medium stores the operating system, a database, and computer-readable instructions. The database may store control information sequences. When the computer-readable instructions are executed by the processor, they enable the processor to implement an anomaly root cause topology map generation method. The processor provides computational and control capabilities, supporting the operation of the entire computer device. The memory stores computer-readable instructions, which, when executed by the processor, enable the processor to execute an anomaly root cause topology map generation method. The network interface of the computer device is used for communication with terminals. Those skilled in the art will understand that… Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0162] In this embodiment, the processor executes the specific functions of each module / submodule in the abnormal root cause topology map generation device of this application, and the memory stores the program code and various types of data required to execute the above modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / submodules in the abnormal root cause topology map generation device, and the server can call the server's program code and data to execute the functions of all submodules.
[0163] This application also provides a non-volatile storage medium in which the abnormal root cause topology map generation method is written as a computer program and stored in the storage medium in the form of computer-readable instructions. When the computer-readable instructions are executed by one or more processors, it means that the program is running in the computer, thereby causing one or more processors to perform the steps of the abnormal root cause topology map generation method of any of the above embodiments.
[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0165] In summary, this application generates a local topology graph centered on the abnormal component to improve the efficiency of root cause investigation.
[0166] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0167] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0168] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating anomaly root cause topology graphs, characterized in that, Includes the following steps: In response to abnormal component metrics events, the target component node corresponding to the abnormal metric component in the global topology graph of the microservice system is identified, and the target component node is used as the central component node of the root cause topology graph. Traverse each component node in the global topology graph, determine the previous component node of the target component node, and store the previous component node as the preceding component node of the central component node in the root cause topology graph into the determined node set. Using the target component node as the initial search starting point, the next component node of the search starting point is determined from the global topology graph. This next component node is stored as a downstream component node of the central component node in the root cause topology graph in the determined node set. The next component node is then used as a new search starting point to search for its next component node and determine and store the corresponding downstream component node. This includes: storing the target component node in a node set to be processed; storing the component nodes in the node set to be processed in both the starting point node set and the determined node set; clearing all component nodes in the node set to be processed; and using the starting point node set... Starting from a component node, the system traverses each component node in the global topology graph, searching for a next component node that is one level below the starting point in the backward relationship. If such a node exists, it stores it in the set of nodes to be processed. The system then checks if a component node exists in the set of nodes to be processed. If it does, the system clears the starting point node set, stores the component nodes in the set of nodes to be processed in both the starting point node set and the set of determined nodes, and clears the set of nodes to be processed. The system continues to use the component nodes in the starting point node set as the starting point for searching the global topology graph for a next component node. Based on the forward component nodes and backward component nodes in the determined node set, draw the forward component node path and backward component node path of the central component node in the root cause topology graph.
2. The method according to claim 1, characterized in that, Before the step of responding to component metric anomaly events, identifying the target component node corresponding to the component with the abnormal metric in the global topology graph of the microservice system, and using the target component node as the central component node of the root cause topology graph, the following steps are included: Obtain a target call tracing request that acts on a microservice system, and push the target call tracing request to multiple microservices in the microservice system. The target call tracing request contains a target tracing identifier. Obtain the target tracing component information pushed by each of the microservices in response to the target call chain tracing request, wherein the target tracing component information includes component information with the target tracing identifier; Based on the target tracking component information, a global topology graph is generated that represents the calling relationships between the components corresponding to the target tracking component information.
3. The method according to claim 1, characterized in that, The step of responding to abnormal component metric events, identifying the target component node corresponding to the abnormal metric component in the global topology graph of the microservice system, and using the target component node as the central component node in the root cause topology graph includes: In response to abnormal component metrics events, identify the abnormal component corresponding to the abnormal component metrics event. Obtain the tracking identifier of the abnormal indicator component, and obtain the global topology map corresponding to the tracking identifier; The target component node corresponding to the abnormal indicator component is queried from the global topology graph, and a root cause topology graph is generated that acts on the abnormal indicator event of the component. The target component node is used as the central component node of the root cause topology graph.
4. The method according to claim 1, characterized in that, The step of traversing each component node in the global topology graph, determining the previous component node of the target component node, and storing the previous component node as the preceding component node of the central component node in the root cause topology graph into the determined node set includes: Traverse each component node in the global topology graph, determine the component nodes in the global topology graph that are one level ahead of the target component node, and take these component nodes as the previous component node of the target component node; Store the corresponding identifiers of each previous component node and the preceding component node in the determined node set.
5. The method according to claim 1, characterized in that, The step of drawing the forward and backward component node paths of the central component node in the root cause topology graph based on the forward and backward component nodes of each of the determined forward and backward component nodes in the node set includes: Obtain the component nodes with forward identifiers in the determined node set, draw these component nodes as the forward component nodes of the central component node in the root cause topology graph, and each of the forward component nodes forms the forward component node path of the central component node. Obtain the component nodes with backward identifiers and backward levels in the determined node set. Based on the backward levels of these component nodes, draw these component nodes as backward component nodes of the corresponding backward levels of the central component node in the root cause topology graph. Each of the backward component nodes forms the backward component node path of the central component node.
6. The method according to claim 1, characterized in that, Based on the determined forward and backward component nodes in the node set, after drawing the forward and backward component node paths of the central component node in the root cause topology graph, the process includes: Based on the sequential relationship between component nodes in each node path of the root cause topology graph, an abnormal root cause component list is generated, which represents the call hierarchy relationship between component nodes. The abnormal root cause component list stores the component identifier of each component. Based on the abnormal indicators of the abnormal component corresponding to the central component node of the root cause topology graph, obtain the indicator data corresponding to each component node and the abnormal indicator in the root cause topology graph, and store these indicator data in the corresponding component identifier in the abnormal root cause component list. Obtain the log data of each component node in the root cause topology graph, and store this log data in the corresponding component identifier in the abnormal root cause component list.
7. An apparatus for generating an abnormal root cause topology map, characterized in that, include: The component exception response module is used to respond to component metric exception events, determine the target component node corresponding to the metric exception component in the global topology graph of the microservice system, and use the target component node as the central component node of the root cause topology graph. The forward node determination module is used to traverse each component node in the global topology graph, determine the previous component node of the target component node, and store the previous component node as the forward component node of the central component node in the root cause topology graph into the determined node set. The backward node determination module is used to take the target component node as the initial search starting point, determine the next component node of the search starting point from the global topology graph, store the next component node as the backward component node of the central component node in the root cause topology graph to the determined node set, and use the next component node as a new search starting point to search for its next component node and determine and store the corresponding backward component node. This includes: storing the target component node to a node set to be processed; storing the component nodes in the node set to be processed to the starting point node set and the determined node set; clearing all component nodes in the node set to be processed; and using the starting point node... Starting from the component nodes in the point set, the search proceeds by traversing each component node in the global topology graph. The search checks if any of these component nodes have a next component node that is one level below the starting point in the backward relationship. If so, these next component nodes are stored in the node set to be processed. The search continues by using the component nodes in the starting point set as the starting point and traversing the global topology graph to search for a next component node from the starting point. The node path drawing module is used to draw the forward component node path and the backward component node path of the central component node in the root cause topology graph based on the forward component nodes and backward component nodes in the determined node set.
8. The apparatus according to claim 7, characterized in that, The component exception response module includes: The indicator anomaly component determination submodule is used to respond to component indicator anomaly events and determine the indicator anomaly component corresponding to the component indicator anomaly event. The global topology map acquisition submodule is used to acquire the tracking identifier of the abnormal indicator component and acquire the global topology map corresponding to the tracking identifier; The central component node determination submodule is used to query the target component node corresponding to the abnormal indicator component from the global topology graph, generate a root cause topology graph that acts on the abnormal indicator event of the component, and use the target component node as the central component node of the root cause topology graph.
9. An abnormal root cause topology map generation device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 6, which, when invoked by a computer, executes the steps included in the corresponding method.
Citation Information
Patent Citations
Micro-service system fault root cause analysis method and system based on fault mode library
CN116225752A