Fault source application system troubleshooting method, device, computer equipment and storage medium
By obtaining and analyzing the link tree tracking identifier and abnormal link identifier of the business request, the fault source application system is quickly located, solving the problems of low efficiency and data loss in the existing technology and achieving efficient and accurate fault source location.
Patent Information
- Application Number
- CN202411342011.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-09-25
AI Technical Summary
Existing technologies are inefficient in troubleshooting fault source application systems and are prone to being unable to locate the fault source system due to data loss.
By obtaining the target link tree tracking identifier of the business request, determining the call link tree path, and recording the abnormal node when the business processing is abnormal, generating the minimum value of the abnormal node sequence number and the abnormal link tracking identifier, and using these identifiers to quickly locate the fault source application system.
It improves the efficiency and accuracy of fault source application system troubleshooting, reduces troubleshooting costs and resource consumption, and avoids positioning failures due to data loss.
Smart Images

Figure CN119166408B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, computer equipment and storage medium for troubleshooting a fault source application system. Background Art
[0002] When an exception occurs in business processing, it is generally necessary to start from the source application system to investigate which downstream application system has failed, then jump to the downstream application system and continue the tracing process; repeat the above process until the application business system with the root cause of the error is found as the fault source system for fault handling.
[0003] However, the current method of troubleshooting the source of the fault in the application system has problems such as low efficiency or inability to locate the source of the fault system due to data loss. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for troubleshooting a fault source application system that can improve troubleshooting efficiency and avoid the inability to locate the fault source system due to data loss to address the above technical problems.
[0005] In a first aspect, a method for troubleshooting a fault source application system is provided, the method comprising:
[0006] In response to receiving a service request, obtaining a target link tree tracing identifier corresponding to the service request; wherein the target link tree tracing identifier is used to represent a call link tree path of an application system call relationship related to the output service request; each node in the call link tree represents a service sub-application system;
[0007] Determine the call link tree path based on the target link tree tracking identifier, and process the business request based on the call link tree path and the current node to obtain the business processing result of the current node; the business processing result includes business processing success or business processing exception;
[0008] In response to a business processing result being a business processing exception, the current node is recorded as an abnormal node, and the minimum value of the abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier are generated based on the abnormal node; wherein the abnormal link tracking identifier is used to represent the abnormal link linear path of the application system call relationship regarding the return of the business processing result.
[0009] In one embodiment, generating a minimum value of an abnormal node sequence number corresponding to the abnormal node and a corresponding abnormal link tracking identifier according to the abnormal node includes:
[0010] Generate the minimum value of the corresponding abnormal node sequence number according to the abnormal node;
[0011] In response to the abnormal node not being the starting node of the call link tree path, returning the service processing result to the corresponding previous upstream node according to the abnormal node, updating the abnormal node to the previous upstream node, and incrementing the abnormal node sequence number by 1;
[0012] In response to the abnormal node being the starting node of the call link tree path, a corresponding abnormal link linear path is generated according to each abnormal node and the corresponding abnormal node sequence number, and a corresponding abnormal link tracking identifier is randomly generated according to the abnormal link linear path.
[0013] In one embodiment, the method includes: in response to selecting an output method for abnormal chain data, determining an output method; the output method includes a message queue method or a log method; in response to the output method being a message queue method, outputting the minimum value, the corresponding abnormal link linear path and the corresponding abnormal link tracking identifier to a storage system for storage via a message queue method.
[0014] In one embodiment, the method further includes: in response to the output mode being a log mode, outputting the minimum value, the corresponding abnormal link linear path, and the corresponding abnormal link tracking identifier to a storage system in a log mode for storage.
[0015] In one embodiment, the method further includes: in response to a query operation performed in the storage system according to the target abnormal link tracking identifier, determining the minimum value corresponding to the target abnormal link linear path and the target abnormal link tracking identifier; the target abnormal link linear path is the abnormal link linear path corresponding to the target abnormal link tracking identifier; locating the target abnormal link linear path according to the minimum value corresponding to the target abnormal link tracking identifier to obtain the target abnormal node; the target abnormal node is the abnormal node corresponding to the minimum value corresponding to the target abnormal link tracking identifier; and determining the fault source application system according to the business sub-application system corresponding to the target abnormal node.
[0016] In one embodiment, locating the target abnormal node on the corresponding abnormal link linear path according to the minimum value corresponding to the target abnormal link tracking identifier includes:
[0017] Compare the abnormal node sequence number corresponding to each abnormal node in the linear path of the target abnormal link with the minimum value corresponding to the target abnormal link tracking identifier in sequence to obtain a comparison result; the comparison result is identical or different;
[0018] If the comparison results are the same, the abnormal node of the target abnormal link linear path corresponding to the comparison result is determined as the target abnormal node.
[0019] In one embodiment, the method further comprises:
[0020] In response to the business processing result being successful, the current node is updated to the next downstream node, and the process returns to the step of determining the call link tree path based on the target link tree tracking identifier, and processing the business request based on the call link tree path and the current node to obtain the business processing result of the current node.
[0021] In a second aspect, a device for troubleshooting a fault source application system is provided, the device comprising a request receiving module, a request processing module and a fault source troubleshooting module.
[0022] Among them, the request receiving module is used to obtain the target link tree tracking identifier corresponding to the business request in response to receiving the business request; wherein, the target link tree tracking identifier is used to represent the call link tree path of the application system call relationship regarding the output business request; each node in the call link tree represents a business sub-application system; the request processing module is used to determine the call link tree path according to the target link tree tracking identifier, and obtain the business processing result of the current node after processing the business request according to the call link tree path and the current node; the business processing result includes successful business processing or abnormal business processing; the fault source investigation module is used to record the current node as an abnormal node in response to the business processing result being an abnormal business processing, and generate the minimum value of the abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier according to the abnormal node; wherein the abnormal link tracking identifier is used to represent the abnormal link linear path of the application system call relationship regarding the return of the business processing result.
[0023] In a third aspect, a computer device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any method in the above method embodiments are implemented.
[0024] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any method in the above method embodiments are implemented.
[0025] The above-mentioned fault source application system troubleshooting method, device, computer equipment and storage medium, in response to receiving a business request, obtains the target link tree tracking identifier corresponding to the business request; wherein, the target link tree tracking identifier is used to represent the call link tree path of the application system call relationship regarding the output business request; each node in the call link tree represents a business sub-application system; then, the call link tree path is determined according to the target link tree tracking identifier, and the business request is processed according to the call link tree path and the current node to obtain the business processing result of the current node; the business processing result includes successful business processing or abnormal business processing; then, in response to the business processing result being an abnormal business processing, the current node is recorded as an abnormal node, and the minimum value of the abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier are generated according to the abnormal node; wherein, the abnormal link tracking identifier is used to represent the abnormal link linear path of the application system call relationship regarding the return of the business processing result. That is, the corresponding abnormal link linear path can be determined through the abnormal link tracking identifier corresponding to the abnormal node, and the business sub-application system corresponding to the abnormal node corresponding to the minimum value of the abnormal node serial number corresponding to the abnormal node can be determined as the fault source application system according to the above abnormal link linear path. In other words, the fault source application system can be directly and quickly located according to the minimum value of the abnormal node serial number corresponding to the abnormal node and the corresponding abnormal link tracking identifier. The abnormal link is a linear link with low complexity, thereby reducing the troubleshooting cost and consumed resources, improving the efficiency and accuracy of the fault source application system troubleshooting, and avoiding the inability to locate the fault source system due to data loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a method for troubleshooting a fault source application system by calling a link in one embodiment;
[0027] Figure 2 An application environment diagram of a method for troubleshooting a fault source application system in one embodiment;
[0028] Figure 3 A schematic diagram of a first flow chart of a method for troubleshooting a fault source application system in one embodiment;
[0029] Figure 4 A schematic diagram of a process for generating a minimum value of an abnormal node sequence number corresponding to an abnormal node and a corresponding abnormal link tracking identifier according to an abnormal node in one embodiment;
[0030] Figure 5 A schematic diagram of generating a linear path of an abnormal link in one embodiment;
[0031] Figure 6 A second flow chart of a method for troubleshooting a fault source application system in one embodiment;
[0032] Figure 7 A third flow chart of a method for troubleshooting a fault source application system in one embodiment;
[0033] Figure 8 A schematic diagram of a process for locating a target abnormal link linear path according to a minimum value corresponding to a target abnormal link tracking identifier to obtain a target abnormal node in an embodiment;
[0034] Figure 9 A fourth flow chart of a method for troubleshooting a fault source application system in one embodiment;
[0035] Figure 10 A structural block diagram of a device for troubleshooting a fault source application system in one embodiment;
[0036] Figure 11 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0038] To facilitate understanding of the present application, the present application will be described more fully below with reference to the accompanying drawings. The accompanying drawings provide embodiments of the present application. However, the present application may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to make the disclosure of the present application more thorough and comprehensive.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application.
[0040] It will be understood that the terms "first," "second," etc., used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor without departing from the scope of this application. The first resistor and the second resistor are both resistors, but they are not the same resistor.
[0041] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if there is transmission of electrical signals or data between the connected circuits, modules, units, etc.
[0042] When used herein, the singular forms "a", "an", and "the" may also include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, integers, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, integers, steps, operations, components, parts, or combinations thereof.
[0043] In traditional technology, the source of the fault is investigated by calling the application system through the call chain. It can be understood that the call chain is a technology that tracks the call relationship between services in a distributed system. It is mainly used to record the call path and processing process of a complete business request between various service nodes. Each service node generates a tracking fragment with a unique identifier. When the business request is passed from one node to the next, the identifier is carried and the relevant information is expanded, eventually forming a chain that connects all service call sequences. In a specific example, such as Figure 1As shown, through the call link tree path, it is known that application system A (referred to as A application) called application system B, application system B (referred to as B application) called application system C, and application system C (referred to as C application) called application system D (referred to as D application). The method for troubleshooting the fault source application system through the call link includes: first, finding the unique identifier Trace ID of the business request link and the Span ID corresponding to the abnormal operation of application system A through the abnormal log of application system A; then, searching the call chain data through the Trace ID and the Span ID corresponding to the abnormal operation of application system A, analyzing that an abnormality occurred when application system A called application system B, and finding the Span ID corresponding to the abnormal operation of application system B; then, searching the call chain data through the Trace ID and the Span ID corresponding to the abnormal operation of application system B, analyzing that an abnormality occurred when application system B called application system C, and finding the Span ID corresponding to the abnormal operation of application system C; finally, finding the Span ID corresponding to the abnormal operation of application system C through the Trace ID and The ID searches the call chain data, analyzes that an exception occurs when the C application system calls the D application system, and finds the abnormal operation of the D application system. Since there is no subsequent call to the D application system, the D application system is finally located as the fault source application. In addition, the Trace ID represents the complete path of a business request from initiation to completion in the system. Each Trace has a corresponding unique ID to identify a specific business request link. The Span in the Span ID is the basic unit of Trace and represents a stage of a business request. Each Span contains the start time, end time, service name, operation name, and some labels and comments. Spans can be nested to reflect the calling relationship between services. It is understandable that the above-mentioned method of troubleshooting the source application system through the call chain is based on the call chain analysis, and the structure of the call chain may be a tree structure. As the number of call layers increases, the complexity of the call chain also increases, resulting in a large analysis overhead. The method of troubleshooting the source application system through the call chain requires that the tracking data is continuous. If the tracking data of the intermediate node is lost, the fault source application cannot be located, which makes the efficiency and accuracy of troubleshooting the source application system through the call chain low. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0044] The fault source application system troubleshooting method provided in this application can be applied to Figure 2In the application environment shown, the terminal 202 communicates with the server 204 via a network. The terminal 202 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 204 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0045] In one embodiment, Figure 3 As shown, a method for troubleshooting a fault source application system is provided, which is applied to Figure 1 The server 204 in FIG. 1 is used as an example to illustrate the method, which includes the following steps 301 to 303.
[0046] Step 301: In response to receiving a service request, obtain a target link tree tracking identifier corresponding to the service request.
[0047] Among them, the target link tree tracking identifier is used to represent the call link tree path of the application system call relationship regarding the output business request; each node in the call link tree represents a business sub-application system; the parent-child relationship between the above nodes corresponds to the application system call relationship between the business sub-application systems.
[0048] Specifically, upon recognizing that a service request has been received, the server 204 obtains a target link tree tracking identifier corresponding to the service request, thereby being able to determine the corresponding call link tree path of the application system call relationship regarding the output service request through the target link tree tracking identifier.
[0049] Step 302: determine the call link tree path according to the target link tree tracing identifier, and process the service request according to the call link tree path and the current node to obtain the service processing result of the current node.
[0050] Among them, the business processing result includes business processing success or business processing exception. Business processing success is used to indicate that the business sub-application system corresponding to the current node has not encountered a business processing exception. Business processing exception is used to indicate that the business sub-application system corresponding to the current node has encountered a business processing exception. Specifically, the server 204 determines the call link tree path based on the target link tree tracking identifier, and processes the business request based on the call link tree path and the current node to obtain the business processing result of the current node. In addition, the call link tree path can be represented by, but is not limited to, a call link.
[0051] In a specific example, the target link tree tracking identifier can be accompanied by the information of the call link tree path, and the call link tree path includes the node corresponding to the A application system, the node corresponding to the B application system, the node corresponding to the C application system, and the node corresponding to the D application system in sequence, that is, the A application system calls the B application system, the B application system calls the C application system, and the C application system calls the D application system. The starting node in the call link tree path is the node corresponding to the A application system, and the ending node in the call link tree path is the node corresponding to the D application system. The current node can be updated in sequence from the starting node in the call link tree path to the ending node in the link tree path, that is, the current node is updated to the next downstream node. It can be understood that the ending node in the call link tree path is the downstream node of the starting node in the call link tree path, and the starting node in the call link tree path is the upstream node of the ending node in the call link tree path. The above is only a specific example, and it can be flexibly set according to user needs in actual applications and is not limited here.
[0052] Step 303 : In response to the service processing result being a service processing exception, the current node is recorded as an abnormal node, and a minimum value of an abnormal node sequence number corresponding to the abnormal node and a corresponding abnormal link tracking identifier are generated according to the abnormal node.
[0053] The abnormal link tracking identifier is used to represent the abnormal link linear path of the application system call relationship that returns the business processing result. When the server 204 identifies that the business processing result is a business processing exception, it indicates that a business processing exception has occurred in the business sub-application system corresponding to the current node. Therefore, the server 204 records the current node as an abnormal node, so that the abnormal node can be used as the starting node of the abnormal link linear path and the starting node of the call link tree path can be used as the ending node of the abnormal link linear path. Based on the abnormal node, the minimum abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier are generated. Therefore, the corresponding abnormal link linear path can be determined based on the abnormal link tracking identifier corresponding to the abnormal node. The business sub-application system corresponding to the abnormal node corresponding to the minimum abnormal node sequence number can be determined as the fault source application system based on the abnormal link linear path. In other words, the fault source application system can be directly and quickly located based on the minimum abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier. The abnormal link is a linear link with low complexity, thereby reducing the troubleshooting cost and resource consumption, improving the efficiency and accuracy of troubleshooting the fault source application system, and avoiding the inability to locate the fault source system due to data loss.
[0054] In one embodiment, Figure 4As shown, the minimum value of the abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier are generated according to the abnormal node, including steps 401 to 403.
[0055] Step 401: Generate a minimum value of a corresponding abnormal node sequence number according to the abnormal node.
[0056] Specifically, when the server 204 identifies that the business processing result is a business processing exception, the current node is the first abnormal node, that is, the business sub-application system corresponding to the current node is the fault source application system. The first abnormal node can be used as the starting node of the abnormal link linear path, and the abnormal node sequence number corresponding to the abnormal node is configured to the minimum value according to the abnormal node, so that the fault source application system can be located in the abnormal link linear path through the minimum value of the abnormal node sequence number.
[0057] In a specific example, the minimum value of the abnormal node sequence number can be, but is not limited to, configured as 0. The above is only a specific example. In actual application, it can be flexibly set according to user needs and is not limited here.
[0058] Step 402: In response to the abnormal node not being the starting node of the call link tree path, the service processing result is returned to the corresponding previous upstream node according to the abnormal node, the abnormal node is updated to the previous upstream node, and the abnormal node sequence number is incremented by 1.
[0059] Specifically, when the server 204 identifies that the abnormal node is not the starting node of the calling link tree path, it means that the abnormal link linear path has not yet reached the end node. At this time, the abnormal node still has an upstream node that needs to return the business processing result, so the business processing result is returned to the corresponding upstream node according to the abnormal node, and the abnormal node is updated to the upstream node, and the abnormal node sequence number is incremented by 1, which facilitates the update of the abnormal link linear path.
[0060] Step 403 , in response to the abnormal node being the starting node of the call link tree path, a corresponding abnormal link linear path is generated according to each abnormal node and the corresponding abnormal node sequence number, and a corresponding abnormal link tracking identifier is randomly generated according to the abnormal link linear path.
[0061] Specifically, when the server 204 identifies the abnormal node as the starting node of the call link tree path, it means that the abnormal link linear path has reached the end node at this time. At this time, the abnormal node does not have an upstream node that needs to return the business processing result, so the corresponding abnormal link linear path is generated according to each abnormal node and the abnormal node sequence number (Error Index) corresponding to each abnormal node, and the corresponding abnormal link tracking identifier is randomly generated according to the abnormal link linear path, so that the abnormal link tracking identifier (Error ID) can represent the abnormal link linear path of the application system call relationship that returns the business processing result. It can be understood that each business processing exception has a unique corresponding abnormal link tracking identifier (Error ID) to represent the specific abnormal link linear path of the application system call relationship that returns the business processing result. In addition, the abnormal link tracking identifier can be accompanied by information about the abnormal link linear path.
[0062] In a specific example, the Software Development Kit (SDK) randomly generates a corresponding abnormal link tracking identifier based on the abnormal link linear path. The above is only a specific example. In actual application, it can be flexibly set according to user needs and is not limited here.
[0063] In this embodiment, the minimum value of the corresponding abnormal node serial number is generated according to the abnormal node; then, in response to the abnormal node not being the starting node of the call link tree path, the business processing result is returned to the corresponding previous upstream node according to the abnormal node, the abnormal node is updated to the previous upstream node, and the abnormal node serial number is incremented by 1; then, in response to the abnormal node being the starting node of the call link tree path, the corresponding abnormal link linear path is generated according to each abnormal node and the corresponding abnormal node serial number, and the corresponding abnormal link tracking identifier is randomly generated according to the abnormal link linear path, thereby improving the efficiency and convenience of generating the abnormal link tracking identifier and the abnormal link linear path.
[0064] In a specific example, Figure 5As shown, in a specific example, the target link tree tracking identifier can be accompanied by the information of the call link tree path, and the call link tree path includes the node corresponding to the A application system (referred to as A application), the node corresponding to the B application system (referred to as B application), the node corresponding to the C application system (referred to as C application) and the node corresponding to the D application system (referred to as D application) in sequence, that is, the A application system calls the B application system, the B application system calls the C application system, and the C application system calls the D application system. After the D application system processes the business request, the business processing result of the current node is obtained. At this time, the business processing result of the D application system is a business processing exception. At this time, the current node is the first abnormal node, that is, the business sub-application system corresponding to the current node, that is, the D application system, is the fault source application system. The first abnormal node can be used as the starting node of the abnormal link linear path. According to the abnormal node, the abnormal node sequence number corresponding to the abnormal node is configured to the minimum value, that is, 0, so that the fault source application system can be located in the abnormal link linear path through the minimum value of the abnormal node sequence number. Then, when it is identified that the abnormal node, i.e., application system D, is not the starting node of the call link tree path, i.e., application system A, it means that the abnormal link linear path has not yet reached the end node. At this time, the abnormal node still has a previous upstream node, i.e., application system C, to which a business processing result needs to be returned. Therefore, the business processing result is returned to the corresponding previous upstream node, i.e., application system C, based on the abnormal node, and the abnormal node is updated to the previous upstream node, i.e., application system C, and the abnormal node sequence number is incremented by 1 to 1. Next, when it is identified that the abnormal node, i.e., application system C, is not the starting node of the call link tree path, i.e., application system A, it means that the abnormal link linear path has not yet reached the end node, i.e., application system A, and the abnormal node still has a previous upstream node, i.e., application system B, to which a business processing result needs to be returned. Therefore, the business processing result is returned to the corresponding previous upstream node, i.e., application system B, based on the abnormal node, and the abnormal node is updated to the previous upstream node, i.e., application system B, and the abnormal node sequence number is incremented by 1 to 2. Then, when it is identified that the abnormal node, namely application system B, is not the starting node of the call link tree path, namely application system A, it means that the abnormal link linear path has not yet reached the end node, namely application system A. At this time, the abnormal node still has an upstream node, namely application system A, to which the business processing result needs to be returned. Therefore, the business processing result is returned to the corresponding upstream node, namely application system A, according to the abnormal node, and the abnormal node is updated to the upstream node, namely application system A, and the abnormal node sequence number is incremented by 1 to 3.Finally, when the abnormal node, i.e., application system A, is identified as the starting node of the call link tree path, i.e., application system A, it means that the abnormal link linear path has reached the end node. At this time, the abnormal node does not have an upstream node that needs to return the business processing result. Therefore, the corresponding abnormal link linear path is generated according to each abnormal node and the abnormal node sequence number (Error Index) corresponding to each abnormal node, i.e., application system D to application system C to application system B to application system A, and the corresponding abnormal link tracking identifier is randomly generated according to the abnormal link linear path, i.e., Error ID = 7921a24, so that the abnormal link tracking identifier (Error ID) can represent the abnormal link linear path of the application system call relationship that returns the business processing result. The above is only a specific example. In actual application, it is flexibly set according to user needs and is not limited here.
[0065] In the above-mentioned fault source application system troubleshooting method, in response to receiving a business request, a target link tree tracing identifier corresponding to the business request is obtained; wherein, the target link tree tracing identifier is used to represent the call link tree path of the application system call relationship regarding the output business request; each node in the call link tree represents a business sub-application system; then, the call link tree path is determined according to the target link tree tracing identifier, and the business request is processed according to the call link tree path and the current node to obtain the business processing result of the current node; the business processing result includes successful business processing or abnormal business processing; then, in response to the business processing result being an abnormal business processing, the current node is recorded as an abnormal node, and the minimum value of the abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracing identifier are generated according to the abnormal node; wherein, the abnormal link tracing identifier is used to represent the abnormal link linear path of the application system call relationship regarding the return of the business processing result. That is, the corresponding abnormal link linear path can be determined through the abnormal link tracking identifier corresponding to the abnormal node, and the business sub-application system corresponding to the abnormal node corresponding to the minimum value of the abnormal node serial number corresponding to the abnormal node can be determined as the fault source application system according to the above abnormal link linear path. In other words, the fault source application system can be directly and quickly located according to the minimum value of the abnormal node serial number corresponding to the abnormal node and the corresponding abnormal link tracking identifier. The abnormal link is a linear link with low complexity, thereby reducing the troubleshooting cost and consumed resources, improving the efficiency and accuracy of the fault source application system troubleshooting, and avoiding the inability to locate the fault source system due to data loss.
[0066] In one embodiment, Figure 6 As shown, the method includes step 601 and step 602.
[0067] Step 601 : In response to selecting an output mode for abnormal chain data, an output mode is determined.
[0068] Step 602: In response to the output mode being a message queue mode, the minimum value, the corresponding abnormal link linear path, and the corresponding abnormal link tracking identifier are output to a storage system via a message queue mode for storage.
[0069] Among them, the output method includes a message queue method or a log method. The abnormal chain data includes a minimum value, a corresponding abnormal link linear path, and a corresponding abnormal link tracking identifier. Specifically, when the server 204 identifies the output method of the abnormal chain data, it selects the operation and determines the output method; then, when it identifies that the output method is a message queue method, the minimum value, the abnormal link linear path corresponding to the minimum value, and the abnormal link tracking identifier corresponding to the minimum value are output to the storage system via the message queue method for storage, thereby improving the convenience and efficiency of troubleshooting the fault source application system.
[0070] In a specific example, message queues include Apache Kafka and RabbitMQ. Storage systems include MySQL, Cassandra, Elasticsearch, and SLS. The above are only specific examples. In actual applications, flexible settings can be made based on user needs and are not limited here.
[0071] In this embodiment, in response to selecting an output method for abnormal chain data, the output method is determined; then, in response to the output method being a message queue method, the minimum value, the corresponding abnormal link linear path, and the corresponding abnormal link tracking identifier are output to the storage system through the message queue method for storage, thereby improving the convenience and efficiency of troubleshooting the fault source application system.
[0072] In one embodiment, Figure 6 As shown, the method further includes step 603.
[0073] Step 603 : In response to the output mode being the log mode, the minimum value, the corresponding abnormal link linear path, and the corresponding abnormal link tracking identifier are output to the storage system in the log mode for storage.
[0074] Specifically, when server 204 recognizes that the output mode is log mode, it outputs the minimum value, the corresponding abnormal link linear path and the corresponding abnormal link tracking identifier to the storage system for storage via log mode, thereby improving the convenience and efficiency of troubleshooting the fault source application system.
[0075] In this embodiment, in response to the output mode being a log mode, the minimum value, the corresponding abnormal link linear path and the corresponding abnormal link tracking identifier are output to the storage system via a log mode for storage, thereby improving the convenience and efficiency of troubleshooting the fault source application system.
[0076] In one embodiment, Figure 7 As shown, the method further includes steps 701 to 703.
[0077] Step 701 : In response to a query operation performed in a storage system according to a target abnormal link tracking identifier, a minimum value corresponding to a target abnormal link linear path and the target abnormal link tracking identifier is determined.
[0078] The target abnormal link linear path is the abnormal link linear path corresponding to the target abnormal link tracking identifier. Specifically, when the server 204 identifies that a query operation is performed in the storage system according to the target abnormal link tracking identifier, it determines the minimum value corresponding to the target abnormal link linear path and the target abnormal link tracking identifier.
[0079] Step 702 : Position the target abnormal link linear path according to the minimum value corresponding to the target abnormal link tracking identifier to obtain the target abnormal node.
[0080] The target abnormal node is the abnormal node corresponding to the minimum value corresponding to the target abnormal link tracking identifier. The server 204 locates the target abnormal link linear path according to the minimum value corresponding to the target abnormal link tracking identifier to obtain the target abnormal node.
[0081] Step 703: Determine the fault source application system based on the business sub-application system corresponding to the target abnormal node.
[0082] Specifically, server 204 determines the fault source application system based on the business sub-application system corresponding to the target abnormal node, which reduces the troubleshooting cost and consumed resources, improves the efficiency and accuracy of troubleshooting the fault source application system, and can avoid the inability to locate the fault source system due to data loss.
[0083] In this embodiment, in response to a query operation in the storage system based on the target abnormal link tracking identifier, the minimum value corresponding to the target abnormal link linear path and the target abnormal link tracking identifier is determined; then, the target abnormal link linear path is located according to the minimum value corresponding to the target abnormal link tracking identifier to obtain the target abnormal node; then, the business sub-application system corresponding to the target abnormal node is determined as the fault source application system, which reduces the troubleshooting cost and consumed resources, improves the efficiency and accuracy of the fault source application system troubleshooting, and can avoid the inability to locate the fault source system due to data loss.
[0084] In one embodiment, Figure 8 As shown, according to the minimum value corresponding to the target abnormal link tracking identifier, positioning is performed on the corresponding abnormal link linear path to obtain the target abnormal node, including steps 801 to 802.
[0085] Step 801 : sequentially compare the abnormal node sequence number corresponding to each abnormal node in the target abnormal link linear path with the minimum value corresponding to the target abnormal link tracking identifier to obtain a comparison result.
[0086] Step 802: If the comparison result is the same, the abnormal node of the target abnormal link linear path corresponding to the comparison result is determined as the target abnormal node.
[0087] The comparison result is identical or different. Server 204 sequentially compares the abnormal node sequence number corresponding to each abnormal node in the target abnormal link linear path with the minimum value corresponding to the target abnormal link tracking identifier to obtain a comparison result. Then, if the comparison result is identical, the abnormal node in the target abnormal link linear path corresponding to the comparison result is determined as the target abnormal node, thereby improving the efficiency and convenience of obtaining the target abnormal node.
[0088] In this embodiment, the abnormal node serial number corresponding to each abnormal node in the linear path of the target abnormal link is compared with the minimum value corresponding to the target abnormal link tracking identifier in turn to obtain a comparison result; then, if the comparison result is the same, the abnormal node in the linear path of the target abnormal link corresponding to the comparison result is determined as the target abnormal node, thereby improving the efficiency and convenience of obtaining the target abnormal node.
[0089] In one embodiment, Figure 9 As shown, the method further includes step 901.
[0090] Step 901, in response to the business processing result being successful, updates the current node to the next downstream node, and returns to the step of determining the call link tree path according to the target link tree tracking identifier, and processing the business request according to the call link tree path and the current node to obtain the business processing result of the current node.
[0091] Specifically, when the server 204 recognizes that the business processing result is successful, it updates the current node to the next downstream node, and returns to the step of determining the call link tree path according to the target link tree tracking identifier, and processing the business request according to the call link tree path and the current node to obtain the business processing result of the current node, thereby improving the efficiency and convenience of business processing and fault source application system troubleshooting.
[0092] In this embodiment, in response to the business processing result being a successful business processing, the current node is updated to the next downstream node, and the process returns to the step of determining the call link tree path based on the target link tree tracking identifier, and processing the business request based on the call link tree path and the current node to obtain the business processing result of the current node, thereby improving the efficiency and convenience of business processing and fault source application system troubleshooting.
[0093] It should be understood that although Figure 3-Figure 4 as well as Figure 6-Figure 9 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 3-Figure 4 as well as Figure 6-Figure 9 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0094] Second, as Figure 10 As shown, a device for troubleshooting a fault source application system is provided, which includes a request receiving module 1010 , a request processing module 1020 and a fault source troubleshooting module 1030 .
[0095] Among them, the request receiving module 1010 is used to obtain the target link tree tracking identifier corresponding to the business request in response to receiving the business request; wherein, the target link tree tracking identifier is used to represent the call link tree path of the application system call relationship regarding the output business request; each node in the call link tree represents a business sub-application system; the request processing module 1020 is used to determine the call link tree path according to the target link tree tracking identifier, and obtain the business processing result of the current node after processing the business request according to the call link tree path and the current node; the business processing result includes successful business processing or abnormal business processing; the fault source investigation module 1030 is used to record the current node as an abnormal node in response to the business processing result being an abnormal business processing, and generate the minimum value of the abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier according to the abnormal node; wherein the abnormal link tracking identifier is used to represent the abnormal link linear path of the application system call relationship regarding the return of the business processing result.
[0096] In one embodiment, the fault source troubleshooting module 1030 includes an abnormal link tracking identifier generating unit.
[0097] Among them, the abnormal link tracking identifier generation unit is used to generate the minimum value of the corresponding abnormal node serial number according to the abnormal node; the abnormal link tracking identifier generation unit is used to respond to the abnormal node not being the starting node of the call link tree path, return the business processing result to the corresponding previous upstream node according to the abnormal node, update the abnormal node to the previous upstream node, and increment the abnormal node serial number by 1; the abnormal link tracking identifier generation unit is used to respond to the abnormal node being the starting node of the call link tree path, generate the corresponding abnormal link linear path according to each abnormal node and the corresponding abnormal node serial number, and randomly generate the corresponding abnormal link tracking identifier according to the abnormal link linear path.
[0098] In one embodiment, the device includes a storage module.
[0099] Among them, the storage module is used to determine the output method in response to the selection operation of the output method of the abnormal chain data; the output method includes a message queue method or a log method; the storage module is used to output the minimum value, the corresponding abnormal link linear path and the corresponding abnormal link tracking identifier to the storage system through the message queue method for storage in response to the output method being the message queue method.
[0100] In one embodiment, the storage module is configured to output the minimum value, the corresponding abnormal link linear path, and the corresponding abnormal link tracking identifier to the storage system in a log manner for storage in response to the output mode being a log mode.
[0101] In one embodiment, the method further includes a fault source application system query module.
[0102] Among them, the fault source application system query module is used to respond to the query operation in the storage system according to the target abnormal link tracking identifier, determine the minimum value corresponding to the target abnormal link linear path and the target abnormal link tracking identifier; the target abnormal link linear path is the abnormal link linear path corresponding to the target abnormal link tracking identifier; the fault source application system query module is used to locate the target abnormal link linear path according to the minimum value corresponding to the target abnormal link tracking identifier, and obtain the target abnormal node; the target abnormal node is the abnormal node corresponding to the minimum value corresponding to the target abnormal link tracking identifier; the fault source application system query module is used to determine the business sub-application system corresponding to the target abnormal node as the fault source application system.
[0103] In one embodiment, the fault source application system query module includes a target abnormal node determination unit.
[0104] Among them, the target abnormal node determination unit is used to compare the abnormal node serial number corresponding to each abnormal node in the linear path of the target abnormal link with the minimum value corresponding to the target abnormal link tracking identifier in turn to obtain a comparison result; the comparison result is the same or different; the target abnormal node determination unit is used to determine the abnormal node in the linear path of the target abnormal link corresponding to the comparison result as the target abnormal node if the comparison result is the same.
[0105] In one of the embodiments, the apparatus further includes a current node update module.
[0106] Among them, the current node update module is used to update the current node to the next downstream node in response to the business processing result being successful, and return to the step of determining the call link tree path according to the target link tree tracking identifier, and processing the business request according to the call link tree path and the current node to obtain the business processing result of the current node.
[0107] The specific limitations of the fault source application system troubleshooting device can be found in the limitations of the fault source application system troubleshooting method described above and will not be repeated here. Each module in the aforementioned fault source application system troubleshooting device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the aforementioned modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so that the processor can call and execute the corresponding operations of each of the aforementioned modules.
[0108] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 11 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the minimum value of the abnormal node sequence number corresponding to the abnormal node and the corresponding abnormal link tracking identifier. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for troubleshooting a fault source application system is implemented.
[0109] Those skilled in the art will understand that Figure 11The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0110] In a third aspect, a computer device is provided, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any method in the above method embodiments are implemented.
[0111] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any method in the above method embodiments are implemented.
[0112] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0113] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for troubleshooting a fault source application system, the method comprising: In response to receiving a service request, obtaining a target link tree tracing identifier corresponding to the service request; wherein the target link tree tracing identifier is used to represent a call link tree path of a call relationship of an application system that outputs the service request; each node in the call link tree represents a service sub-application system; Determine the call link tree path according to the target link tree tracing identifier, and process the service request according to the call link tree path and the current node to obtain a service processing result of the current node; the service processing result includes a service processing success or a service processing exception; In response to the business processing result being the business processing exception, recording the current node as an abnormal node, and generating a minimum value of an abnormal node sequence number corresponding to the abnormal node and a corresponding abnormal link tracking identifier based on the abnormal node; wherein the abnormal link tracking identifier is used to represent an abnormal link linear path related to the application system call relationship that returns the business processing result; The step of generating, according to the abnormal node, a minimum value of an abnormal node sequence number corresponding to the abnormal node and a corresponding abnormal link tracking identifier includes: Generating a minimum value of the abnormal node sequence number corresponding to the abnormal node according to the abnormal node; In response to the abnormal node not being the starting node of the call link tree path, returning the business processing result to the corresponding previous upstream node according to the abnormal node, updating the abnormal node to the previous upstream node, and incrementing the abnormal node sequence number by 1; In response to the abnormal node being the starting node of the call link tree path, a corresponding abnormal link linear path is generated according to each abnormal node and the corresponding abnormal node sequence number, and a corresponding abnormal link tracking identifier is randomly generated according to the abnormal link linear path.
2. The method according to claim 1, characterized in that The method comprises: In response to selecting an output mode for the abnormal chain data, determining the output mode; the output mode includes a message queue mode or a log mode; In response to the output mode being the message queue mode, the minimum value, the corresponding abnormal link linear path, and the corresponding abnormal link tracking identifier are output to a storage system through the message queue mode for storage.
3. The method according to claim 2, characterized in that The method further comprises: In response to the output mode being the log mode, the minimum value, the corresponding abnormal link linear path, and the corresponding abnormal link tracking identifier are output to the storage system in the log mode for storage.
4. The method according to claim 2, characterized in that The method further comprises: In response to performing a query operation in the storage system according to the target abnormal link tracking identifier, determining the minimum value corresponding to the target abnormal link linear path and the target abnormal link tracking identifier; the target abnormal link linear path is the abnormal link linear path corresponding to the target abnormal link tracking identifier; Locating a target abnormal node on the target abnormal link linear path according to the minimum value corresponding to the target abnormal link tracking identifier; the target abnormal node is the abnormal node corresponding to the minimum value corresponding to the target abnormal link tracking identifier; The business sub-application system corresponding to the target abnormal node is determined as the fault source application system.
5. The method according to claim 4, characterized in that The step of locating the target abnormal link linear path according to the minimum value corresponding to the target abnormal link tracking identifier to obtain the target abnormal node includes: Sequentially comparing the abnormal node sequence number corresponding to each abnormal node in the target abnormal link linear path with the minimum value corresponding to the target abnormal link tracking identifier to obtain a comparison result; the comparison result is identical or different; If the comparison result is the same, the abnormal node of the target abnormal link linear path corresponding to the comparison result is determined as the target abnormal node.
6. The method according to claim 1, characterized in that The method further comprises: In response to the business processing result being that the business processing is successful, the current node is updated to the next downstream node, and the process returns to the step of determining the call link tree path according to the target link tree tracking identifier, and processing the business request according to the call link tree path and the current node to obtain the business processing result of the current node.
7. A device for troubleshooting a fault source application system, characterized in that: The device comprises: a request receiving module, configured to, in response to receiving a service request, obtain a target link tree tracing identifier corresponding to the service request; wherein the target link tree tracing identifier is used to represent a call link tree path of a call relationship of an application system that outputs the service request; each node in the call link tree represents a service sub-application system; a request processing module, configured to determine the call link tree path according to the target link tree tracing identifier, and process the service request according to the call link tree path and the current node to obtain a service processing result of the current node; the service processing result includes a service processing success or a service processing exception; a fault source troubleshooting module, configured to, in response to the business processing result being the business processing abnormality, record the current node as an abnormal node, and generate, based on the abnormal node, a minimum abnormal node sequence number corresponding to the abnormal node and a corresponding abnormal link tracking identifier; wherein the abnormal link tracking identifier is used to represent an abnormal link linear path related to the application system call relationship that returns the business processing result; Among them, the fault source investigation module includes an abnormal link tracking identifier generation unit; the abnormal link tracking identifier generation unit is used to generate the corresponding minimum value of the abnormal node sequence number according to the abnormal node; the abnormal link tracking identifier generation unit is used to respond to the abnormal node not being the starting node of the call link tree path, return the business processing result to the corresponding previous upstream node according to the abnormal node, update the abnormal node to the previous upstream node, and increment the abnormal node sequence number by 1; the abnormal link tracking identifier generation unit is used to respond to the abnormal node being the starting node of the call link tree path, generate the corresponding abnormal link linear path according to each abnormal node and the corresponding abnormal node sequence number, and randomly generate the corresponding abnormal link tracking identifier according to the abnormal link linear path.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Link tracking system, method and device
CN115664994A
Link tracking method and system
CN117221098A