A method and device for determining a call link, an electronic device, and a storage medium

By retrieving and extracting the sequence collection in the flow log, determining the lost nodes and building a pseudo-root node or new root node, the problem of call link loss caused by node loss is solved, and the efficiency of problem positioning is improved.

CN115185781BActive Publication Date: 2025-04-18BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210860147.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2025-04-18
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

The prior art will cause the call link to be lost when the node is missing, affecting the efficiency of problem location.

Method used

By retrieving the flow log based on the global sequence number of the target transaction, extracting the parent flow sub-sequence set and flow sub-sequence set, making the difference set to determine the lost node, and deleting its parent-child mapping relationship. According to the number of child nodes of the lost node and the existence of the real root node, build a pseudo-root node or determine a new root node to ensure the integrity of the call link.

Benefits of technology

It effectively avoids link loss caused by missing nodes, ensures the integrity of the call link, and thus improves the efficiency of problem location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115185781B_ABST
    Figure CN115185781B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for determining a call link, an electronic device, and a storage medium, which can be applied to the field of big data or finance. The method includes: retrieving a transaction flow log according to a global sequence number of the transaction; extracting information from the flow log to obtain a parent flow subsequence set and a flow subsequence set; determining a lost node by making a difference between the two sets; deleting the parent-child mapping relationship between the lost node and its child nodes; determining whether the lost node has multiple child nodes; if the child node is one, determining whether a true root node exists; if the true root node does not exist, using the child node of the lost node as a new root node; if the child node is multiple or the true root node exists, constructing a pseudo root node and pointing each child node of the lost node and the true root node to the pseudo root node; using the current root node as the starting point, pointing each node's child node to each node in turn to obtain a call link; and returning the call link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of system problem locating, and in particular to a method and device for determining a call link, an electronic device, and a storage medium. Background Art

[0002] In large enterprises such as banks, a transaction often passes through several application components, which in turn pass through multiple microservices. The call relationships are complicated, which brings challenges to problem location. Therefore, in order to quickly locate production problems, call links are usually built based on the call relationships between application components, so that production problems can be located based on the call links.

[0003] The current method for constructing a call chain mainly obtains the flow logs of all nodes, and then analyzes the flow logs to obtain the call relationship between each node. According to the call relationship between the nodes, the child nodes of each level are pointed to the corresponding parent node step by step based on the call relationship from the root node, thus forming a call chain.

[0004] However, this method is only applicable to the situation where a complete log can be obtained and the call relationship between the nodes can be analyzed. However, due to the limited scope of serial number transformation or other reasons, the log of the root node or other nodes in the link may be lost. At this time, the subsequent nodes cannot be connected in series, resulting in the loss of the call link, which makes the call link incomplete and is not conducive to problem location. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a method and device for determining a call link, an electronic device, and a storage medium to solve the problem in the prior art that link loss may occur when a node is missing.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a method for determining a call link, including:

[0008] Retrieving each transaction log of the target transaction according to the global sequence number of the target transaction;

[0009] Extract information from each of the transaction logs to obtain a parent transaction subsequence set and a transaction subsequence set;

[0010] Determine the lost node by performing a difference between the parent flow subsequence set and the flow subsequence set;

[0011] Deleting the parent-child mapping relationship between the lost node and its child nodes;

[0012] Determine whether there are multiple child nodes of the lost node;

[0013] If it is determined that the lost node has only one child node, then determine whether a true root node exists; wherein the true root node refers to a node whose values ​​in the corresponding flow subsequence are all zero;

[0014] If it is determined that the true root node does not exist, the child node of the lost node is used as the new root node;

[0015] If it is determined that the lost node has multiple child nodes, or if it is determined that the real root node exists, a pseudo root node is constructed, and each child node of the lost node and the real root node are pointed to the pseudo root node;

[0016] Taking the current root node as the starting point, pointing the child nodes of each node at each level to each node in turn to obtain a call link; wherein the current root node is the new root node or the pseudo root node;

[0017] The call link is returned; wherein the pseudo root node in the call link is not displayed.

[0018] Optionally, in the above-mentioned method for determining the call link, the following step is further included:

[0019] Query the target information of the real root node; wherein the target information includes processing time and request receiving time;

[0020] The processing time of the real root node is determined as the total time of the call link, and the request reception time of the real root node is determined as the start time of the call link.

[0021] Optionally, in the above-mentioned method for determining the call link, extracting information from each of the flow logs to obtain a parent flow subsequence set and a flow subsequence set includes:

[0022] Traversing each of the transaction logs respectively, extracting each of the parent transaction sub-sequence numbers and the transaction sub-sequence numbers of each component in each of the transaction logs;

[0023] Each of the parent stream subsequence numbers is added to the parent stream subsequence set, and each of the stream subsequence numbers is added to the stream subsequence set.

[0024] Optionally, in the above-mentioned method for determining the call link, after extracting information from each of the flow logs to obtain the parent flow subsequence set and the flow subsequence set, the method further includes:

[0025] Constructing multiple sets of parent-child mapping relationships based on each parent stream sequence in the parent stream subsequence set and each stream subsequence number in the stream subsequence set;

[0026] The extracted component information is used to construct a component return object, and the component return object is returned; wherein the component information at least includes a component code, a component name, and component association relationship information.

[0027] Optionally, in the above-mentioned method for determining the call link, constructing a pseudo root node and pointing each child node of the lost node and the real root node to the pseudo root node includes:

[0028] Constructing a pseudo root node, and pointing each child node of the lost node to the pseudo root node;

[0029] Determine whether the true root node exists;

[0030] If the real root node is determined, the real root node is pointed to the pseudo root node.

[0031] A second aspect of the present application provides a device for determining a call link, including:

[0032] A log retrieval unit, used to retrieve each transaction log of the target transaction according to the global sequence number of the target transaction;

[0033] An information extraction unit, used to extract information from each of the flow logs to obtain a parent flow subsequence set and a flow subsequence set;

[0034] A computing unit, configured to determine a lost node by performing a difference between the parent flow subsequence set and the flow subsequence set;

[0035] A deletion unit, used to delete the parent-child mapping relationship between the lost node and its child nodes;

[0036] A first judging unit, configured to judge whether there are multiple child nodes of the lost node;

[0037] A second judgment unit is used to judge whether a true root node exists when it is judged that the lost node has only one child node; wherein the true root node refers to a node whose values ​​in the corresponding flow subsequence are all zero;

[0038] A node determination unit, configured to use a child node of the lost node as a new root node when it is determined that the true root node does not exist;

[0039] A node construction unit, configured to construct a pseudo root node when it is determined that there are multiple child nodes of the lost node or when it is determined that the true root node exists, and point each child node of the lost node and the true root node to the pseudo root node;

[0040] A link construction unit, used to take the current root node as a starting point, and sequentially point the child nodes of each node of each level to each node, so as to obtain a call link; wherein the current root node is the new root node or the pseudo root node;

[0041] A returning unit is used to return the call link; wherein the pseudo root node in the call link is not displayed.

[0042] Optionally, in the above-mentioned device for determining the call link, the method further includes:

[0043] A query unit, used to query the target information of the real root node; wherein the target information includes processing time and request receiving time;

[0044] The link information determination unit is used to determine the processing time of the real root node as the total time of the call link, and determine the request reception time of the real root node as the start time of the call link.

[0045] Optionally, in the above-mentioned device for determining a call link, the information extraction unit includes:

[0046] A traversal unit, used to traverse each of the journal logs respectively, and extract each of the parent journal sub-sequence numbers and the journal sub-sequence numbers of each component in each of the journal logs;

[0047] The adding unit is used to add each of the parent stream subsequence numbers to the parent stream subsequence set, and to add each of the stream subsequence numbers to the stream subsequence set.

[0048] Optionally, in the above-mentioned device for determining the call link, the method further includes:

[0049] A relationship building unit, used for building a plurality of sets of parent-child mapping relationships based on each parent pipeline sequence in the parent pipeline subsequence set and each pipeline subsequence number in the pipeline subsequence set;

[0050] The object construction unit is used to construct a component return object using the extracted component information, and return the component return object; wherein the component information at least includes a component code, a component name, and component association relationship information.

[0051] Optionally, in the above-mentioned device for determining the call link, the node construction includes:

[0052] The node construction subunit is used to construct a pseudo root node;

[0053] A first pointing unit, used to point each child node of the lost node to the pseudo root node;

[0054] A third judging unit, used to judge whether the true root node exists;

[0055] The second pointing unit is used to point the real root node to the pseudo root node when it is determined that the real root node exists.

[0056] A third aspect of the present application provides an electronic device, including:

[0057] Memory and processor;

[0058] Wherein, the memory is used to store programs;

[0059] The processor is used to execute the program. When the program is executed, it is specifically used to implement the method for determining the call link as described in any one of the above items.

[0060] A fourth aspect of the present application provides a computer storage medium for storing a computer program, wherein when the computer program is executed, it is used to implement the method for determining a call link as described in any one of the above.

[0061] The present application provides a method for determining a call link. According to the global sequence number of the target transaction, each flow log of the target transaction is retrieved, and information is extracted from each flow log to obtain a parent flow subsequence set and a flow subsequence set. Then, the lost node is determined by making a difference between the parent flow subsequence set and the flow subsequence set, and the parent-child mapping relationship between the lost node and its child nodes is deleted. It is determined whether there are multiple child nodes of the lost node. If it is determined that there is one child node of the lost node, it is determined whether the true root node exists. Among them, the true root node refers to the node whose values ​​in the corresponding flow subsequence are all zero. If it is determined that the true root node does not exist, the child node of the lost node is used as the new root node. If it is determined that there are multiple child nodes of the lost node, or if it is determined whether the true root node exists, a pseudo-root node is constructed, and each child node of the lost node and the true root node are pointed to the pseudo-root node. Take the current root node as the starting point, point the child nodes of each node at each level to each node in turn, obtain the call link, and finally return the call link. Thus, the lost node can be determined by performing a difference set operation, and a new root node can be determined or a pseudo root node can be constructed according to the situation of the lost node to ensure that subsequent nodes can continue to be connected in series, thereby avoiding link loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0063] Figure 1 A schematic diagram of the architecture of a product operation monitoring platform provided in an embodiment of the present application;

[0064] Figure 2 A flowchart of a method for determining a call link provided in an embodiment of the present application;

[0065] Figure 3 A flowchart of a method for extracting information from a logbook provided in an embodiment of the present application;

[0066] Figure 4 A flowchart of a preprocessing method for extracting information provided in an embodiment of the present application;

[0067] Figure 5 A schematic diagram of an example of determining a new root node to construct a call link provided in an embodiment of the present application;

[0068] Figure 6 A flowchart of a method for constructing a pseudo root node and pointing each child node and the real root node of a lost node to the pseudo root node provided by an embodiment of the present application;

[0069] Figure 7 A schematic diagram of an example of building a call link by building a pseudo root node provided in an embodiment of the present application;

[0070] Figure 8 A schematic diagram of another example of building a call link by building a pseudo root node provided in an embodiment of the present application;

[0071] Fig. 9 A schematic diagram of the architecture of a device for determining a call link provided in an embodiment of the present application;

[0072] Fig.10 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0073] 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 only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0074] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0075] The present application provides a method for determining a call link to solve the problem in the prior art that link loss may occur when a node is missing.

[0076] Optionally, in order to implement a method for determining a call link provided by the present application, an embodiment of the present application provides a product operation monitoring platform. Figure 1 As shown, the product operation monitoring platform provided in the embodiment of the present application includes: a presentation layer, a log storage module, a log processing module and a log collection module.

[0077] The log collection module mainly collects the log stream by deploying the FLUME collection tool on each application component server. Optionally, the log collection module can collect the log files in the specified directory in real time and send them to Kafka, and transfer the log stream through Kafka.

[0078] The log processing module is mainly used to read the collected flow logs and parse them into structured fields, and store them in the log storage module.

[0079] The log storage module is mainly used to store the parsed transaction logs for subsequent online query when calling the chain chain.

[0080] The presentation layer mainly provides call chain monitoring page functions and background services. When users can query the call chain between components of a transaction through the global serial number, the background will query the transaction log in real time from the log storage module for chaining, that is, generate the call chain based on the transaction log.

[0081] Based on the product operation monitoring platform provided above, the embodiment of the present application provides a method for determining a call link, such as Figure 2 As shown, including:

[0082] S201. Retrieve each transaction log of the target transaction according to the global sequence number of the target transaction.

[0083] It should be noted that the global sequence number is generated by the event trigger point, that is, the first system generated when the transaction is initiated, and it is a globally unique sequence number. It remains unchanged in the entire transaction link until the event is completely completed. Therefore, the next-door transaction log of the target transaction can be retrieved through the global sequence number of the target transaction.

[0084] The target transaction may be the transaction that the current user needs to query, or other specified transactions.

[0085] Optionally, since other relevant information of the call link is usually required to be fed back when the call link is fed back, in another embodiment of the present application, before executing step S201, further steps may be performed: querying the target information of the real root node.

[0086] The target information includes the processing time and the request receiving time. The real root node is the first node in the call link.

[0087] Then, the processing time of the real root node is determined as the total time of the call link, and the request reception time of the real root node is determined as the start time of the call link.

[0088] Since the true root node is the first node, it calls other nodes to complete its own data processing, so it is the last to complete. Therefore, the processing time of the true root node is the total time of the call link, and the request reception time of the true root node is the starting time of the call link.

[0089] S202: extract information from each transaction log to obtain a parent transaction subsequence set and a transaction subsequence set.

[0090] It should be noted that each time a component is called on the link, there will be a different flow resource sequence number, that is, each node will have a unique flow sub-sequence number. When the caller calls the callee, it will pass its own flow sub-sequence number through the message as the parent flow resource number of the callee, and form a call link with this parent-child relationship. Therefore, when calling between nodes, the generated flow sub-sequence number and the parent flow sub-sequence number will be recorded in the corresponding flow log.

[0091] Therefore, the parent transaction sub-sequence number and the transaction sub-sequence number can be extracted from each transaction log, so that a call link can be constructed based on the parent transaction sub-sequence number and the transaction sub-sequence number.

[0092] Specifically, Figure 3 As shown, a specific implementation of step S202 includes:

[0093] S301, traverse each transaction log respectively, and extract each parent transaction sub-sequence number and each component transaction sub-sequence number in each transaction log.

[0094] S302, adding each parent stream subsequence number to the parent stream subsequence set, and adding each stream subsequence number to the stream subsequence set.

[0095] Optionally, in order to facilitate subsequent processing, in another embodiment of the present application, before executing step S202, the extracted information may be further preprocessed. Figure 4 As shown, a preprocessing method for extracting information provided in an embodiment of the present application includes:

[0096] S401, constructing multiple sets of parent-child mapping relationships based on each parent pipeline sequence in the parent pipeline subsequence set and each pipeline subsequence number in the pipeline subsequence set.

[0097] Specifically, the mapping relationship constructed can be paternity, and its format can be: Map<ParentId,‘Txn1,Txn2...’> , where ParentId is the parent flow sub-sequence number, and Txn is the flow sub-sequence number of each child node called, that is, the child node set under each parent node is recorded. Subsequently, each node can be connected according to the constructed parent-child mapping relationship.

[0098] S402: Build a component return object using the extracted component information, and return the component return object.

[0099] The component information at least includes the component code, component name and component association relationship information.

[0100] Since when displaying a call link, it is usually necessary to display information about the components that make up the link, in an embodiment of the present application, the extracted component information is used to construct a component return object and return it.

[0101] S203: Determine the lost node by performing a difference between the parent flow subsequence set and the flow subsequence set.

[0102] Specifically, in the embodiment of the present application, by making a difference between the parent water flow subsequence set and the water flow subsequence set, a sequence number included in the parent water flow subsequence set but not included in the water flow subsequence set can be obtained. The node corresponding to the sequence number is the lost node. For example, assuming that the water flow subsequence number obtained by the difference is id1, it means that there is id1 in the parent water flow subsequence set, but there is no id1 in the water flow subsequence set, which means that there is a node with id1 node as the parent, but id1 itself is lost.

[0103] It should be noted that after the missing node is determined, step S204 can be executed. If there is no missing node, it means that the acquired information is complete, so the call link can be directly constructed based on the call relationship.

[0104] S204: Delete the parent-child mapping relationship between the lost node and its child nodes.

[0105] Since the lost node is lost, the parent-child mapping relationship between the child nodes of the lost node and the lost node can no longer be used to build a link, so it needs to be deleted to avoid the situation where the node cannot be found when building a link based on the parent-child mapping relationship.

[0106] S205: Determine whether there are multiple child nodes of the lost node.

[0107] It should be noted that if there is only one child node of the lost node, the link structure it forms is relatively simple, so there may be a situation where there is no need to build a pseudo-root node, and the child nodes of the lost node and subsequent node information are not discarded. If there are multiple child nodes of the lost node, it means that there are multiple branches and the link structure formed is relatively complex, so a pseudo-root node needs to be built to avoid information loss.

[0108] Therefore, if it is determined that the lost node does not have multiple child nodes, that is, if it is determined that the lost node does not have one child node, step S206 is executed. If it is determined that the lost node has multiple child nodes, step S208 is executed.

[0109] S206: Determine whether the real root node exists.

[0110] Among them, the true root node refers to the node whose values ​​in the corresponding flow subsequence are all zero.

[0111] It should be noted that the probability of node loss is relatively small. When a node is lost, usually only one node is lost. Therefore, if it is determined that the true root node does not exist, it means that the lost node is the true root node.

[0112] Since the real root node is lost at this time, the root node is required in the process of building the call link, so as to extend backward from the root node. And because there is only one child node at this time, the subsequent call relationship starts from the child node, and the pseudo-root node is not displayed, so the result is the same whether the pseudo-root node is built or not, so the child node of the lost node can be directly used as the new root node, that is, step S207 is executed.

[0113] For example, Figure 5 The complete link should be as shown in Figure 5 As shown in the left figure, when the real root node A is lost, its only child node B can be directly used as the new root node, so that the following can be constructed Figure 5 The call chain shown in the right figure.

[0114] If it is determined that the real root node exists, it means that the lost node is an intermediate node. There may be other calling relationships starting from the real root and unrelated to the child nodes of the lost node. Therefore, step S208 is executed at this time.

[0115] S207: Use the child node of the lost node as a new root node.

[0116] Since the new root node has been determined at this time, step S209 can be directly executed at this time.

[0117] S208: Construct a pseudo root node, and point each child node of the lost node and the real root node to the pseudo root node.

[0118] It should be noted that, since a pseudo-root node is constructed at this time, which serves as the root node of the entire call link, not only do we need to point each node of the lost node to the pseudo-root node, but the real root node also needs to point to the pseudo-root node. In this way, we can not only construct a link of the call relationship starting from the lost node, but also a link of the call relationship starting from the real root node.

[0119] However, it should be noted that if there is no real root node, that is, the lost node is the real root node, it is only necessary to point each child node of the lost node to the root node.

[0120] Therefore, a specific implementation of step S208 is as follows: Figure 6 As shown, the following steps are included:

[0121] S601: Construct a pseudo root node, and point each child node of the lost node to the pseudo root node.

[0122] S602: Determine whether there is a true root node.

[0123] If the real root node is determined, the process goes to step S403.

[0124] It should be noted that if it is determined that there is a real root node in step S206, step S602 does not need to be executed again, and step S603 is directly executed. Of course, it can also be executed again. In either case, the processing flow is the same, and it is not necessary to determine whether step S206 has been executed.

[0125] S603: Point the real root node to the pseudo root node.

[0126] For example, Figure 7 As shown in the left figure of , the lost node A is the real root node, that is, there is no real root node, and the child nodes of the lost node are B and C, that is, there are multiple child nodes, then a pseudo root node O is constructed, and only the child nodes B and C need to point to the pseudo root node O, and then after step S209, the following can be obtained. Figure 7 The link is shown on the right.

[0127] and Figure 8 As shown in the left figure, although the lost node C has only one child node, the lost node C is not the real root node, that is, the real root node exists. If E is directly used as the root node, the link ABD will be lost because it has no calling relationship with the root node E. Therefore, in order to build the link, a pseudo root node O can also be built at this time, so that the pseudo root node O is used as the root node, and the real root node A and the child node E of the lost node point to the pseudo root node. After the subsequent step S209, the following can be obtained. Figure 8 From the call link shown, it can be seen that not only the call relationship of EF is constructed, but also the link of ABD is constructed, thereby avoiding link loss.

[0128] S209: Taking the current root node as the starting point, the child nodes of each node at each level are pointed to each node in turn to obtain a call link.

[0129] Among them, the current root node is a new root node or a pseudo root node.

[0130] It should be noted that the root node of the link to be constructed is determined through the above steps, and if a pseudo root node is constructed, the child nodes of the pseudo root node are also determined, but there are other nodes that are not directly affected by the node loss. For example, Figure 8 Nodes B, D, and F in . Therefore, to construct a complete call chain, you need to take the current root node as the starting point, and according to the constructed parent-child mapping relationship, point the child nodes of each node at each level to the node in turn to obtain the call chain.

[0131] S210, returning the call link.

[0132] Among them, the pseudo root node in the call link is not displayed. It should be noted that since the pseudo root node is not a real node, it does not represent the lost node, but is only a false node constructed to build the call link. Therefore, in order to avoid misleading the user, the pseudo root node is not displayed when the call link is returned to the user.

[0133] The embodiment of the present application provides a method for determining a call link. According to the global sequence number of the target transaction, each flow log of the target transaction is retrieved, and information is extracted from each flow log to obtain a parent flow subsequence set and a flow subsequence set. Then, the lost node is determined by making a difference between the parent flow subsequence set and the flow subsequence set, and the parent-child mapping relationship between the lost node and its child nodes is deleted. It is determined whether there are multiple child nodes of the lost node. If it is determined that there is one child node of the lost node, it is determined whether the true root node exists. Among them, the true root node refers to the node whose values ​​in the corresponding flow subsequence are all zero. If it is determined that the true root node does not exist, the child node of the lost node is used as the new root node. If it is determined that there are multiple child nodes of the lost node, or it is determined whether the true root node exists, a pseudo-root node is constructed, and each child node of the lost node and the true root node are pointed to the pseudo-root node. Take the current root node as the starting point, point the child nodes of each node at each level to the node in turn, obtain the call link, and finally return the call link. Thus, the lost node can be determined by performing a difference set operation, and a new root node can be determined or a pseudo root node can be constructed according to the situation of the lost node to ensure that subsequent nodes can continue to be connected in series, thereby avoiding link loss.

[0134] Another embodiment of the present application provides a device for determining a call link, such as Fig. 9 As shown, including:

[0135] The log retrieval unit 901 is used to retrieve each transaction log of the target transaction according to the global sequence number of the target transaction.

[0136] The information extraction unit 902 is used to extract information from each transaction log to obtain a parent transaction subsequence set and a transaction subsequence set.

[0137] The operation unit 903 is used to determine the lost node by performing a difference between the parent flow subsequence set and the flow subsequence set.

[0138] The deleting unit 904 is used to delete the parent-child mapping relationship between the lost node and its child nodes.

[0139] The first judging unit 905 is used to judge whether there are multiple child nodes of the lost node.

[0140] The second judging unit 906 is configured to judge whether a real root node exists when it is judged that the lost node has only one child node.

[0141] Among them, the true root node refers to the node whose values ​​in the corresponding flow subsequence are all zero.

[0142] The node determination unit 907 is used to use the child node of the lost node as a new root node when it is determined that the real root node does not exist.

[0143] The node construction unit 908 is used to construct a pseudo root node when it is determined that the lost node has multiple child nodes or the real root node exists, and point each child node of the lost node and the real root node to the pseudo root node.

[0144] The link construction unit 909 is used to take the current root node as the starting point, and point the child nodes of each node at each level to each node in turn to obtain a call link.

[0145] Among them, the current root node is a new root node or a pseudo root node.

[0146] The returning unit 910 is used to return the calling link.

[0147] Among them, the pseudo root node in the call link is not displayed.

[0148] Optionally, in the device for determining a call link provided in another embodiment of the present application, the method further includes:

[0149] The query unit is used to query the target information of the real root node.

[0150] The target information includes processing time and request receiving time.

[0151] The link information determination unit is used to determine the processing time of the real root node as the total time of calling the link, and determine the request reception time of the real root node as the start time of calling the link.

[0152] Optionally, in the device for determining a call link provided in another embodiment of the present application, the information extraction unit includes:

[0153] The traversal unit is used to traverse each transaction log respectively, and extract each parent transaction sub-sequence number and each component transaction sub-sequence number in each transaction log.

[0154] The adding unit is used to add each parent stream subsequence number to the parent stream subsequence set, and to add each stream subsequence number to the stream subsequence set.

[0155] Optionally, in the device for determining a call link provided in another embodiment of the present application, the method further includes:

[0156] The relationship building unit is used to build multiple sets of parent-child mapping relationships based on each parent pipeline sequence in the parent pipeline subsequence set and each pipeline subsequence number in the pipeline subsequence set.

[0157] The object construction unit is used to construct a component return object using the extracted component information and return the component return object.

[0158] The component information at least includes the component code, component name and component association relationship information.

[0159] Optionally, in a device for determining a call link provided in another embodiment of the present application, node construction includes:

[0160] The node construction subunit is used to construct a pseudo root node.

[0161] The first pointing unit is used to point each child node of the lost node to the pseudo root node.

[0162] The third judgment unit is used to judge whether there is a true root node.

[0163] The second pointing unit is used to point the real root node to the pseudo root node when it is determined that the real root node exists.

[0164] It should be noted that the various units provided in the above embodiments of the present application may specifically be Figure 1 The components of the modules in the platform shown and the specific working process of each unit can refer to the corresponding steps provided in the above method embodiment, which will not be repeated here.

[0165] Another embodiment of the present application provides an electronic device, such as Fig.10 As shown, including:

[0166] Memory 1001 and processor 1002 .

[0167] The memory 1001 is used to store programs.

[0168] The processor 1002 is used to execute the program stored in the memory 1001. When the program is executed, it is specifically used to implement the method for determining the call link provided in any one of the above embodiments.

[0169] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the method for determining a call link provided in any one of the above embodiments.

[0170] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0171] It should be noted that the method and device for determining a call link, the electronic device, and the storage medium provided by the present invention can be used in the field of big data or the field of finance. The above is only an example and does not limit the application field of the method and device for determining a call link, the electronic device, and the storage medium provided by the present invention.

[0172] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0173] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for determining a call link, characterized in that: include: According to the global sequence number of the target transaction, retrieve each transaction log of the target transaction; wherein the global sequence number is a globally unique sequence number generated by event triggering; Extract information from each of the transaction logs to obtain a parent transaction subsequence set and a transaction subsequence set; Determine the lost node by performing a difference between the parent flow subsequence set and the flow subsequence set; Deleting the parent-child mapping relationship between the lost node and its child nodes; Determine whether there are multiple child nodes of the lost node; If it is determined that the lost node has only one child node, then determine whether a true root node exists; wherein the true root node refers to a node whose values ​​in the corresponding pipeline subsequence are all zero; the true root node is the first node in the call link; If it is determined that the true root node does not exist, the child node of the lost node is used as the new root node; If it is determined that the lost node has multiple child nodes, or if it is determined that the real root node exists, a pseudo root node is constructed, and each child node of the lost node and the real root node are pointed to the pseudo root node; wherein the pseudo root node is not a real node; Taking the current root node as the starting point, pointing the child nodes of each node at each level to each node in turn to obtain a call link; wherein the current root node is the new root node or the pseudo root node; The call link is returned; wherein the pseudo root node in the call link is not displayed.

2. The method according to claim 1, characterized in that Also includes: Query the target information of the real root node; wherein the target information includes processing time and request receiving time; The processing time of the real root node is determined as the total time of the call link, and the request reception time of the real root node is determined as the start time of the call link.

3. The method according to claim 1, characterized in that The extracting information from each of the flow logs to obtain a parent flow subsequence set and a flow subsequence set includes: Traverse each of the transaction logs respectively, and extract each parent transaction sub-sequence number and each component transaction sub-sequence number in each transaction log; Each of the parent stream subsequence numbers is added to the parent stream subsequence set, and each of the stream subsequence numbers is added to the stream subsequence set.

4. The method according to claim 1, characterized in that: After extracting information from each of the flow logs to obtain a parent flow subsequence set and a flow subsequence set, the method further includes: Constructing multiple sets of parent-child mapping relationships based on each parent stream sequence in the parent stream subsequence set and each stream subsequence number in the stream subsequence set; The extracted component information is used to construct a component return object, and the component return object is returned; wherein the component information at least includes a component code, a component name, and component association relationship information.

5. The method according to claim 1, characterized in that The step of constructing a pseudo root node and pointing each child node of the lost node and the real root node to the pseudo root node includes: Constructing a pseudo root node, and pointing each child node of the lost node to the pseudo root node; Determine whether the true root node exists; If the real root node is determined, the real root node is pointed to the pseudo root node.

6. A device for determining a call link, characterized in that: include: A log retrieval unit, used to retrieve each transaction log of the target transaction according to the global sequence number of the target transaction; wherein the global sequence number is a globally unique sequence number generated by event triggering; An information extraction unit, used to extract information from each of the flow logs to obtain a parent flow subsequence set and a flow subsequence set; A computing unit, configured to determine a lost node by performing a difference between the parent flow subsequence set and the flow subsequence set; A deletion unit, used to delete the parent-child mapping relationship between the lost node and its child nodes; A first judging unit, configured to judge whether there are multiple child nodes of the lost node; A second judgment unit is used to judge whether a true root node exists when it is judged that the lost node has only one child node; wherein the true root node refers to a node whose values ​​in the corresponding pipeline subsequence are all zero; and the true root node is the first node in the call link; A node determination unit, configured to use a child node of the lost node as a new root node when it is determined that the true root node does not exist; A node construction unit, configured to construct a pseudo root node when it is determined that the lost node has multiple child nodes or when it is determined that the real root node exists, and point each child node of the lost node and the real root node to the pseudo root node; wherein the pseudo root node is not a real node; A link construction unit, used to take the current root node as a starting point, and sequentially point the child nodes of each node of each level to each node, so as to obtain a call link; wherein the current root node is the new root node or the pseudo root node; A returning unit is used to return the call link; wherein the pseudo root node in the call link is not displayed.

7. The device according to claim 6, characterized in that Also includes: A query unit, used to query the target information of the real root node; wherein the target information includes processing time and request receiving time; The link information determination unit is used to determine the processing time of the real root node as the total time of the call link, and determine the request reception time of the real root node as the start time of the call link.

8. The device according to claim 6, characterized in that The information extraction unit comprises: A traversal unit, used to traverse each of the journal logs respectively, and extract each parent journal sub-sequence number and each component journal sub-sequence number in each of the journal logs; The adding unit is used to add each of the parent stream subsequence numbers to the parent stream subsequence set, and to add each of the stream subsequence numbers to the stream subsequence set.

9. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the method for determining the call link as described in any one of claims 1 to 5.

10. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is used to implement the method for determining a call link as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for detecting fault in micro-service architecture, and storage medium

    CN113760636A

  • Link tracking method and apparatus

    WO2020233015A1