Fault positioning method and device, electronic equipment and storage medium

By reporting call link data and parameter information in the microservice architecture, building call relationships and quickly locate the source nodes of the fault, the problem of difficulty and time-consuming failure positioning in the microservice architecture is solved.

CN118972242APending Publication Date: 2024-11-15BEIJING FANGDUODUO INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411048011.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In a microservice architecture, when multiple services are called in one request, it is difficult and time-consuming to locate a failed service.

Method used

By obtaining and reporting the link data and parameter information when it is called, as well as the parameter information of the parent node, the target server can build a call relationship of the calling link, determine the faulty node and quickly locate the result. The source node of the failure.

Benefits of technology

It reduces the difficulty and time-consuming of fault location, avoids manual analysis, and improves the efficiency of fault location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972242A_ABST
    Figure CN118972242A_ABST
Patent Text Reader

Abstract

The invention provides a fault positioning method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining first information of a first node when the first node is called; second information of the first node is obtained when the first node calls the second node, and the second node obtains first information of the second node when the first node calls the second node and sends the first information of the second node to a target server; sending the first information of the first node and the second information of the first node to a target server, so that the target server determines a calling relationship of each node on the calling link according to parameter information of the nodes included in the first information and the second information of each node on the calling link, and determining a fault node according to link data included in the first information and the second information of each node on the calling link, and determining a source node causing a fault according to the calling relationship and the fault node. The problems of high difficulty and long time consumption of micro-service architecture application and fault positioning service are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a fault location method, device, electronic device and storage medium. Background Art

[0002] Microservices (or microservice architecture) is a cloud-native architecture approach that includes many loosely coupled and independently deployable small components or microservices in a single application. These services are independent of each other. Therefore, it is easier to update the code of applications based on microservice architecture. That is, new features or functions can be added directly through microservices without having to update the entire application.

[0003] However, for applications based on microservice architecture, a request may need to call multiple services, such as Figure 1 As shown, when an interface of the application is called, the interface needs to call service A and service B, and service A further needs to call service C and service D. In this case, if any of the called services fails, it will cause problems with this request, which may be reflected on the client of the application as a prompt request timeout.

[0004] Among them, one request involves calling multiple services. When a fault occurs, in order to solve the fault, relevant personnel are currently required to check each service in turn and perform code analysis. The whole process is time-consuming and difficult to locate the fault.

[0005] From this, we can see that for current applications based on microservice architecture, when a request needs to call multiple services, it is difficult and time-consuming to locate the faulty service. Summary of the invention

[0006] The embodiments of the present application provide a fault location method, device, electronic device and storage medium to solve the problem that it is difficult and time-consuming to locate a fault when a request needs to call multiple services.

[0007] In a first aspect, an embodiment of the present application provides a fault location method, the method comprising:

[0008] When a first node is called, first information of the first node is acquired, wherein the first node is any node in the call link, and the first information of the first node includes first link data collected when the first node is called, first parameter information of the first node, and second parameter information of a parent node of the first node;

[0009] When the first node calls the second node, second information of the first node is obtained, wherein the second node is one of the child nodes of the first node on the calling link, and the second information of the first node includes second link data collected when the first node calls the second node and third parameter information of the first node; wherein, when the first node calls the second node, the second node obtains the first information of the second node and sends the first information of the second node to the target server;

[0010] Sending the first information of the first node and the second information of the first node to the target server, so that the target server determines the call relationship of each node on the call link according to the parameter information of the node included in the first information and the second information of each node on the call link, determines the fault node according to the link data included in the first information and the second information of each node on the call link, and determines the source node causing the fault according to the call relationship and the fault node;

[0011] The first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the operation data of the node.

[0012] In a second aspect, an embodiment of the present application provides a fault location method, the method comprising:

[0013] Receive first information and second information of each node on the call link, wherein the first information includes first link data collected when the current node is called, first parameter information of the current node, and second parameter information of the parent node of the current node, and the second information includes second link data collected when the current node calls its child node and third parameter information of the current node;

[0014] Determining a call relationship between each node on the call link according to the first information of each node on the call link and the parameter information of the node included in the second information;

[0015] Determine the faulty node according to the link data included in the first information and the second information of each node on the calling link;

[0016] Determine the source node causing the fault according to the call relationship and the fault node;

[0017] Among them, the nodes on the call link are nodes in the microservice architecture, the parameter information of the nodes is used to identify the nodes, and the link data represents the operation data of the nodes.

[0018] In a third aspect, an embodiment of the present application provides a fault location device, the device comprising:

[0019] A first acquisition module is used to acquire first information of the first node when the first node is called, wherein the first node is any node in the call link, and the first information of the first node includes first link data collected when the first node is called, first parameter information of the first node, and second parameter information of a parent node of the first node;

[0020] A second acquisition module is used to acquire second information of the first node when the first node calls the second node, wherein the second node is one of the child nodes of the first node on the calling link, and the second information of the first node includes second link data collected when the first node calls the second node and third parameter information of the first node; wherein when the first node calls the second node, the second node acquires the first information of the second node and sends the first information of the second node to the target server;

[0021] a first sending module, configured to send the first information of the first node and the second information of the first node to the target server, so that the target server determines the call relationship of each node on the call link according to the parameter information of the node included in the first information and the second information of each node on the call link, determines the fault node according to the link data included in the first information and the second information of each node on the call link, and determines the source node causing the fault according to the call relationship and the fault node;

[0022] The first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the operation data of the node.

[0023] In a fourth aspect, an embodiment of the present application provides a fault location device, the device comprising:

[0024] A first receiving module is used to receive first information and second information of each node on the call link, wherein the first information includes first link data collected when the current node is called, first parameter information of the current node, and second parameter information of the parent node of the current node, and the second information includes second link data collected when the current node calls its child node and third parameter information of the current node;

[0025] A first determining module, configured to determine a call relationship between each node on the call link according to the first information of each node on the call link and the parameter information of the node included in the second information;

[0026] A second determination module, configured to determine a faulty node based on the first information and link data included in the second information of each node on the calling link;

[0027] A third determination module, used to determine the source node causing the fault according to the call relationship and the fault node;

[0028] Among them, the nodes on the call link are nodes in the microservice architecture, the parameter information of the nodes is used to identify the nodes, and the link data represents the operation data of the nodes.

[0029] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the fault location method described in the first aspect or the second aspect.

[0030] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the fault location method described in the first aspect or the second aspect are implemented.

[0031] In the technical solution of the embodiment of the present application, when the first node is called, the first information of the first node can be obtained, and when the first node calls the second node, the second information of the first node can be obtained, so as to send the first information of the first node and the second information of the first node to the target server; wherein, when the first node calls the second node, the second node can obtain the first information of the second node, so as to send the first information of the second node to the target server; wherein, the first node is one of the nodes in the call link, the second node is one of the child nodes of the first node, the first information of the first node includes the first link data collected when the first node is called, the first parameter information of the first node, and the second parameter information of the parent node of the first node, and the second information of the first node includes the second link data collected when the first node calls the second node, and the third parameter information of the first node; so that the target server determines the call relationship of each node on the call link according to the parameter information of the node included in the first information and the second information of each node on the call link, determines the fault node according to the link data included in the first information and the second information of each node on the call link, and determines the source node causing the fault according to the call relationship and the fault node; wherein, the first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the running data of the node.

[0032] It can be seen that in an embodiment of the present invention, in a microservice architecture, any one of the nodes in the call link, when being called, can report the link data when being called and its own parameter information and the parameter information of its parent node to the target server. When a node calls any of its child nodes, it can report the link data when calling the child node and its own parameter information to the target server; in this way, in the microservice architecture, the link data and node parameter information of the entire calling process of the call link, and the parameter information of the node's parent node can be reported to the target server. The target server can then build a calling relationship between the nodes on the call link based on the node parameter information and the node's parent node parameter information, determine the faulty node based on the link data, and then quickly locate the source node that caused the fault based on the call relationship and the faulty node. The entire process does not require manual analysis, which reduces the difficulty of fault location and shortens the time.

[0033] Therefore, the embodiments of the present invention can solve the problem in the prior art that, in applications based on microservice architecture, when one request needs to call multiple services, it is difficult and time-consuming to locate the faulty service. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is an example diagram of calling multiple services;

[0035] Figure 2 is a flow chart of a fault location method provided by an embodiment of the present application;

[0036] Figure 3 is a flow chart of another fault location method provided by an embodiment of the present application;

[0037] Figure 4 is a schematic diagram of a specific implementation of the fault location method provided in an embodiment of the present application;

[0038] Figure 5 is a structural block diagram of a fault location device provided in an embodiment of the present application;

[0039] Figure 6 is a structural block diagram of another fault location device provided in an embodiment of the present application;

[0040] Figure 7 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present invention. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0043] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0044] First, refer to Figure 2 , shows a flowchart of the steps of a fault location method in an embodiment of the present application, the method can be applied to a server to which a first node belongs, the first node is one of the nodes in the call link; it can be understood that a node in the call link can be understood as a service or an interface; the method may include the following steps 201 to 203:

[0045] Step 201: when a first node is called, first information of the first node is obtained.

[0046] The first information of the first node includes first link data collected when the first node is called, first parameter information of the first node, and second parameter information of the parent node of the first node.

[0047] It can be understood that the first link data refers to the relevant data of the code running of the first node when the first node is called; it can also be understood that the first link data is used to indicate the index of the code running of the first node when the first node is called. Therefore, according to the first link data, it can be determined whether the code running of the first node is normal when the first node is called; for example, when the first node is called, a structured query language (SQL) statement is executed, then the first link data refers to the relevant information of the data found by executing the SQL statement;

[0048] The first parameter information of the first node is the relevant parameters of the first node;

[0049] The second parameter information of the parent node of the first node is the relevant parameters of the parent node of the first node.

[0050] Among them, the node that can call the first node belongs to the parent node of the first node; the node that can be called by the first node belongs to the child node of the first node.

[0051] It can be seen from step 201 that in an embodiment of the present invention, when any node in the call link is called, the link data of the node when it is called, the relevant parameters of the node, and the relevant parameters of the parent node of the node can be obtained, and then reported to the target server.

[0052] Step 202: When the first node calls the second node, second information of the first node is obtained.

[0053] The second node is one of the child nodes of the first node on the calling link, and the second information of the first node includes the second link data collected when the first node calls the second node and the third parameter information of the first node.

[0054] In addition, when the first node calls the second node, the second node can obtain the first information of the second node and send the first information of the second node to the target server; wherein, the first information of the second node includes the third link data collected when the second node is called, the fifth parameter information of the second node, and the sixth parameter information of the parent node of the second node.

[0055] It should be noted that a node can be called by its parent node and can also call its child nodes. Therefore, when a node calls any of its child nodes, it can also obtain the link data and parameter information of the node and report them to the target server.

[0056] It can be understood that the second link data refers to the relevant data of the code running of the first node when the first node calls the second node; it can also be understood that the second link data is used to indicate the indicator of the code running of the first node when the first node calls the second node. Therefore, according to the second link data, it can be determined whether the code running of the first node is normal when the first node calls the second node.

[0057] The third link data refers to the relevant data of the code running of the second node when the first node calls the second node; it can also be understood that the third link data is used to indicate the indicator of the code running of the second node when the first node calls the second node. Therefore, according to the third link data, it can be determined whether the code running of the second node is normal when the first node calls the second node.

[0058] Step 203: Send the first information of the first node and the second information of the first node to the target server, so that the target server determines the calling relationship of each node on the calling link according to the parameter information of the nodes included in the first information and the second information of each node on the calling link, determines the faulty node according to the link data included in the first information and the second information of each node on the calling link, and determines the source node causing the fault according to the calling relationship and the faulty node.

[0059] The first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the operation data of the node.

[0060] It should be noted that the various information included in the first information and the second information of the first node may be reported to the target server together or separately.

[0061] Among them, a node can be called by its parent node, and can also call its child node. Therefore, based on the parameter information of the nodes included in the first information and the second information of each node on the calling link, a calling relationship between each node on the calling link can be established; and the link data included in the first information and the second information of each node on the above calling link can indicate whether the operation of each node is normal. Therefore, based on these link data, the faulty node can be determined, and thus, on the basis of the above calling relationship, the source node causing the fault can be quickly located in combination with the faulty node.

[0062] For example, an online payment service needs to call nodes 1, 2, 3, 4, and 5 in sequence, wherein, through the link data in the first information and the second information of each node on the calling link, it is found that nodes 2, 3, and 4 fail, causing the online payment service to fail. However, if the calling relationship of each node on the calling link is unknown, it is necessary to perform log analysis on the failed nodes 2, 3, and 4 respectively to locate the source node that caused the failure. The whole process is difficult and time-consuming. In the embodiment of the present application, the target server can establish a calling relationship between each node based on the parameter information of the node in the first information and the second information reported by each node on the calling link. Based on the calling relationship and the node with the failure, the source node that caused the failure can be quickly found.

[0063] It can be seen from the above steps 201 to 203 that in an embodiment of the present invention, in a microservice architecture, any one of the nodes in the call link, when being called, can report the link data when being called and its own parameter information and the parameter information of its parent node to the target server. When a node calls any of its child nodes, it can report the link data when calling the child node and its own parameter information to the target server; in this way, in the microservice architecture, the link data and the node parameter information in the entire calling process of the call link, and the parameter information of the node's parent node can be reported to the target server. The target server can then build a calling relationship between the nodes on the call link based on the node parameter information and the node's parent node parameter information, determine the faulty node based on the link data, and then quickly locate the source node that causes the fault based on the call relationship and the faulty node. The entire process does not require manual analysis, which reduces the difficulty of fault location and shortens the time.

[0064] Therefore, the embodiments of the present invention can solve the problem in the prior art that, in applications based on microservice architecture, when one request needs to call multiple services, it is difficult and time-consuming to locate the faulty service.

[0065] Optionally, the method further comprises:

[0066] When the first node calls the second node, obtain the third information of the first node, and send the third information of the first node to the second node, so that the second node obtains the first information of the second node when the second node is called according to the third information of the first node;

[0067] The third information of the first node includes: the fourth parameter information of the first node, the first indication information (which may be expressed as Sample) of whether the server to which the first node belongs starts data collection, and the second indication information (which may be expressed as Iftrace) of whether the first node starts reporting collected data to the target server;

[0068] The first information of the second node includes the third link data collected when the second node is called, the fifth parameter information of the second node, and the sixth parameter information of the parent node of the second node.

[0069] In addition, a server may include one or more nodes (i.e., interfaces or services), and the above-mentioned first indication information indicates at the granularity of the server whether to collect link data, and the second indication information indicates at the granularity of the node whether to report the collected link data to the target server (it can also be understood as: the second indication information indicates at the granularity of the node whether to collect link data).

[0070] It can be seen from this that in an embodiment of the present invention, when the first node calls the second node, the first node can also transmit the third information of the first node to the second node, so that the second node can obtain its own first information based on the third information of the first node, and thus report its own first information to the target server.

[0071] It should be noted that the first node informs the second node of the fourth parameter information of the first node through the third information of the first node, so that the second node can know which node its parent node is, and then obtain the sixth parameter information of the parent node of the second node.

[0072] Optionally, the process of acquiring the first link data includes:

[0073] When the first node is called, executing the hook function of the first node to obtain the first link data;

[0074] The process of acquiring the second link data includes:

[0075] When the first node calls the second node, the hook function of the first node is executed to obtain the second link data.

[0076] In order to facilitate understanding of the above-mentioned acquisition of the first link data and the second link data through the hook function, the hook function is introduced as follows:

[0077] PHP (i.e. Hypertext Preprocessor) hook functions allow custom code to be added in response to specific events; i.e. the characteristics of PHP language (interpreted language), PHP hooks can be used to implement code-free embedded link data collection.

[0078] The principle of PHP hook is actually function interception. For example, when executing SQL statements, if the database used is the PHP Data Objects (PDO) component, all SQL statements will definitely execute the exec function. Therefore, when parsing at the bottom level of the PHP language, you only need to intercept the PDO class name through the PHP hook function and execute the command of the function exec. Then, all SQL statements executed in the PHP code will be intercepted. Then, before the execution of this exec function, the link data to be collected can be collected. In this way, the code link data of the PDO class name can be collected 100% without missing anything; because as long as the PHP code is at the bottom level, it must run to the PHP hook. Therefore, if the PHP hook finds that the code with the class name and function name matching PDO->exec is intercepted. Among them, exec is usually a keyword used to execute stored procedures.

[0079] In addition, the entire process can be written in C++ in the PHP extension. You only need to install the generated PHP extension on the node server, which is as simple as installing a plug-in. Developers can focus on business code without being aware of it. In this way, the collection of link data does not need to embed business code in the service, which reduces the complexity, readability and maintenance cost of business code, thereby solving the problem of business code intrusion. Moreover, the PHP extension is written in C++, which is the best in terms of language performance. At the same time, link data is collected at the bottom layer of the PHP language, and the impact on interface performance can be basically ignored.

[0080] Therefore, in an embodiment of the present invention, a PHP extension (i.e., a hook function) can be installed on the server to which each node belongs, so that when the node is called or the node calls its child node, the PHP extension can be triggered to execute to collect link data, thereby avoiding intrusion into the business code during link data collection, collecting more comprehensive link data, and reducing the impact on interface performance.

[0081] In addition, it is understandable that when obtaining the third link data collected when the second node is called, the PHP hook function of the second node can also be used.

[0082] Optionally, the first link data includes at least one of the following:

[0083] The start time information of the first node being called;

[0084] End time information of the calling of the first node;

[0085] The operation data of the first node when being called;

[0086] The first parameter information includes at least one of the following:

[0087] identification information of the call link to which the first node belongs;

[0088] identification information of the first node;

[0089] identification information of the server to which the first node belongs;

[0090] address information of the server to which the first node belongs;

[0091] The second parameter information includes at least one of the following:

[0092] identification information of a parent node of the first node;

[0093] The scheduling order of the parent node of the first node and the first target node, the first target node and the parent node of the first node are child nodes of the same parent node.

[0094] It can be seen that the first information of the first node may include at least one of the following items A-1 to A-9:

[0095] Item A-1: ​​the start time information of the first node being called (which can be expressed as startTime);

[0096] It is understandable that if the link data when the first node is called is obtained through the hook function of the first node, then the start time when the first node is called can also be understood as the time when the hook function of the first node starts to execute.

[0097] Item A-2: end time information of the first node being called (which may be expressed as endTime);

[0098] It is understandable that if the link data when the first node is called is obtained through the hook function of the first node, then the end time of the call of the first node can also be understood as the time when the hook function of the first node ends execution.

[0099] Item A-3: operation data when the first node is called (which can be expressed as a Tag); the operation data can be expressed in the form of a key-value pair;

[0100] Among them, reporting items A-1 to A-3 to the target server can enable the target server to clearly understand the time period when the first node is called and the operating data when the first node is called within the time period, thereby facilitating the target server to determine whether the first node has a fault based on the operating data of the first node within the time period, thereby laying the foundation for the target server to locate the fault of the entire scheduling link.

[0101] Item A-4: identification information of the call link to which the first node belongs (which may be expressed as traceid);

[0102] The identification information of the call link to which the first node belongs can be understood as the full link identification of the call link; the identification information can be represented by a character string and can be generated according to a rule by a traffic access layer of the server;

[0103] In addition, when the target server receives identification information of the call link to which the node belongs included in the first information of each node on the call link, it can clearly determine the call link between the nodes in which the call relationship is established based on the first information and second information of each node received.

[0104] Item A-5: identification information of the first node (which may be expressed as Tracesegmentid);

[0105] The identification information of the first node may be represented by a character string and may be generated by a local machine (i.e., a server to which the first node belongs) according to a rule;

[0106] Item A-6: identification information of the server to which the first node belongs (which may be expressed as Service or Operation);

[0107] The identification information of the server to which the first node belongs may be understood as the name of the server, or the name of the component class to which it belongs;

[0108] Item A-7: address information of the server to which the first node belongs (which may be expressed as Serviceinstance, peer, or IP); the address information may be an IP address, or an IP address and a port;

[0109] Item A-8: identification information of the parent node of the first node (which may be expressed as Parenttracesegmentid);

[0110] It is understandable that the identification information of the parent node of the first node may be transmitted to the first node by the node that calls the first node (ie, the parent node of the first node);

[0111] Item A-9: a scheduling order (which may be expressed as Parentspanid) of a parent node of the first node and a first target node, wherein the first target node and the parent node of the first node are child nodes of the same parent node;

[0112] It can be understood that the scheduling order of the parent node of the first node and the first target node can be transmitted to the first node by the node that schedules the first node (ie, the parent node of the first node).

[0113] Among them, through the various information described in A-5 to A-9 above, the parent node of the first node can be determined, thereby laying a foundation for establishing the call relationship between the nodes in the call link.

[0114] It should be noted that the first information including the above-mentioned information A-1 to A-9 can also be called the root node protocol content; that is, when each node in the call link is called, it can report its own root node protocol content as the root node to the target server.

[0115] Optionally, the second information of the first node further includes: seventh parameter information of a parent node of the first node.

[0116] It can be seen from this that when the first node calls the second node, it can also report the seventh parameter information of the parent node of the first node to the target server. In this way, the target server can also determine the parent node of the first node based on the seventh parameter information included in the second information.

[0117] Optionally, the second link data includes at least one of the following:

[0118] The start time information of the first node calling the second node;

[0119] End time information of the first node calling the second node;

[0120] The operation data of the first node when the first node calls the second node;

[0121] The third parameter information includes at least one of the following:

[0122] identification information of the first node;

[0123] a scheduling order of the first node and a second target node, the second target node and the first node being child nodes of the same parent node;

[0124] identification information of the server to which the first node belongs;

[0125] address information of the server to which the first node belongs;

[0126] The seventh parameter information includes at least one of the following:

[0127] The scheduling order of the parent node of the first node and the first target node, the first target node and the parent node of the first node are child nodes of the same parent node.

[0128] It can be seen that the second information of the first node may include at least one of the following items B-1 to B-8:

[0129] Item B-1: start time information (which may be expressed as startTime) at which the first node calls the second node;

[0130] It is understandable that if the link data when the first node calls the second node is obtained through the hook function of the first node, then the start time of the first node calling the second node can also be understood as the time when the hook function of the first node starts to execute.

[0131] Item B-2: end time information (which may be expressed as endTime) of the first node calling the second node;

[0132] It is understandable that if the link data when the first node calls the second node is obtained through the hook function of the first node, then the end time of the first node calling the second node can also be understood as the time when the hook function of the first node ends execution.

[0133] Item B-3: operating data (which may be expressed as a tag) of the first node when the first node calls the second node; the operating data may be expressed in the form of a key-value pair;

[0134] Item B-4: identification information of the first node (which may be expressed as Tracesegmentid); wherein the identification information of the first node may be expressed by a character string and may be generated by a local machine (i.e., a server to which the first node belongs) according to a rule;

[0135] Item B-5: a scheduling order (which may be expressed as a spanid) between the first node and a second target node, where the second target node and the first node are child nodes of the same parent node; wherein the scheduling order may be passed to the child nodes of the first node;

[0136] Item B-6: identification information of the server to which the first node belongs (which may be expressed as Service or Operation);

[0137] The identification information of the server to which the first node belongs may be understood as the name of the server, or the name of the component class to which it belongs;

[0138] Item B-7: address information of the server to which the first node belongs (which may be expressed as Serviceinstance, peer, or IP); the address information may be an IP address, or an IP address and a port;

[0139] Item B-8: The scheduling order of the parent node of the first node and the first target node (which can be expressed as Parentspanid), the first target node and the parent node of the first node are child nodes of the same parent node.

[0140] It can be understood that the scheduling order of the parent node of the first node and the first target node can be transmitted to the first node by the node that schedules the first node (ie, the parent node of the first node).

[0141] It should be noted that the second information including the above-mentioned information B-1 to B-8 can also be called leaf node protocol content; that is, when each node in the calling link calls its child node, it can report its leaf node protocol content to the target server.

[0142] Optionally, the fourth parameter information includes at least one of the following C-1 to C-5:

[0143] Item C-1: identification information of the call link to which the first node belongs (which may be expressed as traceid);

[0144] Item C-2: identification information of the first node (which may be expressed as Tracesegmentid);

[0145] Item C-3: the scheduling order of the first node and the second target node (which can be expressed as a spanid), where the second target node and the first node are child nodes of the same parent node;

[0146] Item C-4: identification information of the server to which the first node belongs (which may be expressed as Service or Operation);

[0147] Item C-5: address information of the server to which the first node belongs (can be expressed as Service instance, peer or IP).

[0148] From this, it can be seen that when the first node calls the second node, the first node can send at least one of C-1 to C-5, the above-mentioned first indication information, and the second indication information to the second node; so that the second node can obtain the second information of the second node when it is called.

[0149] It should be noted that the third information including C-1 to C-5, the above-mentioned first indication information, and at least one of the above-mentioned second indication information can be sent by the first node to the second node can also be called the transmission protocol content; that is, when each node in the calling link calls its child node, it can pass the transmission protocol content to the child node it calls.

[0150] In addition, the transmission protocol content can be transmitted in the form of an encrypted string. For example, various information included in the transmission protocol content can be encoded using an 8-bit byte encoding method (base64) to achieve encryption.

[0151] Second, refer to Figure 3 , shows a flowchart of the steps of a fault location method in an embodiment of the present application, the method can be applied to a target server, and the method can include the following steps 301 to 304:

[0152] Step 301: Receive first information and second information of each node on the call link.

[0153] Among them, the first information includes the first link data collected when the current node is called, the first parameter information of the current node, and the second parameter information of the parent node of the current node; the second information includes the second link data collected when the current node calls its child node and the third parameter information of the current node.

[0154] For example, if the first node is the current node, the first information of the first node includes the first link data collected when the first node is called, the first parameter information of the first node, and the second parameter information of the parent node of the first node; the second information of the first node includes the second link data collected when the first node calls the second node, and the third parameter information of the first node.

[0155] It can be understood that the first link data refers to the relevant data of the code running of the first node when the first node is called; it can also be understood that the first link data is used to indicate the index of the code running of the first node when the first node is called. Therefore, according to the first link data, it can be determined whether the code running of the first node is normal when the first node is called; for example, when the first node is called, an SQL statement is executed, then the first link data refers to the relevant information of the data searched by executing the SQL statement;

[0156] The second link data refers to the relevant data of the code running of the first node when the first node calls the second node; it can also be understood that the second link data is used to indicate the indicator of the code running of the first node when the first node calls the second node. Therefore, according to the second link data, it can be determined whether the code running of the first node is normal when the first node calls the second node.

[0157] The first parameter information of the first node is the relevant parameters of the first node;

[0158] The second parameter information of the parent node of the first node is the relevant parameters of the parent node of the first node;

[0159] A node that can call the first node is a parent node of the first node; a node that can be called by the first node is a child node of the first node.

[0160] It can be seen from this that in an embodiment of the present invention, when any node in the call link is called, the link data of the node when it is called, the relevant parameters of the node, and the relevant parameters of the parent node of the node can be obtained, and then reported to the target server.

[0161] In addition, it should be noted that a node can be called by its parent node and can also call its child nodes. Therefore, when a node calls any of its child nodes, it can also obtain the link data and parameter information of the node and report them to the target server.

[0162] Step 302: Determine the call relationship of each node on the call link according to the first information of each node on the call link and the parameter information of the node included in the second information.

[0163] Step 303: Determine the faulty node according to the link data included in the first information and the second information of each node on the calling link.

[0164] Step 304: Determine the source node causing the fault according to the call relationship and the fault node.

[0165] The first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the operation data of the node.

[0166] In addition, a node can be called by its parent node and can also call its child node. Therefore, based on the parameter information of the nodes included in the first information and the second information of each node on the calling link, a calling relationship between each node on the calling link can be established; and the link data included in the first information and the second information of each node on the above calling link can indicate whether the operation of each node is normal. Therefore, based on these link data, the faulty node can be determined, and thus, on the basis of the above calling relationship, the source node causing the fault can be quickly located in combination with the faulty node.

[0167] For example, an online payment service needs to call nodes 1, 2, 3, 4, and 5 in sequence, wherein, through the link data in the first information and the second information of each node on the calling link, it is found that nodes 2, 3, and 4 fail, causing the online payment service to fail. However, if the calling relationship of each node on the calling link is unknown, it is necessary to perform log analysis on the failed nodes 2, 3, and 4 respectively to locate the source node that caused the failure. The whole process is difficult and time-consuming. In the embodiment of the present application, the target server can establish a calling relationship between each node based on the parameter information of the node in the first information and the second information reported by each node on the calling link. Based on the calling relationship and the node with the failure, the source node that caused the failure can be quickly found.

[0168] It can be seen from the above steps 301 to 304 that in an embodiment of the present invention, in a microservice architecture, any one of the nodes in the call link, when being called, can report the link data when being called and its own parameter information and the parameter information of its parent node to the target server. When a node calls any of its child nodes, it can report the link data when calling the child node and its own parameter information to the target server; in this way, in the microservice architecture, the link data and node parameter information of the entire calling process of the call link, and the parameter information of the node's parent node can be reported to the target server. The target server can then build a calling relationship between the nodes on the call link based on the node parameter information and the node's parent node parameter information, determine the faulty node based on the link data, and then quickly locate the source node that causes the fault based on the call relationship and the faulty node. The entire process does not require manual analysis, which reduces the difficulty of fault location and shortens the time.

[0169] Therefore, the embodiments of the present invention can solve the problem in the prior art that, in applications based on microservice architecture, when one request needs to call multiple services, it is difficult and time-consuming to locate the faulty service.

[0170] Optionally, the first link data includes at least one of the following:

[0171] The start time information of the current node being called;

[0172] The end time information of the current node being called;

[0173] The running data when the current node is called;

[0174] The first parameter information includes at least one of the following:

[0175] Identification information of the call link to which the current node belongs;

[0176] The identification information of the current node;

[0177] The identification information of the server to which the current node belongs;

[0178] The address information of the server to which the current node belongs;

[0179] The second parameter information includes at least one of the following:

[0180] The identification information of the parent node of the current node;

[0181] The scheduling order of the parent node of the current node and the first target node, the first target node and the parent node of the current node are child nodes of the same parent node.

[0182] It should be noted that the relevant description of the various contents included in the first information can be found in the above description and will not be repeated here.

[0183] Optionally, the second information also includes seventh parameter information of the parent node of the current node.

[0184] Optionally, the second link data includes at least one of the following:

[0185] The current node calls the start time information of its child nodes;

[0186] The current node calls the end time information of its child nodes;

[0187] The running data when the current node calls its child node;

[0188] The third parameter information includes at least one of the following:

[0189] The identification information of the current node;

[0190] a scheduling order of a current node and a second target node, wherein the second target node and the current node are child nodes of the same parent node;

[0191] The identification information of the server to which the current node belongs;

[0192] The address information of the server to which the current node belongs;

[0193] The seventh parameter information includes at least one of the following:

[0194] The scheduling order of the parent node of the current node and the first target node, the first target node and the parent node of the current node are child nodes of the same parent node.

[0195] It should be noted that the relevant description of the various contents included in the second information can be found in the above description and will not be repeated here.

[0196] In summary, the specific implementation of the fault location method in the embodiment of the present application is as follows:

[0197] like Figure 4As shown in the figure, interface A is a network (web) interface that provides functions to the outside world. In the interface A code, three services B0, B1, and B2 are called in sequence (distributed in three independent cluster servers respectively). In service B0, services C0 and C1 are called in sequence. In service B2, services C2, C3, and C4 are called in sequence. Finally, service C3 calls service D0. It can be seen that although there is only one interface A, it ultimately involves 10 independent cluster servers and hundreds of machines. Any problem with any machine may cause interface A to be unavailable. Therefore, it is necessary to connect the data reported by each server in an orderly manner, and then form a complete call link view. When interface A reports an error or exception, we can quickly locate the problem and confirm which service and which machine has the problem.

[0198] In order to facilitate understanding of the application of the fault location method of the embodiment of the present invention, the above Figure 4 To simplify, take a request to interface A involving services B0 and C0 as an example to introduce the fault location method of the embodiment of the present invention:

[0199] When the client calls interface A, the PHP hook function of interface A is triggered to execute, and the link data when interface A is called is collected, so as to construct the root node protocol content of interface A based on the collected link data and report it to the target server;

[0200] When interface A calls service B0, interface A constructs the transfer protocol content and sends it to service B0, so that service B0 can know who its parent node is; and when interface A calls service B0, it can also trigger the execution of interface A's PHP hook function, collect link data when interface A calls service B0, and construct the leaf node protocol content of interface A based on the collected link data, so as to report the leaf node protocol content of interface A to the target server;

[0201] When service B0 is called, the PHP hook function of service B0 is triggered to execute, and the link data when service B0 is called is collected. Based on the collected link data and the transmission protocol content sent by interface A to service B0, the root node protocol content of service B0 is constructed and reported to the target server;

[0202] When service B0 calls service C0, service B0 builds the transfer protocol content and sends it to service C0, so that service C0 can know who its parent node is; and when service B0 calls service C0, it can also trigger the execution of service B0's PHP hook function, collect link data when service B0 calls service C0, and build service B0's leaf node protocol content based on the collected link data, so as to report service B0's leaf node protocol content to the target server;

[0203] When service C0 is called, the PHP hook function of service C0 is triggered to execute, and the link data when service C0 is called is collected. Based on the collected link data and the transfer protocol content sent by service B0 to service C0, the root node protocol content of service C0 is constructed and reported to the target server;

[0204] In this way, the target server can determine the calling relationship between each service or interface, that is, A→B0→C0, based on the root node protocol content and leaf node protocol content received from each service; the faulty node can be determined based on the link data contained in the root node protocol and the leaf node protocol, and then based on the faulty node and the calling relationship, the source node that caused the fault in the calling link can be determined.

[0205] Among them, the various information that can be included in the root node protocol content, the various information that can be included in the leaf node protocol content, and the various information that can be included in the transmission protocol content can be found in the previous article, and will not be repeated here.

[0206] In a third aspect, an embodiment of the present application further provides a fault location device, which is applied to a server to which a first node belongs, wherein the first node is one of the nodes in a call link; Figure 5 As shown, the device may include the following modules:

[0207] A first acquisition module 501 is used to acquire first information of a first node when the first node is called, wherein the first node is any node in a call link, and the first information of the first node includes first link data collected when the first node is called, first parameter information of the first node, and second parameter information of a parent node of the first node;

[0208] A second acquisition module 502 is configured to acquire second information of the first node when the first node calls the second node, wherein the second node is one of the child nodes of the first node on the calling link, and the second information of the first node includes second link data collected when the first node calls the second node and third parameter information of the first node; wherein when the first node calls the second node, the second node acquires the first information of the second node and sends the first information of the second node to the target server;

[0209] A first sending module 503 is used to send the first information of the first node and the second information of the first node to the target server, so that the target server determines the call relationship of each node on the call link according to the node parameter information included in the first information and the second information of each node on the call link, determines the fault node according to the link data included in the first information and the second information of each node on the call link, and determines the source node causing the fault according to the call relationship and the fault node;

[0210] The first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the operation data of the node.

[0211] Optionally, the device further comprises:

[0212] a second sending module, configured to obtain the third information of the first node when the first node calls the second node, and send the third information of the first node to the second node, so that the second node obtains the first information of the second node when the second node is called according to the third information of the first node;

[0213] The third information of the first node includes: fourth parameter information of the first node, first indication information of whether the server to which the first node belongs starts data collection, and second indication information of whether the first node starts reporting collected data to the target server.

[0214] Optionally, when the first acquisition module 501 acquires the first link data, it is specifically used to:

[0215] When the first node is called, executing the hook function of the first node to obtain the first link data;

[0216] When the second acquisition module 502 acquires the second link data, it is specifically used to:

[0217] When the first node calls the second node, the hook function of the first node is executed to obtain the second link data.

[0218] Optionally, the first link data includes at least one of the following:

[0219] The start time information of the first node being called;

[0220] End time information of the calling of the first node;

[0221] The operation data of the first node when being called;

[0222] The first parameter information includes at least one of the following:

[0223] identification information of the call link to which the first node belongs;

[0224] identification information of the first node;

[0225] identification information of the server to which the first node belongs;

[0226] address information of the server to which the first node belongs;

[0227] The second parameter information includes at least one of the following:

[0228] identification information of a parent node of the first node;

[0229] The scheduling order of the parent node of the first node and the first target node, the first target node and the parent node of the first node are child nodes of the same parent node.

[0230] Optionally, the second information also includes seventh parameter information of the parent node of the first node.

[0231] Optionally, the second link data includes at least one of the following:

[0232] The start time information of the first node calling the second node;

[0233] End time information of the first node calling the second node;

[0234] The operation data of the first node when the first node calls the second node;

[0235] The third parameter information includes at least one of the following:

[0236] identification information of the first node;

[0237] a scheduling order of the first node and a second target node, the second target node and the first node being child nodes of the same parent node;

[0238] identification information of the server to which the first node belongs;

[0239] address information of the server to which the first node belongs;

[0240] The seventh parameter information includes at least one of the following:

[0241] The scheduling order of the parent node of the first node and the first target node, the first target node and the first node are child nodes of the same parent node.

[0242] Optionally, the fourth parameter information includes at least one of the following:

[0243] identification information of the call link to which the first node belongs;

[0244] identification information of the first node;

[0245] a scheduling order of the first node and a second target node, the second target node and the first node being child nodes of the same parent node;

[0246] identification information of the server to which the first node belongs;

[0247] Address information of the server to which the first node belongs.

[0248] In a fourth aspect, the present application also provides a fault location device, which is applied to a target server, such as Figure 6 As shown, the device may include the following modules:

[0249] The first receiving module 601 is used to receive the first information and the second information of each node on the call link, wherein the first information includes the first link data collected when the current node is called, the first parameter information of the current node, and the second parameter information of the parent node of the current node, and the second information includes the second link data collected when the current node calls its child node and the third parameter information of the current node;

[0250] A first determining module 602, configured to determine a call relationship between each node on the call link according to the first information of each node on the call link and the parameter information of the node included in the second information;

[0251] A second determination module 603, configured to determine a faulty node according to the first information of each node on the calling link and the link data included in the second information;

[0252] A third determination module 604 is used to determine the source node causing the fault according to the call relationship and the fault node;

[0253] Among them, the nodes on the call link are nodes in the microservice architecture, the parameter information of the nodes is used to identify the nodes, and the link data represents the operation data of the nodes.

[0254] Optionally, the first link data includes at least one of the following:

[0255] The start time information of the current node being called;

[0256] The end time information of the current node being called;

[0257] The running data when the current node is called;

[0258] The first parameter information includes at least one of the following:

[0259] Identification information of the call link to which the current node belongs;

[0260] The identification information of the current node;

[0261] The identification information of the server to which the current node belongs;

[0262] The address information of the server to which the current node belongs;

[0263] The second parameter information includes at least one of the following:

[0264] The identification information of the parent node of the current node;

[0265] The scheduling order of the parent node of the current node and the first target node, the first target node and the parent node of the current node are child nodes of the same parent node.

[0266] Optionally, the second information includes seventh parameter information of a parent node of the first node.

[0267] Optionally, the second link data includes at least one of the following:

[0268] The current node calls the start time information of its child nodes;

[0269] The current node calls the end time information of its child nodes;

[0270] The running data when the current node calls its child node;

[0271] The third parameter information includes at least one of the following:

[0272] The identification information of the current node;

[0273] a scheduling order of a current node and a second target node, wherein the second target node and the current node are child nodes of the same parent node;

[0274] The identification information of the server to which the current node belongs;

[0275] The address information of the server to which the current node belongs;

[0276] The seventh parameter information includes at least one of the following:

[0277] The scheduling order of the parent node of the current node and the first target node, the first target node and the parent node of the current node are child nodes of the same parent node.

[0278] As for the device 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.

[0279] On the other hand, an embodiment of the present application also provides an electronic device, including a memory, a processor, a bus, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the fault location method described in the first aspect or the second aspect are implemented.

[0280] For example, Figure 7 A schematic diagram of the physical structure of an electronic device is shown.

[0281] like Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730, and the processor 710 is used to execute the steps in the fault location method described in the first aspect or the second aspect.

[0282] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0283] On the other hand, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the fault location method described in the first aspect or the second aspect provided in the above embodiments.

[0284] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0285] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0286] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A fault location method, characterized in that: Applied to the first node, the method comprises: When a first node is called, first information of the first node is acquired, wherein the first node is any node in the call link, and the first information of the first node includes first link data collected when the first node is called, first parameter information of the first node, and second parameter information of a parent node of the first node; When the first node calls the second node, second information of the first node is obtained, wherein the second node is one of the child nodes of the first node on the calling link, and the second information of the first node includes second link data collected when the first node calls the second node and third parameter information of the first node; wherein, when the first node calls the second node, the second node obtains the first information of the second node and sends the first information of the second node to the target server; Sending the first information of the first node and the second information of the first node to the target server, so that the target server determines the call relationship of each node on the call link according to the parameter information of the node included in the first information and the second information of each node on the call link, determines the fault node according to the link data included in the first information and the second information of each node on the call link, and determines the source node causing the fault according to the call relationship and the fault node; The first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the operation data of the node.

2. The method according to claim 1, characterized in that The method further comprises: When the first node calls the second node, obtain the third information of the first node, and send the third information of the first node to the second node, so that the second node obtains the first information of the second node when the second node is called according to the third information of the first node; The third information of the first node includes: fourth parameter information of the first node, first indication information of whether the server to which the first node belongs starts data collection, and second indication information of whether the first node starts reporting collected data to the target server.

3. The method according to claim 1, characterized in that The process of acquiring the first link data includes: When the first node is called, executing the hook function of the first node to obtain the first link data; The process of acquiring the second link data includes: When the first node calls the second node, the hook function of the first node is executed to obtain the second link data.

4. The method according to any one of claims 1 to 3, characterized in that: The first link data includes at least one of the following: The start time information of the first node being called; End time information of the calling of the first node; The operation data of the first node when being called; The first parameter information includes at least one of the following: identification information of the call link to which the first node belongs; identification information of the first node; identification information of the server to which the first node belongs; address information of the server to which the first node belongs; The second parameter information includes at least one of the following: identification information of a parent node of the first node; a scheduling order of a parent node of the first node and a first target node, wherein the first target node and the parent node of the first node are child nodes of the same parent node; The second link data includes at least one of the following: The start time information of the first node calling the second node; End time information of the first node calling the second node; The operation data of the first node when the first node calls the second node; The third parameter information includes at least one of the following: identification information of the first node; a scheduling order of the first node and a second target node, the second target node and the first node being child nodes of the same parent node; identification information of the server to which the first node belongs; Address information of the server to which the first node belongs.

5. The method according to claim 2, characterized in that: The fourth parameter information includes at least one of the following: identification information of the call link to which the first node belongs; identification information of the first node; a scheduling order of the first node and a second target node, the second target node and the first node being child nodes of the same parent node; identification information of the server to which the first node belongs; Address information of the server to which the first node belongs.

6. A fault location method, characterized in that: The method comprises: Receive first information and second information of each node on the call link, wherein the first information includes first link data collected when the current node is called, first parameter information of the current node, and second parameter information of the parent node of the current node, and the second information includes second link data collected when the current node calls its child node and third parameter information of the current node; Determining a call relationship between each node on the call link according to the first information of each node on the call link and the parameter information of the node included in the second information; Determine the faulty node according to the link data included in the first information and the second information of each node on the calling link; Determine the source node causing the fault according to the call relationship and the fault node; Among them, the nodes on the call link are nodes in the microservice architecture, the parameter information of the nodes is used to identify the nodes, and the link data represents the operation data of the nodes.

7. A fault location device, characterized in that: The device comprises: A first acquisition module is used to acquire first information of the first node when the first node is called, wherein the first node is any node in the call link, and the first information of the first node includes first link data collected when the first node is called, first parameter information of the first node, and second parameter information of a parent node of the first node; A second acquisition module is used to acquire second information of the first node when the first node calls the second node, wherein the second node is one of the child nodes of the first node on the calling link, and the second information of the first node includes second link data collected when the first node calls the second node and third parameter information of the first node; wherein when the first node calls the second node, the second node acquires the first information of the second node and sends the first information of the second node to the target server; a first sending module, configured to send the first information of the first node and the second information of the first node to the target server, so that the target server determines the call relationship of each node on the call link according to the parameter information of the node included in the first information and the second information of each node on the call link, determines the fault node according to the link data included in the first information and the second information of each node on the call link, and determines the source node causing the fault according to the call relationship and the fault node; The first node and the second node are both nodes in the microservice architecture, the parameter information of the node is used to identify the node, and the link data represents the operation data of the node.

8. A fault location device, characterized in that: Applied to a target server, the device comprises: A first receiving module is used to receive first information and second information of each node on the call link, wherein the first information includes first link data collected when the current node is called, first parameter information of the current node, and second parameter information of the parent node of the current node, and the second information includes second link data collected when the current node calls its child node and third parameter information of the current node; A first determining module, configured to determine a call relationship between each node on the call link according to the first information of each node on the call link and the parameter information of the node included in the second information; A second determination module, configured to determine a faulty node based on the first information and link data included in the second information of each node on the calling link; A third determination module, used to determine the source node causing the fault according to the call relationship and the fault node; Among them, the nodes on the call link are nodes in the microservice architecture, the parameter information of the nodes is used to identify the nodes, and the link data represents the operation data of the nodes.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the fault location method according to any one of claims 1 to 5, or implements the steps of the fault location method according to claim 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the fault location method according to any one of claims 1 to 5, or implements the steps of the fault location method according to claim 6.