Business exception processing method and device
By obtaining and matching business exception information and call chain information, the abnormal alarm information is automatically generated, which solves the problem of labor-intensive and low efficiency in the existing technology, and achieves efficient exception handling and system stability improvement.
Patent Information
- Application Number
- CN202111034526.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-03
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-09-03
AI Technical Summary
In the prior art, business exception handling is labor-intensive and inefficient, which requires long-term search and resolution of problems when system abnormalities are caused, affecting the stability and availability of online services.
By obtaining the business exception information and call chain information thrown by each service node during the business processing process, matching the preset exception information database and processing method database, and automatically generating exception alarm information for easier exception processing.
It realizes automation of business exception handling, improves processing efficiency and accuracy in solving exceptions, reduces manual intervention, and improves the stability and availability of the system.
Smart Images

Figure CN113806169B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method and device for handling business exceptions. Background Art
[0002] At present, large-scale software backend services are gradually being microserviced to improve performance and availability. The dependencies between microservices are complex, and the cross-process service call chain is getting longer. If a server node process fails, it will cause all layers of services that depend on this server node to fail at the same time. At this time, in order to suppress the alarm storm, it is necessary to find the root node of the error and aggregate the alarm information.
[0003] In the prior art, when an abnormality occurs in the system, relevant personnel (such as programmers) are usually required to find and analyze the root cause of the error and find a solution, which is not only time-consuming but also affects the stability and availability of online services. Therefore, an efficient and intelligent error correction and problem solving mechanism is urgently needed. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method and device for handling business exceptions, so as to solve the problem that the existing business exception handling is labor-intensive and inefficient.
[0005] To solve the above technical problems, the embodiments of the present application are implemented as follows:
[0006] On the one hand, an embodiment of the present application provides a service exception processing method, which is applied to an abnormal alarm device, and the method includes:
[0007] Acquire the exception information to be analyzed corresponding to the business processing; the exception information to be analyzed is generated based on the business exception information thrown by each service node during the business processing; the exception information to be analyzed includes the business exception information and the call chain information corresponding to each of the business exception information;
[0008] Matching the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process; the abnormal information library includes multiple abnormal keywords;
[0009] Matching the abnormal keyword to be analyzed with a preset abnormal processing method library to match a target processing method corresponding to the abnormal keyword to be analyzed; the abnormal processing method library includes the abnormal processing methods corresponding to each of the abnormal keywords;
[0010] Exception alarm information corresponding to the business processing is issued so that the exception handling party performs business exception processing based on the exception alarm information; the exception alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0011] On the other hand, an embodiment of the present application provides a service exception processing method, which is applied to a service cluster, and the method includes:
[0012] Perform business processing according to the received business processing request; during the business processing, if it is detected that an abnormality occurs in the service node corresponding to the business processing, obtain business abnormality information corresponding to the service node;
[0013] Determine the call chain information corresponding to the business processing; the call chain information includes the call relationship between each of the service nodes in the business processing process;
[0014] Generate the to-be-analyzed exception information corresponding to the business process according to the call chain information and the business exception information;
[0015] The exception information to be analyzed is sent to the exception alarm device, so that the exception alarm device determines the target processing method corresponding to the business exception information according to the exception information to be analyzed, and sends the exception alarm information corresponding to the business processing to the exception processing party; the exception alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0016] On the other hand, an embodiment of the present application provides a service exception processing device, which is applied to an abnormal alarm device, and the device includes:
[0017] A first acquisition module is used to acquire the to-be-analyzed exception information corresponding to the business processing; the to-be-analyzed exception information is generated based on the business exception information thrown by each service node during the business processing; the to-be-analyzed exception information includes the business exception information and the call chain information corresponding to each of the business exception information;
[0018] A first determination module is used to match the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process; the abnormal information library includes a plurality of abnormal keywords;
[0019] A matching module, used for matching the abnormal keyword to be analyzed with a preset abnormal processing method library to match a target processing method corresponding to the abnormal keyword to be analyzed; the abnormal processing method library includes abnormal processing methods corresponding to each of the abnormal keywords;
[0020] An alarm module is used to issue abnormal alarm information corresponding to the business processing, so that the exception handling party performs business exception processing based on the abnormal alarm information; the abnormal alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0021] On the other hand, an embodiment of the present application provides a service exception processing device, which is applied to a service cluster, and the device includes:
[0022] A second acquisition module is used to perform business processing according to the received business processing request; during the business processing, if it is monitored that an abnormality occurs in the service node corresponding to the business processing, then the business abnormality information corresponding to the service node is obtained;
[0023] A second determination module is used to determine the call chain information corresponding to the business processing; the call chain information includes the call relationship between each of the service nodes in the business processing process;
[0024] A first generating module, configured to generate the to-be-analyzed exception information corresponding to the business processing according to the call chain information and the business exception information;
[0025] A sending module is used to send the exception information to be analyzed to an exception alarm device, so that the exception alarm device determines the target processing method corresponding to the business exception information according to the exception information to be analyzed, and sends the exception alarm information corresponding to the business processing to the exception processing party; the exception alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0026] On the other hand, an embodiment of the present application provides a business exception handling device, including a processor and a memory electrically connected to the processor, the memory storing a computer program, and the processor being used to call and execute the computer program from the memory to implement the business exception handling method as described in any of the above aspects.
[0027] On the other hand, an embodiment of the present application provides a storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the service exception handling method as described in any of the above aspects.
[0028] Adopt the technical scheme of the embodiment of the present application, by obtaining the abnormal information to be analyzed corresponding to the business processing, the abnormal information to be analyzed is generated based on the business abnormal information thrown by each service node in the business processing process, including the business abnormal information and the call chain information corresponding to each business abnormal information; the abnormal information to be analyzed is matched with the preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business processing, and then the target processing method is matched according to the abnormal keyword to be analyzed and the preset abnormal processing method library. It can be seen that the technical scheme makes the processing process of business exceptions no longer rely on manual labor, and realizes the automation of business exception processing. In addition, by issuing the abnormal warning information corresponding to the business processing, the abnormal warning information includes at least one of the business abnormal information, call chain information, and target processing method, so that the abnormal situation in the business processing process can be intuitively displayed to the abnormal processing party, so as to facilitate the abnormal processing party to perform business exception processing based on the abnormal warning information, improve the efficiency of business exception processing and the accuracy of solving abnormalities. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 is a schematic structural diagram of a business exception handling system according to an embodiment of the present application;
[0031] Figure 2 is a schematic flow chart of a method for handling business exceptions according to an embodiment of the present application;
[0032] Figure 3 is a schematic flow chart of a method for handling business exceptions according to another embodiment of the present application;
[0033] Figure 4 is a schematic flow chart of a method for handling business exceptions according to yet another embodiment of the present application;
[0034] Figure 5 and Figure 6 This is a schematic diagram of a calling relationship between service nodes in a service cluster according to an embodiment of the present application;
[0035] Figure 7 and Figure 8 This is a schematic interface diagram of abnormal information to be analyzed in a business abnormality processing method according to an embodiment of the present application;
[0036] Fig. 9 is a schematic block diagram of a service exception processing device according to an embodiment of the present application;
[0037] Fig.10 is a schematic block diagram of a service exception processing device according to another embodiment of the present application;
[0038] Fig.11 It is a schematic block diagram of a service exception handling device according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] The embodiments of the present application provide a method and device for handling business exceptions, so as to solve the problem that the existing business exception handling is labor-intensive and inefficient.
[0040] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0041] A business exception handling method provided in an embodiment of the present application is applied to a business exception handling system. Figure 1 is a schematic structural diagram of a business exception handling system according to an embodiment of the present application, such as Figure 1 As shown, the business exception handling system includes a service cluster 10 and an abnormal alarm device 20, and the service cluster 10 includes multiple service nodes. Among them, the service cluster 10 is used to perform corresponding business processing when receiving a business processing request, and capture business exception information when an abnormal situation occurs during the business processing, and process the business exception information into abnormal information to be analyzed including business exception information and call chain information between each service node of the business processing. Then send the abnormal information to be analyzed to the abnormal alarm device 20. The abnormal alarm device 20 is used to analyze the received abnormal information to be analyzed to analyze the target processing method corresponding to the business abnormal information, and issue abnormal alarm information including at least one of the business abnormal information, call chain information, and target processing method, so that the abnormal processing method can perform business abnormal processing based on the abnormal alarm information. Through the interaction between the service cluster 10 and the abnormal alarm device 20, the automation of business exception processing is realized, and the efficiency of business exception processing is improved.
[0042] Figure 2 is a schematic flow chart of a method for handling business exceptions according to an embodiment of the present application, the method is applied to Figure 1 The abnormal alarm equipment shown, such as Figure 2 As shown, the business exception processing includes the following steps S202-S208:
[0043] S202, obtaining the exception information to be analyzed corresponding to the business processing; wherein the exception information to be analyzed is generated based on the business exception information thrown by each service node during the business processing, including the business exception information and the call chain information corresponding to each business exception information.
[0044] The abnormal information to be analyzed corresponding to the business processing is sent by the service cluster, which includes multiple service nodes. The service nodes in the service cluster monitor the business processing status in real time during the business processing process. When an abnormality is detected during the business processing process, the service abnormality information is thrown out, and the business abnormality information is processed into abnormal information to be analyzed and sent to the abnormal alarm device. The service cluster can directly send the abnormal information to be analyzed to the abnormal alarm device, or forward the abnormal information to be analyzed to the abnormal alarm device through an intermediate device. The intermediate device is, for example, a kafka server.
[0045] S204, matching the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process; the abnormal information library includes a plurality of abnormal keywords.
[0046] Among them, multiple abnormal keywords in the abnormal information library can be pre-set according to the experience of technical personnel, such as too many connections in the connection pool, Java virtual machine memory overflow, file not found, etc. These abnormal keywords can be divided into computer hardware class, Java local method class, web container class, database class, cache class, middleware class, third-party library class, etc. according to the abnormal type, so as to reflect the abnormal type corresponding to the business abnormal information. For example, the computer hardware class can include subtypes such as memory problems, disk problems, and network problems; the database class can include subtypes such as deadlock problems, database connection pool problems, and slow query problems.
[0047] In addition, if the exception type is a software method class, the exception keyword may also correspond to a dependent package. By matching the exception information library, the dependent package corresponding to the exception information to be analyzed can be matched, so as to know which (some) dependent packages have an exception. The data structure of the exception information library will be described in detail in the following embodiments and will not be repeated here.
[0048] In one embodiment, the dependent package can also be stored separately in a library, such as a dependent package matching library. In this way, when matching the exception information library, the dependent package matching library can be matched at the same time. Not only can the exception keywords corresponding to the exception information to be analyzed be matched through the exception information library, but also the dependent package where the exception occurs can be matched through the dependent package matching library.
[0049] S206, matching the abnormal keyword to be analyzed with a preset abnormal processing method library to match a target processing method corresponding to the abnormal keyword to be analyzed; the abnormal processing method library includes abnormal processing methods corresponding to each abnormal keyword.
[0050] Among them, the exception handling methods included in the exception handling method library can be preset according to the experience of the technicians, and one type of business exception information can correspond to multiple exception handling methods, that is, the same exception keyword can correspond to multiple exception handling methods. The data structure of the exception handling method library will be described in detail in the following embodiments and will not be repeated here.
[0051] S208, issuing abnormal warning information corresponding to the business processing, so that the abnormal processing party performs business abnormal processing based on the abnormal warning information; the abnormal warning information includes at least one of the business abnormality information, call chain information, and target processing method.
[0052] Among them, the exception handler can be an authorized technical personnel. By sending exception alarm information to the exception handler, the exception handler can intuitively see the detailed exception information in the business processing process, thereby facilitating the processing and maintenance of business exceptions.
[0053] Adopt the technical scheme of the embodiment of the present application, by obtaining the abnormal information to be analyzed corresponding to the business processing, the abnormal information to be analyzed is generated based on the business abnormal information thrown by each service node in the business processing process, including the business abnormal information and the call chain information corresponding to each business abnormal information; the business abnormal information is matched with the preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business processing, and then the target processing method is matched according to the abnormal keyword to be analyzed and the preset abnormal processing method library. It can be seen that the technical scheme makes the processing process of business exceptions no longer rely on manual work, and realizes the automation of business exception processing. In addition, by issuing the abnormal warning information corresponding to the business processing, the abnormal warning information includes at least one of the business abnormal information, call chain information, and target processing method, so that the abnormal situation in the business processing process can be intuitively displayed to the abnormal processing party, so as to facilitate the abnormal processing party to perform business abnormal processing based on the abnormal warning information, improve the efficiency of business abnormal processing and the accuracy of solving abnormalities.
[0054] The following first introduces the abnormal information analysis library that needs to be established in advance. The abnormal information analysis library at least includes the abnormal information library and the abnormal processing method library described in the above embodiment. In addition, it can also include a dependent package matching library.
[0055] In one embodiment, multiple exception keywords in the exception information library are used to reflect the exception type of the business exception information, such as too many connections in the connection pool, Java virtual machine memory overflow, file not found, etc. For example, the data structure of the exception information library can be represented as follows:
[0056]
[0057] It can be seen from the above structure that the abnormal keywords in the abnormal information library can be divided according to the abnormal types of different dimensions. For example, since the cause of the business abnormality may be an abnormality in the database or the Java virtual machine, from this dimension, the abnormal keywords of the database and the Java virtual machine can be divided into two categories. In the Java virtual machine category, it can be more specifically divided into two categories of abnormal keywords: memory and file; further, in the memory category, it can include abnormal keywords such as "memory overflow" and "stack overflow"; in the file category, it can include abnormal keywords such as "file not found".
[0058] In one embodiment, the data structure of the exception handling method library can be an array, and the array elements are key-value pairs, the key is the value of the exception handling method library, and the value is the exception handling method. Considering that there can be multiple exception handling methods for the same exception situation, the value of the exception handling method library can also be a data structure. An example of the data structure of an exception handling method library is as follows:
[0059] [{“Too many connections”:[{“Solution 1”:“Solution content”},{“Solution 2”:“Solution content 2 reference link”}]},
[0060] {“Memory overflow”:[{“Solution 1”:“Solution content”},{“Solution 2”:“Solution content 2 reference link”}]},
[0061] {"Stack Overflow":[{"Solution 1":"Solution content"},{"Solution 2":"Solution content 2 reference link"}]},
[0062] {"File not found":[{"Solution 1":"Solution content"},{"Solution 2":"Solution content 2 reference link"}]} ]
[0064] It can be seen from the above data structure that for any of the listed exception keywords, there are two corresponding exception handling methods, namely "solution 1" and "solution 2".
[0065] In one embodiment, the abnormal information to be analyzed also includes business identification information corresponding to the business processing. Optionally, when receiving a business processing request, the service node allocates unique business identification information to the business processing request, and when processing the business identification information into abnormal information to be analyzed, carries the business identification information in the abnormal information to be analyzed and sends it to the abnormal alarm device.
[0066] The service node may randomly assign unique service identification information to each service processing request, for example, using a distributed unique ID generation algorithm (such as a snowflake algorithm) to generate a unique ID for each service processing request.
[0067] In this embodiment, after obtaining the exception information to be analyzed corresponding to the business processing, if the business identification information corresponds to multiple business exception information, and each business exception information corresponds to a call chain information, then the target call chain information with the longest call chain is filtered out from the multiple call chain information, and the business exception information corresponding to the target call chain information is matched with the exception information library.
[0068] Alternatively, after filtering out the target call chain information with the longest call chain, the business exception information corresponding to the target call chain information and other call chain information can be matched with the exception information library to determine the exception keyword to be analyzed corresponding to the exception information to be analyzed. By matching all business exception information in the exception information to be analyzed with the exception information library, the matched exception keywords can be made more complete and accurate, and thus a more accurate exception solution can be analyzed.
[0069] In one embodiment, the abnormal alarm information also includes node information of the root cause abnormal node. The last called service node in the service node call chain can be determined based on the call chain information as the root cause abnormal node corresponding to the business processing. When the abnormal alarm information is issued, the node information of the root cause abnormal node is carried in the abnormal alarm information.
[0070] If there are multiple business exception information corresponding to the same business identification information, and each business exception information corresponds to a call chain information, the target call chain information with the longest call chain is first screened out, and based on the target call chain information, the last called service node in the call chain is determined as the root cause exception node corresponding to the business processing. When the abnormal alarm information is issued, the node information of the root cause exception node is carried in the abnormal alarm information.
[0071] In this embodiment, by determining the root cause abnormal node corresponding to the business processing, and using the root cause abnormal node as a part of the abnormal alarm information for alarm, the abnormal processing party can intuitively know the root cause abnormal node that causes the business abnormality, thereby solving the business abnormality problem from the source.
[0072] In one embodiment, if abnormal information to be analyzed corresponding to multiple business identification information is obtained within a preset time length, it is determined whether the root cause abnormal nodes corresponding to each business identification information are the same; if there are multiple business identification information corresponding to the same root cause abnormal node, only one abnormal alarm information is issued for multiple business identification information with the same root cause abnormal node.
[0073] In this embodiment, in order to avoid frequent abnormal alarms for the same service node in a short period of time, the preset duration can be set to a shorter time, such as 1 second. Assuming that multiple abnormal information to be analyzed corresponding to the business identification information is obtained within 1 second, and by analyzing the abnormal information to be analyzed, it is determined that the multiple abnormal information to be analyzed corresponds to the same root cause abnormal node, that is, the root cause abnormal node causing the abnormality of multiple business processing is the same, then only one abnormal alarm is executed for the multiple abnormal information to be analyzed.
[0074] Figure 3 is a schematic flow chart of a method for handling business exceptions according to another embodiment of the present application, the method is applied to Figure 1 The service cluster shown. Figure 3 As shown, the business exception processing includes the following steps S302-S308:
[0075] S302, performing business processing according to the received business processing request; during the business processing, if it is monitored that an abnormality occurs in a service node corresponding to the business processing, obtaining business abnormality information corresponding to the service node.
[0076] The service nodes in the service cluster monitor the service processing status in real time during the service processing, and throw out service exception information when an exception is detected during the service processing. The service cluster may include a service node for capturing service exception information, and the service node captures the monitored service exception information when any service node is detected to throw out service exception information.
[0077] S304, determining the call chain information corresponding to the business processing; the call chain information includes the call relationship between each service node in the business processing process.
[0078] S306: Generate to-be-analyzed exception information corresponding to the business process according to the call chain information and the business exception information.
[0079] The service cluster may include a service node for generating the abnormal information to be analyzed, and the service node may be the same as or different from the service node for capturing the business abnormal information, which is not limited in this embodiment. After obtaining the business abnormal information, the service node determines the call chain information corresponding to the business processing according to the service node call relationship monitored during the business processing. Then, the call chain information is added to the text header of the business abnormal information to obtain the abnormal information to be analyzed.
[0080] For example, during business processing, the calling relationship between the service nodes is that service node A calls service node B, and then service node B calls service node C. The call chain information corresponding to the business processing is A→B→C, where the arrow “→” represents the calling relationship.
[0081] In one embodiment, in order to uniformly capture and collect business exception information and facilitate subsequent unified analysis of business exception information, service nodes can uniformly capture business exception information through spring aop aspect-oriented programming, or java dynamic proxy, bytecode injection and other technologies, and process the service node call relationship into a linked list form (i.e., call chain), and then send it to the abnormal alarm device. In addition, by uniformly capturing and collecting business exception information, there is no need to intrude the business itself, which greatly reduces the cost of business exception processing.
[0082] S308, sending the exception information to be analyzed to the exception alarm device, so that the exception alarm device determines the target processing method corresponding to the business exception information according to the exception information to be analyzed, and sends the exception alarm information corresponding to the business processing to the exception processing party; the exception alarm information includes at least one of the business exception information, call chain information, and target processing method.
[0083] In this step, after generating the abnormal information to be analyzed, the service node for generating the abnormal information to be analyzed may directly send the abnormal information to be analyzed to the abnormal alarm device, or forward the abnormal information to be analyzed to the abnormal alarm device through an intermediate device. The intermediate device is, for example, a kafka server. The method of forwarding the abnormal information to be analyzed using the kafka server will be described in detail in the following embodiments and will not be repeated here.
[0084] The technical solution of the embodiment of the present application is adopted. During the business processing, if an abnormality occurs in the service node corresponding to the business processing, the business abnormality information corresponding to the service node is obtained, and the call chain information corresponding to the business processing is determined; then, according to the call chain information and the business abnormality information, the abnormal information to be analyzed corresponding to the business processing is generated, and the abnormal information to be analyzed is sent to the abnormal alarm device, so that the abnormal alarm device analyzes the target processing method corresponding to the business abnormality information according to the abnormal information to be analyzed. It can be seen that the technical solution makes the processing process of business abnormality no longer rely on manual labor, and realizes the automation of business abnormality processing. In addition, by sending the abnormal information to be analyzed to the abnormal alarm device, the abnormal alarm device issues the abnormal alarm information corresponding to the business processing, and the abnormal alarm information includes at least one of the business abnormality information, the call chain information, and the target processing method, so that the abnormal situation in the business processing process can be intuitively displayed to the abnormal handling party, so as to facilitate the abnormal handling party to perform business abnormality processing based on the abnormal alarm information, improve the efficiency of business abnormality processing and the accuracy of solving abnormalities.
[0085] In one embodiment, the service cluster forwards the abnormal information to be analyzed to the abnormal alarm device through the intermediate device. For example, you can use spring's aspectj aspect-oriented programming to define method entry points, intercept all public modified methods, and after the intercepted method is executed, if it is detected that the business abnormal information is thrown, the business information abnormality is extracted and processed, and the kafka producer API (Application Programming Interface) is called to send the abnormal information to be analyzed to the kafka server, and the kafka server sends the abnormal information to be analyzed to the abnormal alarm device.
[0086] Specifically, first define the Kafka producer, including defining the address list of the Kafka server (such as connection and port), client ID, and Kafka-related codec configuration information. Then define the aspect to intercept the exception information in the method. For example, use the @Aspect annotation to define the aspect, and use the @AfterTrowing annotation to intercept and obtain the business exception information after the method execution throws the business exception information. Among them, defining the Kafka producer and defining the aspect are both existing technologies and will not be described in detail here.
[0087] In one embodiment, when a service node receives a service processing request, it first generates service identification information corresponding to the service processing. During the service processing process, when a service node calls other service nodes based on the service processing request, the service identification information can be carried in the call protocol header. For example, if a service node uses the HTTP protocol to access other service nodes, the request ID (i.e., service identification information) is placed in the request header REQ-ID of the HTTP protocol, and the node IP of the service node itself is placed in the request header INVOKE-CHAIN.
[0088] In this embodiment, when generating the to-be-analyzed abnormal information corresponding to the business processing according to the call chain information and the business abnormal information, if the business abnormal information corresponding to multiple business identification information is obtained, then the to-be-analyzed abnormal information corresponding to each business identification information is generated respectively according to the mutually corresponding business identification information, the call chain information and the business abnormal information. The to-be-analyzed abnormal information includes at least one of the business identification information, the call chain information and the business abnormal information.
[0089] In one embodiment, after generating the exception information to be analyzed corresponding to the business processing based on the call chain information and the business exception information, the exception information to be analyzed can be converted into a specified format; the specified format is matched with the exception keywords included in the preset exception information library, so that the exception alarm device matches the exception keywords included in the exception information to be analyzed according to the exception information library.
[0090] In this embodiment, the specified format may be a text format. Since the specified format matches the exception keyword included in the exception information library, the exception keyword is also in text format. The service cluster may print the exception information to be analyzed to the string output stream StringWriter, and then call the toString method on the string input stream to convert it into a string, thereby converting the exception information to be analyzed into a text format.
[0091] Figure 4 FIG. 1 is a schematic flow chart of a method for handling business exceptions according to another embodiment of the present application. In this embodiment, the method for handling business exceptions is applied to Figure 1 In the service exception handling system shown in the figure, the service exception handling process is completed through the interaction between the service cluster and the exception alarm device. Figure 4 As shown, the method includes the following steps S401-S410:
[0092] S401, when a service node receives a service processing request, it generates unique service identification information for the service processing request and performs service processing.
[0093] S402, when the service node detects an exception in the business processing process, obtains the business exception information corresponding to the service node, and determines the call chain information corresponding to the business processing.
[0094] S403, the service node adds the service node identifier, the service identifier information and the call chain information to the service exception information, and generates the exception information to be analyzed corresponding to the service processing.
[0095] The abnormal information to be analyzed includes business identification information, business abnormality information and call chain information.
[0096] Since in the process of business processing, it is usually necessary to call multiple service nodes to complete the business processing, in this case, business exception information is thrown by multiple service nodes, that is, the exception information to be analyzed includes business exception information thrown by multiple service nodes, and each business exception information carries the node IP of the corresponding service node.
[0097] S404, the service node converts the abnormal information to be analyzed into a text format to obtain the abnormal information to be analyzed in a text format.
[0098] S405, the service node sends the exception information to be analyzed to the Kafka server, and specifies each part of information included in the exception information to be analyzed.
[0099] The service node described in the above steps may be any node in the service cluster.
[0100] S406, the Kafka server sends the abnormal information to be analyzed to the abnormal alarm device.
[0101] S407, the abnormal alarm device screens out the target call chain information with the longest call chain according to the abnormal information to be analyzed, and determines, according to the target call chain information, that the last called service node in the call chain is the root cause abnormal node corresponding to the business processing.
[0102] In this step, the abnormal alarm device filters the target call chain information with the longest call chain, and can discard other call chains with shorter call chains.
[0103] S408, the abnormal alarm device matches the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process.
[0104] The exception information library includes multiple exception keywords in text format, and the exception keywords are used to reflect the exception type of business exception information, such as too many connections in the connection pool, Java virtual machine memory overflow, file not found, etc.
[0105] S409, the abnormal alarm device matches the abnormal keyword to be analyzed with the preset abnormal processing method library to match the target processing method corresponding to the abnormal keyword to be analyzed.
[0106] The exception handling method library includes one or more exception handling methods corresponding to each exception keyword.
[0107] S410, the abnormal alarm device generates and issues abnormal alarm information corresponding to the business processing, and the abnormal alarm information includes business abnormality information, target call chain information, root cause abnormal node and target processing method.
[0108] For example, the abnormal alarm device sends the following alarm information to the abnormality handling party: "The root cause is that the service node A has an abnormality, please handle it in time; the handling method is *****".
[0109] In this embodiment, if the abnormal alarm device cannot match the abnormal handling method corresponding to the abnormal keyword to be analyzed in the abnormal handling method library, it can return "empty". The exception handling party can supplement the "empty" exception handling method based on experience, and update and gradually improve the exception handling method library to make the exception handling methods in the exception handling method library richer and more complete.
[0110] Figure 5 FIG. 1 is a schematic diagram of the calling relationship between services in a service cluster according to an embodiment of the present application. Figure 5 As shown, the service cluster includes a service gateway, service A, service B, service C, service D, service E and a Mysql database (abbreviated as M). The service gateway is used to receive business processing requests and transmit the business processing requests to the service nodes, and complete the business processing through calls between services. Each service includes multiple service nodes.
[0111] In a microservice environment, each service is usually deployed with multiple service nodes. Figure 6 As shown, Figure 5 The service A shown in FIG specifically includes service nodes A1, A2 and A3, the service B specifically includes service nodes B1 and B2, the service C specifically includes service nodes C1, C2 and C3, the service D specifically includes service nodes D1 and D2, and the service E specifically includes service nodes E1 and E2. Figure 6It can be seen that the service gateway receives business processing requests R1 and R2. When processing request R1, it calls service nodes A1, B1, C1, D1 and M (i.e., MySQL database) in sequence; when processing request R2, it calls service nodes E1, C2 and M in sequence. If an exception occurs in the MySQL database at this time, the business processing request will fail to return, that is, requests R1 and R2 will fail to process.
[0112] Figure 7 and Figure 8 The following table shows the abnormal information to be analyzed issued by each service node corresponding to request R1 (including service nodes A1, B1, C1, D1) and each service node corresponding to request R2 (including service nodes E1, C2). The abnormal information to be analyzed includes service node IP, service identification information, service abnormality information and call chain information. Each service node IP corresponds to a service abnormality information and call chain information. Taking the service node C1 corresponding to request R1 as an example, Figure 7 In the third line of the exception information to be analyzed, the IP of the service node C1 is "host C1", the business identification information is "R1", the call chain information is "A1→B1→C1→D1", and the business exception information is "invoke-chain-R1:192.168.1.1-192.168.3.1-192.168.4.1 Exception: Request timeout".
[0113] Figure 7 and Figure 8 The abnormal information to be analyzed is sent by the service cluster to the abnormal alarm device. The abnormal alarm device first merges the call chain information corresponding to the same service identification information, that is, for the same service identification information, only the target call chain information with the longest call chain is filtered out. Figure 7Taking the abnormal information to be analyzed as an example, for request R1, since the call chain in the call chain information corresponding to service node D1 is the longest, the call chain information "A1→B1→C1→D1" corresponding to service node D1 is screened out as the target call chain information corresponding to request R1. Then, according to the target call chain information "A1→B1→C1→D1", the last called service node D1 is determined to be the root cause abnormal node corresponding to request R1. That is, the root cause abnormal node that causes the failure of request R1 processing is service node D1. The abnormal alarm device determines the abnormal keyword to be analyzed, and matches the abnormal handling method corresponding to requests R1 and R2 according to the abnormal handling method library, and then sends abnormal alarm information to the abnormal handling party, so that the abnormal handling party can know the root cause abnormal node and the abnormal handling method in time. For example, the abnormal alarm device determines that the abnormal handling method corresponding to request R1 is "modify the maximum number of connections of Mysql database" by matching the abnormal handling method library, and the abnormal handling method corresponding to request R2 is "detect and check the number of database connections and do not release the positioning code, the reference link is https: / / www...."
[0114] It can be seen that the embodiment of the present application makes the process of handling business exceptions no longer rely on manual work through the interaction between the service cluster and the abnormal alarm device, and realizes the automation of business exception handling. In addition, the abnormal alarm information corresponding to the business processing is issued by the abnormal alarm device, and the abnormal alarm information includes business exception information, root cause abnormal node, call chain information and target processing method, so that the abnormal situation in the business processing process can be intuitively displayed to the exception handling party, so as to facilitate the exception handling party to handle the business exception based on the abnormal alarm information, improve the efficiency of business exception handling and the accuracy of solving the exception.
[0115] In summary, specific embodiments of the present subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recorded in the claims can be performed in a different order and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing can be advantageous.
[0116] The above is a service exception handling method provided in an embodiment of the present application. Based on the same idea, an embodiment of the present application also provides a service exception handling device.
[0117] Fig. 9 is a schematic block diagram of a service exception processing device according to an embodiment of the present application. Fig. 9 As shown, the device is applied to abnormal alarm equipment, including:
[0118] The first acquisition module 910 is used to acquire the to-be-analyzed exception information corresponding to the business processing; the to-be-analyzed exception information is generated based on the business exception information thrown by each service node during the business processing; the to-be-analyzed exception information includes the business exception information and the call chain information corresponding to each of the business exception information;
[0119] A first determination module 920 is used to match the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process; the abnormal information library includes multiple abnormal keywords;
[0120] A matching module 930 is used to match the abnormal keyword to be analyzed with a preset abnormal processing method library to match a target processing method corresponding to the abnormal keyword to be analyzed; the abnormal processing method library includes abnormal processing methods corresponding to each of the abnormal keywords;
[0121] The alarm module 940 is used to issue abnormal alarm information corresponding to the business processing, so that the exception handling party performs business exception processing based on the abnormal alarm information; the abnormal alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0122] In one embodiment, the abnormal information to be analyzed further includes business identification information corresponding to the business process;
[0123] The device also includes:
[0124] A screening module, for after obtaining the abnormal information to be analyzed corresponding to the business processing, if the business identification information corresponds to a plurality of the business abnormal information, and each of the business abnormal information corresponds to a call chain information, then screening the target call chain information with the longest call chain from the plurality of the call chain information;
[0125] The first determining module 920 includes:
[0126] A matching unit is used to match the business exception information corresponding to the target call chain information with the exception information library.
[0127] In one embodiment, the abnormal alarm information also includes node information of the root cause abnormal node;
[0128] The device also includes:
[0129] The third determination module is used to determine the last called service node in the call chain as the root cause abnormal node corresponding to the business process according to the target call chain information before issuing the abnormal alarm information corresponding to the business process.
[0130] In one embodiment, the apparatus further comprises:
[0131] A judgment module, configured to judge whether the root cause abnormal nodes corresponding to the service identification information are the same if the abnormal information to be analyzed corresponding to multiple service identification information is obtained within a preset time period;
[0132] The alarm module 940 includes:
[0133] The alarm unit is configured to issue the abnormal alarm information only once for the multiple service identification information if there are multiple service identification information corresponding to the same root cause abnormal node.
[0134] The device of the embodiment of the present application is adopted, by obtaining the abnormal information to be analyzed corresponding to the business processing, the abnormal information to be analyzed is generated based on the business abnormal information thrown by each service node in the business processing process, including the business abnormal information and the call chain information corresponding to each business abnormal information; the business abnormal information is matched with the preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business processing, and then the target processing method is matched according to the abnormal keyword to be analyzed and the preset abnormal processing method library. It can be seen that the device makes the processing process of business exceptions no longer rely on manual work, and realizes the automation of business exception processing. In addition, by issuing the abnormal alarm information corresponding to the business processing, the abnormal alarm information includes at least one of the business abnormal information, the call chain information, and the target processing method, so that the abnormal situation in the business processing process can be intuitively displayed to the abnormal processing party, so as to facilitate the abnormal processing party to perform business abnormal processing based on the abnormal alarm information, improve the efficiency of business abnormal processing and the accuracy of solving abnormalities.
[0135] Those skilled in the art should understand that Fig. 9 The service exception handling device in the embodiment can be used to implement the service exception handling method performed by the abnormal alarm device as described above. The detailed description thereof should be similar to the description of the method part as described above. To avoid redundancy, it will not be further described here.
[0136] Fig.10 FIG. 1 is a schematic block diagram of a service exception processing device according to another embodiment of the present application. Fig.10 As shown, the device is applied to a service cluster, including:
[0137] The second acquisition module 1010 is used to perform business processing according to the received business processing request; during the business processing, if it is monitored that the service node corresponding to the business processing is abnormal, then obtain the business abnormality information corresponding to the service node;
[0138] The second determination module 1020 is used to determine the call chain information corresponding to the business processing; the call chain information includes the call relationship between each of the service nodes in the business processing process;
[0139] A first generating module 1030 is used to generate the to-be-analyzed exception information corresponding to the business process according to the call chain information and the business exception information;
[0140] The sending module 1040 is used to send the exception information to be analyzed to the exception alarm device, so that the exception alarm device determines the target processing method corresponding to the business exception information according to the exception information to be analyzed, and sends the exception alarm information corresponding to the business processing to the exception processing party; the exception alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0141] In one embodiment, the apparatus further comprises:
[0142] A second generating module, used to generate business identification information corresponding to the business processing;
[0143] The first generating module 1030 includes:
[0144] A generating unit, configured to generate the to-be-analyzed abnormal information corresponding to each of the business identification information respectively according to the mutually corresponding business identification information, the call chain information and the business abnormal information if the business abnormal information corresponding to the multiple business identification information is obtained;
[0145] The abnormal information to be analyzed includes at least one of the business identification information, the call chain information and the business abnormality information.
[0146] In one embodiment, the apparatus further comprises:
[0147] A conversion unit is used to convert the exception information to be analyzed into a specified format after generating the exception information to be analyzed corresponding to the business processing according to the call chain information and the business exception information; the specified format matches the exception keywords included in the preset exception information library, so that the exception alarm device matches the exception keywords included in the exception information to be analyzed according to the exception information library.
[0148] The device of the embodiment of the present application is adopted. During the business processing, if an abnormality occurs in the service node corresponding to the business processing, the business abnormality information corresponding to the service node is obtained, and the call chain information corresponding to the business processing is determined; then, according to the call chain information and the business abnormality information, the abnormal information to be analyzed corresponding to the business processing is generated, and the abnormal information to be analyzed is sent to the abnormal alarm device, so that the abnormal alarm device analyzes the target processing method corresponding to the business abnormality information according to the abnormal information to be analyzed. It can be seen that the device makes the processing process of business abnormality no longer rely on manual labor, and realizes the automation of business abnormality processing. In addition, by sending the abnormal information to be analyzed to the abnormal alarm device, the abnormal alarm device issues the abnormal alarm information corresponding to the business processing, and the abnormal alarm information includes at least one of the business abnormality information, the call chain information, and the target processing method, so that the abnormal situation in the business processing process can be intuitively displayed to the abnormal handling party, so as to facilitate the abnormal handling party to perform business abnormality processing based on the abnormal alarm information, improve the efficiency of business abnormality processing and the accuracy of solving abnormalities.
[0149] Those skilled in the art should understand that Fig.10 The service exception handling device in can be used to implement the service exception handling method performed by the service cluster as described above, and the detailed description thereof should be similar to the description of the method part as described above. To avoid redundancy, it will not be repeated here.
[0150] Based on the same idea, the embodiment of the present application also provides a service exception processing device, such as Fig.11 As shown. The business exception handling device may have relatively large differences due to different configurations or performances, and may include one or more processors 1101 and memory 1102, and the memory 1102 may store one or more storage applications or data. Among them, the memory 1102 may be a short-term storage or a persistent storage. The application stored in the memory 1102 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the business exception handling device. Furthermore, the processor 1101 may be configured to communicate with the memory 1102, and execute a series of computer executable instructions in the memory 1102 on the business exception handling device. The business exception handling device may also include one or more power supplies 1103, one or more wired or wireless network interfaces 1104, one or more input and output interfaces 1105, and one or more keyboards 1106.
[0151] In one embodiment, the service exception processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the service exception processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0152] Acquire the exception information to be analyzed corresponding to the business processing; the exception information to be analyzed is generated based on the business exception information thrown by each service node during the business processing; the exception information to be analyzed includes the business exception information and the call chain information corresponding to each of the business exception information;
[0153] Matching the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process; the abnormal information library includes multiple abnormal keywords;
[0154] Matching the abnormal keyword to be analyzed with a preset abnormal processing method library to match a target processing method corresponding to the abnormal keyword to be analyzed; the abnormal processing method library includes the abnormal processing methods corresponding to each of the abnormal keywords;
[0155] Exception alarm information corresponding to the business processing is issued so that the exception handling party performs business exception processing based on the exception alarm information; the exception alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0156] In another embodiment, the service exception processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the service exception processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0157] Perform business processing according to the received business processing request; during the business processing, if it is monitored that an abnormality occurs in the service node corresponding to the business processing, obtain business abnormality information corresponding to the service node;
[0158] Determine the call chain information corresponding to the business processing; the call chain information includes the call relationship between each of the service nodes in the business processing process;
[0159] Generate the to-be-analyzed exception information corresponding to the business process according to the call chain information and the business exception information;
[0160] The exception information to be analyzed is sent to the exception alarm device, so that the exception alarm device determines the target processing method corresponding to the business exception information according to the exception information to be analyzed, and sends the exception alarm information corresponding to the business processing to the exception processing party; the exception alarm information includes at least one of the business exception information, the call chain information, and the target processing method.
[0161] An embodiment of the present application also proposes a storage medium, which stores one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by an electronic device including multiple applications, the electronic device can execute the various processes of the above-mentioned business exception handling method embodiment and achieve the same technical effect. To avoid repetition, they are not repeated here.
[0162] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0163] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0164] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0168] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0169] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0170] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0171] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0172] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0173] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0174] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for handling business exceptions, characterized in that: Applied to abnormal alarm equipment, the method comprises: Acquire the exception information to be analyzed corresponding to the business processing; the exception information to be analyzed is generated based on the business exception information thrown by each service node during the business processing; the exception information to be analyzed includes the business exception information and the call chain information corresponding to each of the business exception information; Matching the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process; the abnormal information library includes multiple abnormal keywords; Matching the abnormal keyword to be analyzed with a preset abnormal processing method library to match a target processing method corresponding to the abnormal keyword to be analyzed; the abnormal processing method library includes the abnormal processing methods corresponding to each of the abnormal keywords; Sending abnormal warning information corresponding to the business processing, so that the abnormal processing party performs business abnormal processing based on the abnormal warning information; the abnormal warning information includes the business abnormality information, the call chain information, and the target processing method; The abnormal information to be analyzed also includes business identification information corresponding to the business processing; After obtaining the abnormal information to be analyzed corresponding to the business process, the method further includes: If the service identification information corresponds to a plurality of service exception information, and each service exception information corresponds to a call chain information, then the target call chain information with the longest call chain is selected from the plurality of call chain information; The matching of the abnormal information to be analyzed with a preset abnormal information library includes: The business exception information corresponding to the target call chain information is matched with the exception information library.
2. The method according to claim 1, characterized in that The abnormal alarm information also includes node information of the root cause abnormal node; Before issuing the abnormal alarm information corresponding to the business process, the method further includes: According to the target call chain information, the service node that is last called in the call chain is determined as the root cause exception node corresponding to the business process.
3. The method according to claim 2, characterized in that The method further comprises: If the abnormal information to be analyzed corresponding to multiple pieces of the service identification information are obtained within a preset time period, determining whether the root cause abnormal nodes corresponding to the respective pieces of service identification information are the same; The issuing of abnormal alarm information corresponding to the business processing includes: If there are multiple pieces of service identification information corresponding to the same root cause abnormal node, the abnormal alarm information is only issued once for the multiple pieces of service identification information.
4. A method for handling business exceptions, characterized in that: Applied to a service cluster, the method includes: Perform business processing according to the received business processing request; during the business processing, if it is monitored that an abnormality occurs in the service node corresponding to the business processing, obtain business abnormality information corresponding to the service node; Determine the call chain information corresponding to the business processing; the call chain information includes the call relationship between each of the service nodes in the business processing process; Generate the to-be-analyzed exception information corresponding to the business process according to the call chain information and the business exception information; The abnormal information to be analyzed is sent to the abnormal alarm device, so that the abnormal alarm device determines the target processing method corresponding to the business abnormal information according to the abnormal information to be analyzed, and sends the abnormal alarm information corresponding to the business processing to the abnormal processing party; the abnormal alarm information includes the business abnormal information, the call chain information, and the target processing method; The method further comprises: Generate business identification information corresponding to the business processing, so that after the abnormal alarm device obtains the abnormal information to be analyzed corresponding to the business processing, if the business identification information corresponds to multiple business abnormal information, and each business abnormal information corresponds to one call chain information, then the target call chain information with the longest call chain is filtered out from the multiple call chain information, and the business abnormal information corresponding to the target call chain information is matched with the abnormal information library.
5. The method according to claim 4, characterized in that The generating, according to the call chain information and the business exception information, the exception information to be analyzed corresponding to the business process includes: If the business exception information corresponding to multiple business identification information is obtained, then the exception information to be analyzed corresponding to each business identification information is generated respectively according to the mutually corresponding business identification information, the call chain information and the business exception information; The abnormal information to be analyzed includes at least one of the business identification information, the call chain information and the business abnormality information.
6. The method according to claim 4, characterized in that After generating the to-be-analyzed exception information corresponding to the business process according to the call chain information and the business exception information, the method further includes: The abnormal information to be analyzed is converted into a specified format; the specified format is matched with abnormal keywords included in a preset abnormal information library, so that the abnormal alarm device matches the abnormal keywords included in the abnormal information to be analyzed according to the abnormal information library.
7. A service exception processing device, characterized in that: Applied to abnormal alarm equipment, the device comprises: A first acquisition module is used to acquire the to-be-analyzed exception information corresponding to the business processing; the to-be-analyzed exception information is generated based on the business exception information thrown by each service node during the business processing; the to-be-analyzed exception information includes the business exception information and the call chain information corresponding to each of the business exception information; A first determination module is used to match the abnormal information to be analyzed with a preset abnormal information library to determine the abnormal keyword to be analyzed corresponding to the business process; the abnormal information library includes a plurality of abnormal keywords; A matching module, used for matching the abnormal keyword to be analyzed with a preset abnormal processing method library to match a target processing method corresponding to the abnormal keyword to be analyzed; the abnormal processing method library includes abnormal processing methods corresponding to each of the abnormal keywords; An alarm module is used to issue abnormal alarm information corresponding to the business processing, so that the abnormal processing party performs business abnormal processing based on the abnormal alarm information; the abnormal alarm information includes the business abnormality information, the call chain information, and the target processing method; The abnormal information to be analyzed also includes business identification information corresponding to the business processing; The business exception processing device is also used for, after obtaining the to-be-analyzed exception information corresponding to the business processing, if the business identification information corresponds to a plurality of the business exception information, and each of the business exception information corresponds to a call chain information, then filtering the target call chain information with the longest call chain from the plurality of the call chain information; In the first determination module, matching the abnormal information to be analyzed with a preset abnormal information library includes: The business exception information corresponding to the target call chain information is matched with the exception information library.
8. A service exception processing device, characterized in that: Applied to a service cluster, the device comprises: A second acquisition module is used to perform business processing according to the received business processing request; during the business processing, if it is monitored that an abnormality occurs in the service node corresponding to the business processing, then the business abnormality information corresponding to the service node is obtained; A second determination module is used to determine the call chain information corresponding to the business processing; the call chain information includes the call relationship between each of the service nodes in the business processing process; A first generating module, configured to generate the to-be-analyzed exception information corresponding to the business processing according to the call chain information and the business exception information; A sending module, used for sending the abnormal information to be analyzed to the abnormal alarm device, so that the abnormal alarm device determines the target processing method corresponding to the business abnormal information according to the abnormal information to be analyzed, and sends the abnormal alarm information corresponding to the business processing to the abnormal processing party; the abnormal alarm information includes the business abnormal information, the call chain information, and the target processing method; The business exception processing device is also used to generate business identification information corresponding to the business processing, so that after the exception alarm device obtains the exception information to be analyzed corresponding to the business processing, if the business identification information corresponds to multiple business exception information, and each business exception information corresponds to one call chain information, then the target call chain information with the longest call chain is filtered out from the multiple call chain information, and the business exception information corresponding to the target call chain information is matched with the exception information library.
9. A service exception processing device, characterized in that: The method comprises a processor and a memory electrically connected to the processor, the memory storing a computer program, the processor being used to call and execute the computer program from the memory to implement the service exception handling method as described in any one of claims 1 to 3; or the processor being used to call and execute the computer program from the memory to implement the service exception handling method as described in any one of claims 4 to 6.
10. A storage medium, characterized in that: The storage medium is used to store a computer program, which, when executed by a processor, implements the service exception handling method as described in any one of claims 1 to 3; or, the computer program, when executed by a processor, implements the service exception handling method as described in any one of claims 4 to 6.
