Fault positioning method and device, computer equipment and readable storage medium
By identifying abnormal nodes and calculating the target contribution when an application fails, the fault object is quickly located, which solves the problem of long fault location in the existing technology and achieves rapid fault location.
Patent Information
- Application Number
- CN202411003671.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-09-27
AI Technical Summary
In the existing technology, application fault location takes a long time and requires the participation of multiple operation and maintenance personnel, resulting in a long time for fault sorting.
When an application fails, abnormal nodes are identified in the preset monitoring nodes, the abnormal objects are determined according to the preset corresponding relationships, and the target contribution of the abnormal objects is calculated to determine the target fault object, and faults are performed based on the target fault object. position.
Without the need for multiple operation and maintenance personnel to participate, application faults can be quickly located and troubleshooting time can be reduced.
Smart Images

Figure CN118708441A
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a fault location method, apparatus, computer equipment, and computer-readable storage medium. Background Art
[0002] With the rapid development of banking business, the number of applications is increasing. In order to improve the external service capabilities of the banking system, it is necessary to ensure the normal operation of each application.
[0003] At present, to determine whether an application is running normally, it is necessary not only to monitor the application itself, such as monitoring the application success rate, transaction time, etc., but also to monitor the middleware, database, server, etc. associated with the application failure. In this case, it is necessary to rely on the operation and maintenance experience of multiple parties to analyze the problem and locate the fault. Not only the application developers, but also the operation and maintenance personnel of the middleware, database, and server are needed to participate in the troubleshooting, which results in a long time for troubleshooting.
[0004] Therefore, the current application fault location technology has the problem of being time-consuming. Summary of the invention
[0005] Based on this, it is necessary to provide a fault location method, apparatus, computer equipment, computer-readable storage medium and computer program product that can quickly locate application faults in order to address the above technical problems.
[0006] In a first aspect, the present application provides a fault location method, comprising:
[0007] In the event of a failure in an application, identifying an abnormal node corresponding to the application in pre-set monitoring nodes;
[0008] Determine the abnormal object corresponding to the abnormal node according to the preset corresponding relationship;
[0009] Determining a target contribution of the abnormal object, and determining a target fault object from the abnormal object according to the target contribution;
[0010] The fault of the application is located according to the target fault object.
[0011] In one embodiment, locating the fault of the application according to the target fault object includes:
[0012] Determine the abnormal node corresponding to the target fault object as the target fault node;
[0013] The fault of the application is located according to the target fault node and the target fault object.
[0014] In one embodiment, determining the target contribution of the abnormal object includes:
[0015] Determining a node contribution of each abnormal node corresponding to the abnormal object;
[0016] The node contribution is combined with the object contribution of the abnormal object to obtain the target contribution of the abnormal object.
[0017] In one embodiment, the corresponding relationship is a corresponding relationship between the monitoring object and the monitoring node; in the case of a failure of the application, before identifying the abnormal node corresponding to the application in the preset monitoring nodes, the method further includes:
[0018] Obtaining at least one of the monitoring objects according to the functional modules corresponding to the application program;
[0019] At least one monitoring node corresponding to each monitoring object is obtained according to the monitoring indicators corresponding to the monitoring objects.
[0020] In one of the embodiments, the monitoring object includes at least one of an application, a middleware, a database, and a server.
[0021] In one of the embodiments, when an application fails, before identifying an abnormal node corresponding to the application in a preset monitoring node, the method further includes:
[0022] Determine the object contribution of each of the monitored objects and the node contribution of each of the monitored nodes.
[0023] In one of the embodiments, when an application fails, identifying an abnormal node corresponding to the application in a preset monitoring node includes:
[0024] In the event of a failure in the application, if the node parameter of the monitoring node is outside a preset parameter threshold, the monitoring node is determined as the abnormal node; or,
[0025] In the event of an application failure, if the node parameters of the monitoring node do not match the historical parameters, the monitoring node is determined as the abnormal node.
[0026] In a second aspect, the present application also provides a fault location device, including:
[0027] An abnormal node module, used to identify an abnormal node corresponding to the application in pre-set monitoring nodes when an application fails;
[0028] An abnormal object module, used to determine the abnormal object corresponding to the abnormal node according to a preset corresponding relationship;
[0029] A fault object module, used to determine a target contribution of the abnormal object, and determine a target fault object from the abnormal object according to the target contribution;
[0030] A fault locating module is used to locate the fault of the application program according to the target fault object.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] In the event of a failure in an application, identifying an abnormal node corresponding to the application in pre-set monitoring nodes;
[0033] Determine the abnormal object corresponding to the abnormal node according to the preset corresponding relationship;
[0034] Determining a target contribution of the abnormal object, and determining a target fault object from the abnormal object according to the target contribution;
[0035] The fault of the application is located according to the target fault object.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0037] In the event of a failure in an application, identifying an abnormal node corresponding to the application in pre-set monitoring nodes;
[0038] Determine the abnormal object corresponding to the abnormal node according to the preset corresponding relationship;
[0039] Determining a target contribution of the abnormal object, and determining a target fault object from the abnormal object according to the target contribution;
[0040] The fault of the application is located according to the target fault object.
[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0042] In the event of a failure in an application, identifying an abnormal node corresponding to the application in pre-set monitoring nodes;
[0043] Determine the abnormal object corresponding to the abnormal node according to the preset corresponding relationship;
[0044] Determining a target contribution of the abnormal object, and determining a target fault object from the abnormal object according to the target contribution;
[0045] The fault of the application is located according to the target fault object.
[0046] The above-mentioned fault location method, device, computer equipment, computer-readable storage medium and computer program product, when an application fails, identify the abnormal node corresponding to the application in the pre-set monitoring nodes, determine the abnormal object corresponding to the abnormal node according to the pre-set corresponding relationship, determine the target contribution of the abnormal object, determine the target fault object from the abnormal object according to the target contribution, and locate the application fault according to the target fault object; each functional module associated with the application fault can be set as a monitoring object in advance, and a corresponding monitoring node can be set for each monitoring object. When the application fails, it manifests as abnormalities in some monitoring nodes. At this time, the target fault object can be automatically determined from the monitoring object according to the abnormal node, and then the functional module that caused the application failure can be located. Since there is no need for multiple operation and maintenance personnel to jointly perform troubleshooting, the application fault can be quickly located. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0049] Figure 2 is a flow chart of a fault location method in another embodiment;
[0050] Figure 3 is a structural block diagram of a fault location device in one embodiment;
[0051] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0053] In an exemplary embodiment, Figure 1 As shown, a fault location method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0054] Step S110: When an application fails, an abnormal node corresponding to the application is identified in pre-set monitoring nodes.
[0055] Among them, an application program can be a computer program used to complete a specified task.
[0056] The monitoring nodes may be monitoring indicators corresponding to various functional modules related to the operation of the application, wherein the functional modules include but are not limited to the application, middleware, database and server.
[0057] The abnormal node may be a monitoring node where an abnormal situation occurs.
[0058] Optionally, the terminal can pre-acquire various functional modules associated with the application failure, set each functional module as a monitoring object, and obtain multiple monitoring objects corresponding to the application, where the monitoring objects can be applications, middleware, databases and servers. The terminal can also set each monitoring indicator of each monitoring object as a monitoring node, and obtain multiple monitoring nodes corresponding to the application. When the application fails, the terminal can identify the monitoring node where the abnormal situation occurs and treat it as an abnormal node.
[0059] Exemplarily, since application failures may be related to the application itself or to the middleware, database, and server, the application, middleware, database, and server may be set as monitoring objects, as shown in Table 1. Each monitoring indicator of each monitoring object is set as a monitoring node, and the monitoring nodes corresponding to the application include business success rate, system success rate, and average response time. The monitoring nodes corresponding to the middleware include thread pool / connection pool waiting queue size, thread pool / connection pool utilization rate, number of active threads in thread pool / connection pool, and number of threads in thread pool / connection pool. The monitoring nodes corresponding to the database include number of connections, online sessions, lock waiting state sessions, number of transactions submitted by users per second, average response time of user transactions, buffer pool hit rate, 80% / 95% SQL (Structured Query Language) response time, and number of deadlocks. The monitoring nodes corresponding to the server include CPU (Central Processing Unit), memory, disk IO (Input / Output), and network IO.
[0060] Table 1 Monitoring objects and their corresponding monitoring nodes
[0061]
[0062] The business success rate may be the success rate of an application in processing banking business, the system success rate may be the success rate of a banking business system operation, and the average response time may be the average waiting time required for an application to respond to a banking business request.
[0063] Among them, the thread pool / connection pool waiting queue size can be the size of the waiting queue in the thread pool or connection pool, the thread pool / connection pool utilization rate can be the utilization rate of the thread pool or connection pool, the number of active threads in the thread pool / connection pool can be the number of active threads in the thread pool or connection pool, and the number of threads in the thread pool / connection pool can be the number of current threads in the thread pool or connection pool.
[0064] Among them, the number of connections may be the number of applications that can simultaneously connect to the database, the online sessions may be the sessions in the online state in the database, the lock wait state sessions may be the sessions in the lock wait state in the database, the number of transactions submitted by users per second may be the number of transactions submitted by users to the database per second, the average response time of user transactions may be the average time required for the database to respond to user transactions, the buffer pool hit rate may be the probability of data in the buffer pool hitting the user access, the 80% / 95% SQL response time may be the time required for the database to return 80% or 95% of the query results after receiving the SQL query request, and the number of deadlocks may be the number of times deadlocks occur in the database.
[0065] Among them, CPU can be used to indicate whether the server CPU is running normally, memory can be used to indicate whether the server memory is running normally, disk IO can be used to indicate whether the server disk input and output are running normally, and network IO can be used to indicate whether the server network input and output are running normally.
[0066] When an application fails, the abnormal nodes in each monitoring node are identified. For example, if the CPU and memory of the server are found to be abnormal, and the number of database connections is abnormal, the abnormal nodes can be determined to be the CPU, memory, and number of connections.
[0067] Step S120: determining the abnormal object corresponding to the abnormal node according to the preset corresponding relationship.
[0068] The corresponding relationship may be a corresponding relationship between a monitoring object and a monitoring node.
[0069] The abnormal object may be a monitoring object where an abnormal situation occurs in the monitoring node.
[0070] Optionally, the terminal may determine the monitoring object corresponding to the abnormal node as the abnormal object according to a preset corresponding relationship between the monitoring object and the monitoring node.
[0071] For example, referring to the corresponding relationship shown in Table 1, after determining that the abnormal nodes are CPU, memory and number of connections, the server corresponding to the CPU and memory, and the database corresponding to the number of connections can be determined as abnormal objects.
[0072] Step S130, determining the target contribution of the abnormal object, and determining the target fault object from the abnormal objects according to the target contribution.
[0073] The target contribution may be the contribution of the abnormal object in locating the application fault.
[0074] The target fault object may be an abnormal object determined to cause the application program to fail.
[0075] Optionally, the terminal can pre-determine the probability that each monitored object causes an application failure to obtain an object contribution, and can also pre-determine the probability that each monitored node causes an application failure to obtain a node contribution. After determining the abnormal object corresponding to the abnormal node, the terminal can calculate the target contribution of the abnormal object based on the object contribution of the abnormal object and the node contribution of the abnormal node, and screen out the target fault object that causes the application failure from the abnormal objects based on the target contribution.
[0076] For example, the probability that each monitoring object causes an application failure can be preset, with the server contributing 40% and the database contributing 20%. The probability that each monitoring node corresponding to each monitoring object causes an application failure can also be preset, with the server CPU contributing 70%, the server memory contributing 20%, and the database connection number contributing 10%. The target contribution of the server can be obtained as (70%+20%)×40%=36%, and the target contribution of the database is 10%×20%=2%. The abnormal object with the largest target contribution is determined as the target failure object. The server's target contribution of 36% is greater than the database's target contribution of 2%, so the server is determined as the target failure object.
[0077] Step S140: locating the fault of the application program according to the target fault object.
[0078] Optionally, the terminal may use the determined target fault object to locate the fault of the application program.
[0079] For example, after determining that the server is the target fault object, it can be located that the application fault is triggered by the server exception.
[0080] The above-mentioned fault location method, when an application fails, identifies the abnormal node corresponding to the application in the pre-set monitoring nodes, determines the abnormal object corresponding to the abnormal node according to the pre-set corresponding relationship, determines the target contribution of the abnormal object, determines the target fault object from the abnormal object according to the target contribution, and locates the application fault according to the target fault object; each functional module associated with the application fault can be set as a monitoring object in advance, and a corresponding monitoring node can be set for each monitoring object. When an application fails, it will manifest as abnormalities in some monitoring nodes. At this time, the target fault object can be automatically determined from the monitoring object according to the abnormal node, and then the functional module that caused the application failure can be located. Since there is no need for multiple operation and maintenance personnel to jointly perform troubleshooting, the application fault can be quickly located.
[0081] In an exemplary embodiment, the above step S140 may specifically include: determining the abnormal node corresponding to the target fault object as the target fault node; and locating the fault of the application according to the target fault node and the target fault object.
[0082] The target fault node may be an abnormal node determined to cause the application program to fail.
[0083] Optionally, the terminal may determine each abnormal node corresponding to the target fault object as a target fault node, and locate the fault of the application program by using the target fault object and the target fault node.
[0084] For example, after determining that the server is the target fault object, the abnormal nodes CPU and memory corresponding to the server are determined as target fault nodes. It can be located that the application fault is triggered by the server abnormality, and the server abnormality is caused by the CPU and memory abnormalities.
[0085] In this embodiment, the abnormal node corresponding to the target fault object is determined as the target fault node, and the fault of the application is located according to the target fault node and the target fault object. After locating the functional module that causes the application failure, it is possible to further determine what defect of the functional module causes the application failure, thereby increasing the accuracy of fault location.
[0086] In an exemplary embodiment, the above step S130 may specifically include: determining the node contribution of each abnormal node corresponding to the abnormal object; and integrating the node contribution with the object contribution of the abnormal object to obtain the target contribution of the abnormal object.
[0087] The object contribution degree may be the contribution degree of a preset monitoring object in participating in the application fault location. The node contribution degree may be the contribution degree of a preset monitoring node in participating in the application fault location.
[0088] Optionally, the terminal may pre-set the object contribution of each monitored object and the node contribution of each monitored node. After determining the abnormal object corresponding to the abnormal node, the terminal may obtain the node contribution of each abnormal node corresponding to the specified abnormal object, and merge the obtained node contribution with the object contribution of the abnormal object to obtain the target contribution of the abnormal object. Specifically, the sum of the node contributions of the abnormal nodes corresponding to the abnormal object may be multiplied by the object contribution of the abnormal object to obtain the target contribution of the abnormal object.
[0089] For example, the server contribution is preset to 40%, the CPU contribution in the server to 70%, and the memory contribution to 20%. The database contribution can also be preset to 20%, and the number of connections in the database to 10%. When the abnormal objects are the server and database, and the abnormal nodes are the CPU and memory of the server, and the number of connections in the database, multiply the sum of the object contribution and the node contribution, and you can get the target contribution of the server to be (70%+20%)×40%=36%, and the target contribution of the database to be 10%×20%=2%.
[0090] In this embodiment, by determining the node contribution of each abnormal node corresponding to the abnormal object, the node contribution is integrated with the object contribution of the abnormal object to obtain the target contribution of the abnormal object. The target contribution of the abnormal object causing the application failure under the influence of the abnormal node can be accurately determined, which facilitates the analysis of which monitoring indicators of the functional module trigger the application failure, thereby increasing the accuracy of fault location.
[0091] In an exemplary embodiment, the corresponding relationship is the corresponding relationship between the monitoring object and the monitoring node; before the above step S110, it can also specifically include: obtaining at least one monitoring object according to the functional module corresponding to the application; obtaining at least one monitoring node corresponding to each monitoring object according to the monitoring indicator corresponding to the monitoring object.
[0092] The monitoring object may be each functional module that affects the performance of the application program. The functional module may be a module with a specific function. The monitoring indicator may be an indicator for monitoring the performance of the functional module.
[0093] Optionally, the terminal may obtain various functional modules that affect the performance of the application program, and use each functional module as a monitoring object. The terminal may also obtain various monitoring indicators corresponding to each functional module, and use each monitoring indicator as a monitoring node.
[0094] For example, by combing through the entire link from application to server, we can find that the functional modules that affect application performance include application, middleware, database and server. We can use application, middleware, database and server as monitoring objects, and we can also use the monitoring indicators of application, such as business success rate, system success rate and average response time, as monitoring nodes corresponding to the application. The monitoring indicators of middleware, such as thread pool / connection pool waiting queue size, thread pool / connection pool utilization rate, number of active threads in thread pool / connection pool and number of threads in thread pool / connection pool, are used as monitoring nodes corresponding to the middleware. The monitoring indicators of database, such as number of connections, online sessions, sessions in lock waiting state, number of transactions submitted by users per second, average response time of user transactions, buffer pool hit rate, 80% / 95% SQL response time and number of deadlocks, are used as monitoring nodes corresponding to the database. The monitoring indicators of server, such as CPU, memory, disk IO and network IO, are used as monitoring nodes corresponding to the server. Then we can get the corresponding relationship as shown in Table 1.
[0095] In this embodiment, by obtaining at least one monitoring object based on the functional module corresponding to the application, and obtaining at least one monitoring node corresponding to each monitoring object based on the monitoring indicator corresponding to the monitoring object, the various functional modules and monitoring indicators that affect the performance of the application can be disassembled to facilitate determination of which monitoring indicator abnormality leads to which functional module abnormality, thereby triggering an application failure, thereby increasing the accuracy of locating the application failure.
[0096] In an exemplary embodiment, the monitoring object includes at least one of an application, a middleware, a database, and a server.
[0097] Optionally, the terminal monitors various functional modules that may affect the performance of the application, including the application, middleware, database, and server.
[0098] In this embodiment, by making the monitoring object include at least one of the application, middleware, database and server, the abnormality of the functional module that triggers the application fault can be automatically determined, thereby realizing the rapid location of the application fault.
[0099] In an exemplary embodiment, before the above step S110, the following may be specifically included: determining the object contribution of each monitored object and the node contribution of each monitored node.
[0100] Optionally, the terminal can predetermine the contribution of each monitoring object to application fault location based on the correspondence between the monitoring object and the monitoring node to obtain the object contribution, and determine the contribution of each monitoring node to application fault location to obtain the node contribution.
[0101] For example, assuming that each functional module has the same impact on application failures, and the number of functional modules is n, the object contribution of each monitored object is 100 / n×100%. The node contribution is manually set for each monitoring node of each monitored object in turn. During the setting process, it is necessary to ensure that the sum of the node contribution of each monitoring node corresponding to the same monitored object is 100%.
[0102] In this embodiment, by determining the object contribution of each monitoring object and the node contribution of each monitoring node, the degree of influence of each functional module and each monitoring indicator on the application failure can be determined in advance, thereby quantifying the influence of each functional module and each monitoring indicator on the application failure, facilitating fault location based on quantitative data, and increasing the accuracy of fault location.
[0103] In an exemplary embodiment, the above step S110 may specifically include: in the event of an application failure, if the node parameters of the monitoring node are outside a preset parameter threshold, the monitoring node is determined as an abnormal node; or, in the event of an application failure, if the node parameters of the monitoring node do not match the historical parameters, the monitoring node is determined as an abnormal node.
[0104] The node parameter may be the current indicator measurement result of the monitoring indicator. The parameter threshold may be the preset threshold of the indicator measurement result. The historical parameter may be the indicator measurement result at a historical moment.
[0105] Optionally, when an application fails, the terminal can compare the current indicator measurement result of the monitoring node with a pre-set parameter threshold. If it is not outside the parameter threshold, it means that there is no abnormality in the monitoring node. Otherwise, if the current indicator measurement result is outside the parameter threshold, it means that there is an abnormality in the monitoring node, and the monitoring node is determined as an abnormal node.
[0106] The terminal can also compare the current indicator measurement results of the monitoring node with the indicator measurement results at historical times when an application fails. If the two are the same, for example, the difference between the two is less than a preset error threshold, it indicates that there is no abnormality in the monitoring node. Otherwise, if the two are different, for example, the difference between the two is greater than or equal to the preset error threshold, it indicates that there is an abnormality in the monitoring node, and the monitoring node is determined to be an abnormal node.
[0107] In this embodiment, when an application fails, if the node parameters of the monitoring node are outside the pre-set parameter threshold, the monitoring node is determined as an abnormal node, or when an application fails, if the node parameters of the monitoring node do not match the historical parameters, the monitoring node is determined as an abnormal node. Abnormal nodes in the monitoring nodes can be automatically identified, which facilitates the rapid location of application failures.
[0108] In order to facilitate those skilled in the art to have a deeper understanding of the embodiments of the present application, a specific example will be described below.
[0109] In order to solve the problem of how to quickly locate the fault when the application is unavailable, the present application proposes an application fault location method, which specifically includes the following steps:
[0110] Step S1, sort out the entire link from application to server, including but not limited to application, application middleware, application database, server bare metal / container, etc., and disassemble according to different functional modules.
[0111] Step S2, based on the disassembled functional modules, sort out the performance monitoring indicators involved in each functional module, as shown in Table 1.
[0112] Among them, each functional module represents a monitoring object, and each monitoring indicator corresponding to each monitoring object represents a monitoring node. It can be concluded that application fault location consists of N monitoring objects and M monitoring nodes, and each monitoring object consists of several monitoring nodes.
[0113] Step S3, according to the monitoring indicators that each functional module focuses on, the corresponding relationship between the monitoring objects and monitoring nodes and the contribution to abnormality detection are arranged in advance.
[0114] Among them, the corresponding relationship can be expressed as N1={M 11 、M 12 ...M 1n}、N2={M 21 、M 22 ...M 2n}, ..., N n ={M n1 、M n2 ...M nn}, as shown in Table 1;
[0115] The contribution of each monitored object can be N1=N2=…=N n =100 / n×100%;
[0116] The contribution of each monitoring node can be M 11 =a%,M 12 =b%,……,M 1n =z%,a+b+…+z=100%,M 21 、M 22 ,……,M 2n and M n1 、M n2 ,……,M nn Same reason.
[0117] Step S4, when an abnormality occurs in a monitoring node, it will trigger an abnormality in the monitoring object where the monitoring node is located. The system will make statistics based on the contribution of the monitoring node and the monitoring object. For example, there are 3 nodes (CPU / memory / number of connections), the CPU contribution is 70%, the memory contribution is 20%, the number of connections contribution is 10%, the object (server) where the CPU and memory are located contributes 40%, and the object (database) where the number of connections is located contributes 20%. It can be concluded that when an application fails, it is triggered by an abnormality in the server object, and the server is caused by abnormalities in the CPU and memory.
[0118] The above application fault location method can quickly locate the application when a fault occurs, reducing the pressure on operation and maintenance personnel.
[0119] In an exemplary embodiment, Figure 2 As shown, a fault location method is provided, which is described by taking the method applied to a terminal as an example, and includes the following steps:
[0120] Step S201, obtaining at least one monitoring object according to the functional module corresponding to the application, obtaining at least one monitoring node corresponding to each monitoring object according to the monitoring indicator corresponding to the monitoring object, and determining the object contribution of each monitoring object and the node contribution of each monitoring node;
[0121] Step S202, in the case of a failure in the application, identifying an abnormal node corresponding to the application in the monitoring node;
[0122] Step S203, determining the abnormal object corresponding to the abnormal node according to the corresponding relationship between the monitored object and the monitored node;
[0123] Step S204, determining the node contribution of each abnormal node corresponding to the abnormal object, integrating the node contribution with the object contribution of the abnormal object to obtain the target contribution of the abnormal object, and determining the target fault object from the abnormal object according to the target contribution;
[0124] Step S205, determining the abnormal node corresponding to the target fault object as the target fault node;
[0125] Step S206: locating the fault of the application program according to the target fault node and the target fault object.
[0126] Optionally, the terminal can determine the monitoring object of the functional module that affects the performance of the application in advance, obtain at least one monitoring object, determine the various monitoring indicators corresponding to each monitoring object as a monitoring node, and obtain at least one monitoring node corresponding to each monitoring object. The terminal can also pre-determine the contribution of each monitoring object and each monitoring node in fault location to obtain the object contribution and node contribution. When the application fails, the abnormal node is detected from all monitoring nodes, and the abnormal object is determined according to the corresponding relationship between the monitoring object and the monitoring node. The target contribution of the abnormal object is calculated according to the object contribution of the abnormal object and the node contribution of the abnormal node corresponding to the abnormal object, and the abnormal object with the largest target contribution is determined as the target fault object. According to the corresponding relationship between the monitoring object and the monitoring node, the abnormal node corresponding to the target fault object is determined as the target fault node. After that, it can be determined that the target fault node of the target fault object causes the application to fail.
[0127] The above fault location method obtains at least one monitoring object according to the functional module corresponding to the application, obtains at least one monitoring node corresponding to each monitoring object according to the monitoring indicator corresponding to the monitoring object, determines the object contribution of each monitoring object, and the node contribution of each monitoring node. In the case of a fault in the application, the abnormal node corresponding to the application is identified in the monitoring node, the abnormal object corresponding to the abnormal node is determined according to the corresponding relationship between the monitoring object and the monitoring node, the node contribution of each abnormal node corresponding to the abnormal object is determined, the node contribution is merged with the object contribution of the abnormal object to obtain the target contribution of the abnormal object, the target fault object is determined from the abnormal object according to the target contribution, the abnormal node corresponding to the target fault object is determined as the target fault node, and the fault of the application is located according to the target fault node and the target fault object; each functional module associated with the application fault can be set as a monitoring object in advance, and a corresponding monitoring node can be set for each monitoring object. When the application fails, it is manifested as abnormality of some monitoring nodes. At this time, the target fault object can be automatically determined from the monitoring object according to the abnormal node, and then the functional module that causes the application fault can be located. Since there is no need for multiple operation and maintenance personnel to jointly perform fault troubleshooting, the application fault can be quickly located.
[0128] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0129] Based on the same inventive concept, the embodiment of the present application also provides a fault location device for implementing the above-mentioned fault location method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more fault location device embodiments provided below can refer to the limitations of the fault location method above, and will not be repeated here.
[0130] In an exemplary embodiment, Figure 3As shown, a fault location device is provided, including: an abnormal node module 310, an abnormal object module 320, a fault object module 330 and a fault location module 340, wherein:
[0131] The abnormal node module 310 is used to identify the abnormal node corresponding to the application in the preset monitoring nodes when a failure occurs in the application;
[0132] An abnormal object module 320 is used to determine the abnormal object corresponding to the abnormal node according to a preset corresponding relationship;
[0133] A fault object module 330 is used to determine a target contribution of the abnormal object, and determine a target fault object from the abnormal object according to the target contribution;
[0134] The fault locating module 340 is used to locate the fault of the application according to the target fault object.
[0135] In an exemplary embodiment, the fault location module 340 is further used to determine the abnormal node corresponding to the target fault object as a target fault node; and locate the fault of the application according to the target fault node and the target fault object.
[0136] In an exemplary embodiment, the fault object module 330 is further used to determine the node contribution of each abnormal node corresponding to the abnormal object; and to merge the node contribution with the object contribution of the abnormal object to obtain the target contribution of the abnormal object.
[0137] In an exemplary embodiment, the corresponding relationship is the corresponding relationship between the monitoring object and the monitoring node; the above-mentioned fault location device also includes a node setting module, which is used to obtain at least one of the monitoring objects according to the functional module corresponding to the application; and obtain at least one of the monitoring nodes corresponding to each of the monitoring objects according to the monitoring indicators corresponding to the monitoring objects.
[0138] In an exemplary embodiment, the monitoring object includes at least one of an application, a middleware, a database, and a server.
[0139] In an exemplary embodiment, the fault location device further includes a contribution setting module for determining an object contribution of each of the monitored objects and a node contribution of each of the monitored nodes.
[0140] In an exemplary embodiment, the abnormal node module 310 is also used to, in the event of an application failure, determine the monitoring node as the abnormal node if the node parameters of the monitoring node are outside a preset parameter threshold; or, in the event of an application failure, determine the monitoring node as the abnormal node if the node parameters of the monitoring node do not match historical parameters.
[0141] Each module in the above-mentioned fault location device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0142] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a fault location method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0143] Those skilled in the art will understand that Figure 4 The 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 those shown in the figure, or combine certain components, or have a different arrangement of components.
[0144] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0145] In an exemplary embodiment, 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 in the above-mentioned method embodiments are implemented.
[0146] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0148] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0149] The technical features of the above embodiments may 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 application.
[0150] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A fault location method, characterized in that: The method comprises: In the event of a failure in an application, identifying an abnormal node corresponding to the application in pre-set monitoring nodes; Determine the abnormal object corresponding to the abnormal node according to the preset corresponding relationship; Determining a target contribution of the abnormal object, and determining a target fault object from the abnormal object according to the target contribution; The fault of the application is located according to the target fault object.
2. The method according to claim 1, characterized in that The locating the fault of the application according to the target fault object includes: Determine the abnormal node corresponding to the target fault object as the target fault node; The fault of the application is located according to the target fault node and the target fault object.
3. The method according to claim 1, characterized in that: The determining the target contribution of the abnormal object includes: Determining a node contribution of each abnormal node corresponding to the abnormal object; The node contribution is combined with the object contribution of the abnormal object to obtain the target contribution of the abnormal object.
4. The method according to claim 1, characterized in that: The corresponding relationship is the corresponding relationship between the monitoring object and the monitoring node; In the case of a failure of an application, before identifying an abnormal node corresponding to the application in a preset monitoring node, the method further includes: Obtaining at least one of the monitoring objects according to the functional modules corresponding to the application program; At least one monitoring node corresponding to each monitoring object is obtained according to the monitoring indicators corresponding to the monitoring objects.
5. The method according to claim 4, characterized in that The monitoring object includes at least one of an application, a middleware, a database and a server.
6. The method according to claim 4, characterized in that In the case of a failure of an application, before identifying an abnormal node corresponding to the application in a preset monitoring node, the method further includes: Determine the object contribution of each of the monitored objects and the node contribution of each of the monitored nodes.
7. The method according to claim 1, characterized in that In the case where an application fails, identifying an abnormal node corresponding to the application in a preset monitoring node includes: In the event of a failure in the application, if the node parameter of the monitoring node is outside a preset parameter threshold, the monitoring node is determined as the abnormal node; or, In the event of an application failure, if the node parameters of the monitoring node do not match the historical parameters, the monitoring node is determined as the abnormal node.
8. A fault location device, characterized in that: The device comprises: An abnormal node module, used to identify an abnormal node corresponding to the application in pre-set monitoring nodes when an application fails; An abnormal object module, used to determine the abnormal object corresponding to the abnormal node according to a preset corresponding relationship; A fault object module, used to determine a target contribution of the abnormal object, and determine a target fault object from the abnormal object according to the target contribution; A fault locating module is used to locate the fault of the application program according to the target fault object.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. 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 7 are implemented.
