Calling link global topology generation method and device, computer equipment and medium
By collecting the call link node information in a distributed system, obtaining the service address identification and filling the node information, the problem of data loss of call links is solved, and the global topology diagram is accurately generated, and the observability and operation and maintenance efficiency of the system are improved.
Patent Information
- Application Number
- CN202411702289.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In distributed systems, call link tracking technology faces the problem of call link data loss, especially the lack of service names, which leads to the inability to build a global service topology map, affecting the observability and operation and maintenance efficiency of the system.
It provides a method for generating a global topology of call links. By responding to topology generation instructions, it collects information on the link nodes on the call link, obtains the service address identification of the fuzzy node, and uses it to fill node information, and finally performs global topology integration to generate an accurate global topology diagram.
When the link node lacks node information, it can accurately generate and call the link global topology map to improve the observability and operation and maintenance efficiency of the system.
Smart Images

Figure CN119520300A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of distributed system monitoring, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for generating a global topology of a call link. Background Art
[0002] With the widespread application of microservice architecture and cloud native technology, distributed systems have become increasingly complex, and the call relationships between services are intricately intertwined. In such an environment, understanding the service interaction mode within the system is crucial for performance monitoring, troubleshooting, and optimization decisions. Therefore, call chain tracing technology came into being.
[0003] Call chain tracing technology, also known as tracing technology, is a technology used to monitor and trace the request call path in a distributed system. It can record the complete execution path of a request in a distributed system, helping developers optimize performance and track problems. However, in the actual use of call chain tracing technology, call chain data loss is often encountered, such as the challenge of missing service names, which makes it impossible to build a global service topology map, affecting the observability and operation and maintenance efficiency of the system. Summary of the invention
[0004] Based on this, it is necessary to provide a call link global topology generation method, device, computer equipment, computer-readable storage medium and computer program product that can generate an accurate global topology map even when the call link node information is lost, in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for generating a global topology of a call link, the method comprising:
[0006] In response to a topology generation instruction for a call link, collecting information about node information and link attribute information of each link node on the call link;
[0007] When it is determined that there is at least one fuzzy node with missing node information in each of the link nodes, obtaining a service address identifier of the fuzzy node;
[0008] Performing node information filling processing on the fuzzy node based on the service address identifier to obtain node information of the fuzzy node;
[0009] A global topology integration process is performed based on the node information and the link attribute information to obtain a call link global topology graph including the link nodes.
[0010] In some embodiments, the step of performing node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node includes:
[0011] Obtain the node information mapping relationship between the address identifier and the node information;
[0012] Based on the service address identifier, searching the node information mapping relationship for an address identifier that matches the service address identifier;
[0013] When it is determined that an address identifier matching the service address identifier exists in the node information mapping relationship, the node information corresponding to the address identifier is determined as the node information of the fuzzy node.
[0014] In some embodiments, the method further comprises:
[0015] When it is determined that there is no address identifier matching the service address identifier in the node information mapping relationship, updating and monitoring the node information mapping relationship;
[0016] If it is detected that the node information mapping relationship has been updated, the process returns to the step of obtaining the node information mapping relationship between the address identifier and the node information.
[0017] In some embodiments, the method further comprises:
[0018] Obtaining the service address identifier of each link node;
[0019] Determine whether there is a newly added address identifier in each of the service address identifiers according to each of the service address identifiers and each of the address identifiers in the node information mapping relationship;
[0020] If the newly added address identifier exists, the node information mapping relationship is updated according to the newly added address identifier and the node information corresponding to the newly added address identifier to obtain an updated node information mapping relationship.
[0021] In some embodiments, the collecting of node information and link attribute information of each link node on the call link includes:
[0022] Performing a tracking operation on each link node on the call link, wherein the tracking of the link node is used to collect node information and link attribute information of the link node respectively;
[0023] For each link node, when the corresponding buried point of the link node cannot collect the node information of the link node, the link node is determined to be a fuzzy node.
[0024] In some of the embodiments, the link attribute information includes a working unit identifier, a parent unit identifier, and working unit description information of the link node;
[0025] The global topology integration process is performed according to the node information and the link attribute information to obtain a call link global topology graph including the link nodes, including:
[0026] Constructing connection edges of the link nodes according to the respective working unit identifiers and parent unit identifiers of the link nodes;
[0027] Determining the calling direction of each of the connection edges based on the respective working unit description information of each of the link nodes;
[0028] Generate an initial link topology graph according to each of the connection edges and the calling direction of each of the connection edges;
[0029] Based on the node information of each link node, the node information of each link node in the initial link topology diagram is annotated to obtain a call link global topology diagram including each link node.
[0030] In a second aspect, the present application further provides a device for generating a global topology of a call link, the device comprising:
[0031] An instruction response module, configured to collect information about node information and link attribute information of each link node on the call link in response to a topology generation instruction for the call link;
[0032] An address identifier acquisition module, configured to acquire a service address identifier of the fuzzy node when it is determined that there is at least one fuzzy node with missing node information in each of the link nodes;
[0033] A node information filling module, used to perform node information filling processing on the fuzzy node based on the service address identifier to obtain node information of the fuzzy node;
[0034] The topology integration module is used to perform global topology integration processing according to the node information and the link attribute information to obtain a call link global topology graph including the link nodes.
[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0037] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0038] The above-mentioned method, device, computer equipment, storage medium and computer program product for generating the global topology of the call link, the distributed link tracking system responds to the topology generation instruction for the call link, collects the node information and link attribute information of each link node on the call link respectively, and obtains the service address identifier of the fuzzy node when it is determined that there is at least one fuzzy node with missing node information in each link node. Since the service address identifier is the same as the node information of the fuzzy node, both correspond to the fuzzy node one-to-one, the distributed link tracking system can perform node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node, and perform global topology integration processing based on the information of each node and the attribute information of each link to obtain the global topology map of the call link containing each link node. By using the service address identifier of the fuzzy node to fill the node information of the fuzzy node, the accurate generation of the global topology map of the call link can be achieved even when the link node lacks node information, which effectively improves the observability and operation and maintenance efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] FIG1 is a diagram of an application environment for calling a link global topology generation method in some embodiments;
[0040] FIG2 is a schematic diagram of a process of calling a link global topology generation method in some embodiments;
[0041] FIG3 is a schematic diagram of a process of performing node information filling processing on a fuzzy node based on a service address identifier to obtain node information of the fuzzy node in some embodiments;
[0042] FIG4 is a schematic diagram of a process of calling a link global topology generation method in some other embodiments;
[0043] 5 is a schematic diagram of a process of performing global topology integration processing according to each node information and each link attribute information to obtain a call link global topology map including each link node in some embodiments;
[0044] FIG6 is a schematic diagram of a flow chart of calling a link global topology generation method in some other embodiments;
[0045] FIG7 is a structural block diagram of a device for generating a global link topology invoking some embodiments;
[0046] FIG8 is a diagram of the internal structure of a computer device in some embodiments. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The method for generating a global topology of a call link provided in an embodiment of the present application can be applied to an application environment as shown in FIG. 1. The distributed link tracking system 102 communicates with the distributed system 104 through a network. The data storage system can store data that the distributed link tracking system 102 needs to process. The data storage system can be integrated on the distributed link tracking system 102, or it can be placed on a cloud or other network server. The distributed link tracking system 102 responds to the topology generation instruction for the call link on the distributed system 104, and collects information on the node information and link attribute information of each link node on the call link. When it is determined that there is at least one fuzzy node with missing node information in each link node, the service address identifier of the fuzzy node is obtained, and the node information of the fuzzy node is filled based on the service address identifier to obtain the node information of the fuzzy node. The global topology integration processing is performed according to the information of each node and the attribute information of each link, and the global topology diagram of the call link containing each link node is obtained. The distributed link tracking system 102 is a system for performing link tracking in a distributed system, that is, tracking and analyzing the entire process of request initiation to response. The distributed system 104 refers to a system composed of a group of service nodes that communicate through a network and work together to complete a common task. It can be understood that the distributed link tracking system 102 and the distributed system 104 can be integrated on a terminal or a server, where the terminal can be but not limited to various personal computers, laptops, smart phones, tablet computers, etc. The server can be implemented as an independent server or a server cluster composed of multiple servers.
[0049] In some embodiments, as shown in FIG. 2 , a method for generating a global topology of a call link is provided, and the method is applied to the distributed link tracking system 102 in FIG. 1 as an example for explanation, including the following steps:
[0050] S202, in response to a topology generation instruction for a call link, collecting node information and link attribute information of each link node on the call link.
[0051] Among them, the topology generation instruction is an instruction signal used to instruct the distributed link tracking system to generate a global topology map for the call link. The topology generation instruction can be triggered and generated by the system detection personnel through the detection terminal.
[0052] A call link refers to the calling path of a service request in a distributed system. There are multiple link nodes on the call link. A link node refers to each service call point in the calling relationship between services in the distributed system. These nodes are connected together through a series of calling relationships to form a complete call link. Therefore, each link node corresponds to a service call.
[0053] In some of the embodiments, link nodes are usually marked as Span and recorded in a trace. The trace describes a complete transaction in a distributed system, and the Span is a record of each service call point in the transaction. By collecting and analyzing the Span information, the distributed link tracking system can restore the entire call link and perform performance analysis and troubleshooting.
[0054] The node information of the link node is information data used to characterize the node name, such as the service name of the link node, or the application name corresponding to the link node, etc. By marking the node information of the link node on the call link global topology map, the system detection personnel can determine the call relationship between the services from the global topology map.
[0055] The link attribute information of a link node is key attribute information data used to characterize the calling relationship between the link node and other link nodes. Through the link attribute information of the link node, the node attributes of the link node and the parent-child relationship between the link node and other nodes can be determined.
[0056] In some of the embodiments, the link attribute information includes a working unit identifier (span_id), a parent unit identifier (parent_span_id), and working unit description information (span_kind) of the link node.
[0057] Among them, span_id is a unique identifier introduced to count the time delay of each processing unit. When the request reaches each service component, that is, the link node, its start, specific process and end will be marked by the unique span_id.
[0058] parent_span_id is a unique identifier used to represent the parent span of the current span. The parent_span_id can be used to establish a hierarchical relationship between spans, thereby more clearly showing the call chain of requests in the distributed system.
[0059] Span_kind is the descriptive information used to characterize the type or kind of span. It describes the role or behavior of span in a distributed system, which helps to more accurately understand and analyze requests and operations in a distributed system. For example, span_kind-client refers to initiating a request on the client, and span_kind-server refers to receiving a request and responding to it on the server.
[0060] Specifically, the distributed link tracking system responds to the topology generation instruction for the call link and collects the node information and link attribute information of each link node on the call link.
[0061] S204: When it is determined that there is at least one fuzzy node with missing node information in each link node, obtain a service address identifier of the fuzzy node.
[0062] Among them, the fuzzy node refers to the link node that lacks node information. The service address identifier is the identification information used to uniquely identify the service address of the link node, such as the service port and service IP.
[0063] Specifically, when the distributed link tracking system collects node information and link attribute information for each link node respectively, if there is a fuzzy node with missing node information, the service address identifier of the fuzzy node is obtained and the service address identifier of the fuzzy node is used as the temporary node information of the fuzzy node.
[0064] S206, performing node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node.
[0065] The node information filling process refers to the process of determining the node information corresponding to the fuzzy node through the service address identifier and replacing the service address identifier with the node information.
[0066] Specifically, after using the service address identifier as the temporary node information of the fuzzy node, the distributed link tracking system can continue to determine the node information corresponding to the fuzzy node through the service address identifier, and then use the node information to replace the service address identifier to obtain the node information of the fuzzy node.
[0067] In some of the embodiments, a node information query component may be provided in the distributed link tracking system, and through the node information query component, the node information corresponding to the service address identifier may be searched according to the service address identifier of the fuzzy node.
[0068] S208, performing global topology integration processing according to each node information and each link attribute information, and obtaining a call link global topology graph including each link node.
[0069] The global topology integration process refers to an information integration operation of integrating node information and link attribute information of all link nodes into a global service topology map.
[0070] Specifically, after obtaining the node information and link attribute information of each link node, the distributed link tracking system can integrate the node information and link attribute information into a global service topology diagram, and display the dependency relationship between services based on the node information and link attribute information, and restore the calling logic and structure between services.
[0071] In some of the embodiments, an information integration model can be set up in the distributed link tracking system. After obtaining the node information and link attribute information of each link node, the node information and link attribute information can be input into the information integration model to perform global topology integration processing, so as to obtain a global topology map of the call link including each link node.
[0072] In the above-mentioned method for generating the global topology of a call link, the distributed link tracking system responds to the topology generation instruction for the call link, collects information on the node information and link attribute information of each link node on the call link, and obtains the service address identifier of the fuzzy node when it is determined that there is at least one fuzzy node with missing node information in each link node. Since the service address identifier is the same as the node information of the fuzzy node, both correspond to the fuzzy node one-to-one, the distributed link tracking system can perform node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node, and perform global topology integration processing based on the information of each node and the attribute information of each link to obtain a global topology map of the call link including each link node. By using the service address identifier of the fuzzy node to fill the node information of the fuzzy node, the accurate generation of the global topology map of the call link can be achieved even when the link node lacks node information, which effectively improves the observability and operation and maintenance efficiency of the system.
[0073] In some embodiments, as shown in FIG. 3 , S206 , performing node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node includes:
[0074] S302: Obtain a node information mapping relationship between an address identifier and node information.
[0075] Among them, the node information mapping relationship can be used to characterize the correspondence between the service address identifier and the node information of the link node. The node information mapping relationship can be established and maintained by the distributed link tracking system. When the distributed link tracking system collects node information for each link node, for the link nodes that have not lost node information, the address identifier of each link node service address is bound to the node information of each link node to generate a node information mapping relationship. Whenever a new correspondence between the service address identifier and the node information is discovered or determined, the distributed link tracking system will add a new correspondence to the node information mapping relationship and update the node information mapping relationship.
[0076] Specifically, when it is determined that there are ambiguous nodes in each link node, the distributed link tracking system will obtain the node information mapping relationship between the address identifier and the node information.
[0077] S304: Based on the service address identifier, search for an address identifier matching the service address identifier in the node information mapping relationship.
[0078] Specifically, after obtaining the node information mapping relationship between the address identifier and the node information, the distributed link tracking system will search for an address identifier that matches the service address identifier in the node information mapping relationship based on the service address identifier.
[0079] S306: When it is determined that there is an address identifier matching the service address identifier in the node information mapping relationship, the node information corresponding to the address identifier is determined as the node information of the fuzzy node.
[0080] Specifically, when determining that there is an address identifier matching the service address identifier in the node information mapping relationship, the distributed link tracking system determines the node information corresponding to the matching address identifier as the node information of the fuzzy node.
[0081] In the above embodiment, the distributed link tracking system generates and maintains a node information mapping relationship. When it is determined that there are fuzzy nodes in each link node, it can quickly match and fill in the corresponding node information for the fuzzy node according to the service address identifier of the fuzzy node, thereby effectively improving the accuracy and efficiency of node information filling.
[0082] In some other embodiments, calling the link global topology generation method further includes: when it is determined that there is no address identifier matching the service address identifier in the node information mapping relationship, updating and monitoring the node information mapping relationship. If it is monitored that the node information mapping relationship has been updated, returning to the step of obtaining the node information mapping relationship between the address identifier and the node information.
[0083] Specifically, when the distributed link tracking system determines that there is no address identifier matching the service address identifier in the node information mapping relationship, it means that the fuzzy node that is currently missing node information happens to be a newly added link node that has not yet been maintained, and the node information mapping relationship does not have a corresponding relationship between the service address identifier and the node information of the fuzzy node. The distributed link tracking system will temporarily suspend the node information filling operation for the fuzzy node, and instead update and monitor the node information mapping relationship.
[0084] When the distributed link tracking system detects that the node information mapping relationship has been updated, the distributed link tracking system will return to execute the step of obtaining the node information mapping relationship between the address identifier and the node information until it is determined that there is an address identifier in the node information mapping relationship that matches the service address identifier, and the node information corresponding to the address identifier is determined as the node information of the fuzzy node.
[0085] In the above embodiment, when there is temporarily no address identifier matching the service address identifier in the node information mapping relationship, the distributed link tracking system can perform real-time update monitoring on the node information mapping relationship, and search for the corresponding node information for the fuzzy node through a circular search to fill in the node information, thereby effectively improving the accuracy and efficiency of node information filling.
[0086] In some embodiments, in S208, after performing global topology integration processing according to each of the node information and each of the link attribute information to obtain a call link global topology graph including each of the link nodes, as shown in FIG4 , the call link global topology generation method further includes the following steps:
[0087] S402, obtaining the service address identifier of each link node.
[0088] Specifically, after the distributed link tracking system obtains the global topology diagram of the call link including each link node, it means that the distributed link tracking system has obtained the node information of each link node. In order to be able to perform real-time maintenance of the node information mapping relationship, the distributed link tracking system can obtain the service address identifier of each link node.
[0089] S404: Determine whether there is a newly added address identifier in each service address identifier according to each service address identifier and each address identifier in the node information mapping relationship.
[0090] Specifically, after obtaining the service address identifier of each link node, the distributed link tracking system can match each service address identifier with the address identifiers stored in the current node information mapping relationship to determine whether there are new address identifiers in each service address identifier that cannot be matched with the address identifiers.
[0091] S406: If there is a newly added address identifier, the node information mapping relationship is updated according to the newly added address identifier and the node information corresponding to the newly added address identifier to obtain an updated node information mapping relationship.
[0092] Specifically, when it is determined that there are new address identifiers in each service address identifier that cannot be matched with each address identifier, the distributed link tracking system can update the node information mapping relationship based on the new address identifier and the node information corresponding to the new address identifier, that is, add the correspondence between the new address identifier and the node information of the new address identifier to the node information mapping relationship to obtain the updated node information mapping relationship.
[0093] In the above embodiment, after the distributed link tracking system builds the global topology map of the call link each time, it can dynamically maintain and update the node information mapping relationship based on the node information of each link node to improve the integrity of the correspondence between the address identifier and the node information contained in the node information mapping relationship.
[0094] In some of the embodiments, the distributed link tracking system may also add a correspondence between an address identifier and node information in the node information mapping relationship in response to a manual configuration operation by a detection personnel.
[0095] In some embodiments, the node information and link attribute information of each link node on the call link are collected separately in S202, including: performing a point-tracking operation on each link node on the call link, and the point-tracking of the link node is used to collect the node information and link attribute information of the link node. For each link node, if the point-tracking corresponding to the link node cannot collect the node information of the link node, the link node is determined to be a fuzzy node.
[0096] Among them, the tracking operation refers to implanting information collection code in each link node to deploy tracking for subsequent information collection work. Through tracking, the processing status of each service node can be captured and recorded, thereby realizing the tracking and analysis of the entire request link. The tracking of link nodes can be used to collect node information and link attribute information of link nodes respectively.
[0097] Specifically, the distributed link system can perform tracking operations on each link node on the calling link and set tracking points on each link node. For each link node, the distributed link system can collect node information and link attribute information of the link node respectively through the tracking points of the link node. When the tracking points corresponding to the link node cannot collect the node information of the link node, it can be determined that the node information of the link node is lost, and the distributed link system can determine that the link node with lost node is a fuzzy node.
[0098] In the above embodiment, by arranging the buried points, information can be collected accurately and quickly for each link node, and whether there are fuzzy nodes with lost node information in each link node can be determined in real time based on the information collection situation, thereby effectively improving the efficiency of determining the fuzzy nodes.
[0099] In some embodiments, as shown in FIG5 , the link attribute information includes the work unit identifier, parent unit identifier and work unit description information of the link node. S208, performing global topology integration processing according to each node information and each link attribute information, and obtaining a call link global topology graph including each link node, including:
[0100] S502: Construct connection edges of the link nodes according to the working unit identifier and the parent unit identifier of each link node.
[0101] Among them, the work unit identifier, that is, span_id, can be used to uniquely identify a span, that is, an operation or a call, and the parent unit identifier, that is, parent_span_id, can identify the parent span of the span.
[0102] Among them, in the global topology diagram of the call link, the connection edges of each link node represent the connection relationship or call relationship between the nodes, which is the basis for constructing the global topology diagram of the call link. It can display the process of mutual calling and interaction between services or service components, and help developers or system testers understand the dependency relationship between services.
[0103] Specifically, after the distributed link tracking system collects the link attribute information of each link node, it parses the link attribute information and extracts the working unit identifier, parent unit identifier and working unit description information of the link node. Subsequently, the distributed link tracking system can first determine the upper and lower hierarchical relationships between each link node based on the working unit identifier and parent unit identifier of each link node, and construct the connection edges of each link node.
[0104] S504: Determine the calling direction of each connection edge based on the work unit description information of each link node.
[0105] Among them, the work unit description information, namely span_kind, can determine whether the span of the link node is initiated by the client or received and responded to by the server. For example, when span_kind is span_kind-client, it means that the span of the link node is initiated by the client, and when span_kind is span_kind-server, it means that the span of the link node is received and responded to by the server. In the global topology diagram of the call link, span_kind can help the distributed link tracking system determine the call direction of each connection edge, thereby clarifying the upstream and downstream relationships in the call link.
[0106] Specifically, after constructing the connection edges of each link node, the distributed link tracking system can determine the calling direction of each connection edge based on the working unit description information of each link node. The calling direction can make the connection edges between each link become directed edges in the topology graph.
[0107] S506: Generate an initial link topology graph according to each connection edge and the calling direction of each connection edge.
[0108] Specifically, after obtaining the connection edges between each link node and the calling direction of each connection edge, the distributed link tracking system can assign directionality to each connection edge according to the calling direction of each connection edge, obtain the directed edges between each link node, and then generate the initial link topology graph of the calling link. It can be understood that in the initial link topology graph, the service name of each link node is not marked.
[0109] S508, based on the node information of each link node, the node information of each link node in the initial link topology graph is annotated to obtain a call link global topology graph including each link node.
[0110] Among them, marking the node information of each link node is a process of determining the service name corresponding to each link node according to the node information, and marking the service name on the corresponding link node.
[0111] Specifically, in order to generate a complete global topology graph of the call link, the distributed link tracking system can mark the node information of each link node in the initial link topology graph based on the node information of each link node, and mark the corresponding service name on each link node to obtain a global topology graph of the call link containing each link node.
[0112] In the above embodiment, by analyzing and processing the link attribute information of each link node in the call link, automatic conversion and optimization from basic tracking information to high-level service topology diagram is achieved, and a global topology view of the call link in a complex distributed system can be generated in minutes, which greatly improves the troubleshooting efficiency of the distributed system and the accuracy of system optimization.
[0113] In some embodiments, as shown in FIG6 , a method for generating a global topology of a call link is provided, which specifically includes the following steps:
[0114] First, the distributed link tracking system responds to the topology generation instruction for the call link, performs tracking operations on each link node on the call link, and collects information about the service name and link attribute information of each link node through the tracking of each link node. For each link node, if the tracking corresponding to the link node cannot collect the service name of the link node, the link node is determined to be a fuzzy node.
[0115] For each fuzzy node, the distributed link tracking system can obtain the service IP port of the fuzzy node, determine the service IP port as a temporary identifier of the fuzzy node, call the node information mapping relationship between the IP port and the service name, and search for an IP port that matches the service IP port in the node information mapping relationship based on the service IP port. If it is determined that there is an IP port that matches the service IP port in the node information mapping relationship, the service name corresponding to the IP port is determined as the service name of the fuzzy node.
[0116] If it is determined that there is no IP port matching the service IP port in the node information mapping relationship, the node information mapping relationship is updated and monitored. If it is detected that the node information mapping relationship has been updated, the step of calling the node information mapping relationship of the IP port and the service name is returned.
[0117] When the service names of all fuzzy nodes are filled in, the distributed link tracking system can parse the link attribute information of each link node, that is, the span in the trace, and extract the span_id, parent_span_id and span_kind attributes, where span_id is used to uniquely identify a span, that is, an operation or call, parent_span_id identifies its parent span, and span_kind indicates whether the span initiates a request on the client (SPAN_KIND_CLIENT) or receives a request and responds on the server (SPAN_KIND_SERVER).
[0118] The distributed link tracking system can establish a parent-child relationship based on the span_id and parent_span_id of each link node to form the edges of a directed graph, and then help determine the call direction based on span_kind, thereby clarifying the upstream and downstream relationships of each link node in the call link and generating an initial link topology diagram of the call link.
[0119] Subsequently, the distributed link tracking system can annotate the initial link topology graph of the call link with the service name according to the service name of each link node, and obtain a global topology graph of the call link including each link node.
[0120] After obtaining the global topology map of the call link, the distributed link tracking system can obtain the service IP port of each link node, identify and match each service IP port with the IP ports stored in the current node information mapping relationship, and determine whether there are new IP ports in each service IP port that cannot be matched with the IP ports.
[0121] If there is a new IP port, the distributed link tracking system can update the node information mapping relationship based on the new IP port and the service name corresponding to the new IP port, that is, add the correspondence between the new IP port and the service name of the new IP port to the node information mapping relationship to obtain an updated node information mapping relationship.
[0122] The call link global topology generation method in the above embodiment, facing the challenge of incomplete call information, proposes to use the service address (IP port) to temporarily replace the missing service name, and dynamically maintain a mapping table of service name and IP port. This design not only flexibly copes with the problem of insufficient data in actual monitoring, but also provides a reliable basis for subsequent service identification. It is an innovative strategy for dealing with the complexity of distributed systems. In the process of merging the global topology map, an intelligent search for service addresses and a service name replacement process are introduced. This link ensures that even if the initial data is fragmented, a complete and accurate service dependency graph can be generated in the end, which improves the visualization level of system monitoring and fault diagnosis. At the same time, the above method is designed based on the existing tracing standard OpenTelemetry, which is easy to integrate with existing monitoring systems, leaving room for expansion for tracing attributes that may be added in the future.
[0123] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0124] Based on the same inventive concept, the embodiment of the present application also provides a call link global topology generation device for implementing the call link global topology generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more call link global topology generation device embodiments provided below can refer to the limitations of the call link global topology generation method above, and will not be repeated here.
[0125] In some embodiments, as shown in FIG. 7 , a call link global topology generation device 700 is provided, including: an instruction response module 701, an address identification acquisition module 702, a node information filling module 703 and a topology integration module 704, wherein:
[0126] The instruction response module 701 is used to respond to the topology generation instruction for the call link and collect the node information and link attribute information of each link node on the call link.
[0127] The address identifier acquisition module 702 is used to acquire the service address identifier of the fuzzy node when it is determined that there is at least one fuzzy node with missing node information in each link node.
[0128] The node information filling module 703 is used to perform node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node.
[0129] The topology integration module 704 is used to perform global topology integration processing according to the information of each node and the attribute information of each link, and obtain a call link global topology graph including each link node.
[0130] In some embodiments, the node information filling module 703 is used to: obtain a node information mapping relationship between an address identifier and node information; based on the service address identifier, search for an address identifier that matches the service address identifier in the node information mapping relationship; when it is determined that there is an address identifier that matches the service address identifier in the node information mapping relationship, determine the node information corresponding to the address identifier as the node information of the fuzzy node.
[0131] In some embodiments, the call link global topology generation device further includes:
[0132] The update monitoring module is used to update and monitor the node information mapping relationship when it is determined that there is no address identifier matching the service address identifier in the node information mapping relationship.
[0133] The loop module is used to return to the step of obtaining the node information mapping relationship between the address identifier and the node information if it is detected that the node information mapping relationship has been updated.
[0134] In some embodiments, the call link global topology generation device further includes:
[0135] The service address identification acquisition module is used to obtain the service address identification of each link node.
[0136] The newly added address identifier judgment module is used to determine whether there is a newly added address identifier in each service address identifier according to each service address identifier and each address identifier in the node information mapping relationship.
[0137] The mapping relationship updating module is used to update the node information mapping relationship according to the newly added address identifier and the node information corresponding to the newly added address identifier if there is a newly added address identifier, so as to obtain an updated node information mapping relationship.
[0138] In some embodiments, the instruction response module 701 is used to perform a point-tracking operation on each link node on the call link, and the point-tracking of the link node is used to collect node information and link attribute information of the link node respectively. For each link node, if the point-tracking corresponding to the link node cannot collect the node information of the link node, the link node is determined to be a fuzzy node.
[0139] In some embodiments, the link attribute information includes the working unit identification, parent unit identification and working unit description information of the link node. The topology integration module 704 is used to: construct the connection edge of each link node according to the working unit identification and parent unit identification of each link node; determine the call direction of each connection edge based on the working unit description information of each link node; generate an initial link topology map according to each connection edge and the call direction of each connection edge; based on the node information of each link node, annotate the node information of each link node in the initial link topology map to obtain a call link global topology map containing each link node.
[0140] Each module in the above-mentioned call link global topology generation device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0141] In some embodiments, a computer device is provided, which may be a server or terminal integrated with a distributed link tracking system, and its internal structure diagram may be shown in FIG8. The computer device includes a processor, a memory, and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as node information, link attribute information, service address identification, and a call link global topology map. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating a call link global topology is implemented.
[0142] Those skilled in the art will understand that the structure shown in FIG. 8 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0143] In some embodiments, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0144] In response to a topology generation instruction for a call link, collecting information about node information and link attribute information of each link node on the call link;
[0145] When it is determined that there is at least one fuzzy node with missing node information in each link node, obtaining a service address identifier of the fuzzy node;
[0146] Perform node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node;
[0147] A global topology integration process is performed based on the information of each node and the attribute information of each link to obtain a call link global topology graph including each link node.
[0148] In some embodiments, when the processor executes the computer program, the processor further implements the following steps:
[0149] Obtain the node information mapping relationship between the address identifier and the node information;
[0150] Based on the service address identifier, searching for an address identifier matching the service address identifier in the node information mapping relationship;
[0151] When it is determined that there is an address identifier matching the service address identifier in the node information mapping relationship, the node information corresponding to the address identifier is determined as the node information of the fuzzy node.
[0152] In some embodiments, when the processor executes the computer program, the processor further implements the following steps:
[0153] When it is determined that there is no address identifier matching the service address identifier in the node information mapping relationship, update monitoring of the node information mapping relationship;
[0154] If it is detected that the node information mapping relationship has been updated, the process returns to the step of obtaining the node information mapping relationship between the address identifier and the node information.
[0155] In some embodiments, when the processor executes the computer program, the processor further implements the following steps:
[0156] Obtain the service address identifier of each link node;
[0157] Determine whether there is a newly added address identifier in each service address identifier according to each service address identifier and each address identifier in the node information mapping relationship;
[0158] If there is a newly added address identifier, the node information mapping relationship is updated according to the newly added address identifier and the node information corresponding to the newly added address identifier to obtain an updated node information mapping relationship.
[0159] In some embodiments, when the processor executes the computer program, the processor further implements the following steps:
[0160] Perform tracking operations on each link node on the call link. The tracking of the link node is used to collect node information and link attribute information of the link node respectively;
[0161] For each link node, if the corresponding buried point of the link node cannot collect the node information of the link node, the link node is determined to be a fuzzy node.
[0162] In some embodiments, when the processor executes the computer program, the processor further implements the following steps:
[0163] According to the working unit identifier and parent unit identifier of each link node, the connection edge of each link node is constructed;
[0164] Determine the calling direction of each connection edge based on the work unit description information of each link node;
[0165] Generate an initial link topology graph according to each connection edge and the calling direction of each connection edge;
[0166] Based on the node information of each link node, the node information of each link node in the initial link topology graph is annotated to obtain a call link global topology graph including each link node.
[0167] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0168] In response to a topology generation instruction for a call link, collecting information about node information and link attribute information of each link node on the call link;
[0169] When it is determined that there is at least one fuzzy node with missing node information in each link node, obtaining a service address identifier of the fuzzy node;
[0170] Perform node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node;
[0171] A global topology integration process is performed based on the information of each node and the attribute information of each link to obtain a call link global topology graph including each link node.
[0172] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0173] Obtain the node information mapping relationship between the address identifier and the node information;
[0174] Based on the service address identifier, searching for an address identifier matching the service address identifier in the node information mapping relationship;
[0175] When it is determined that there is an address identifier matching the service address identifier in the node information mapping relationship, the node information corresponding to the address identifier is determined as the node information of the fuzzy node.
[0176] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0177] When it is determined that there is no address identifier matching the service address identifier in the node information mapping relationship, update monitoring of the node information mapping relationship;
[0178] If it is detected that the node information mapping relationship has been updated, the process returns to the step of obtaining the node information mapping relationship between the address identifier and the node information.
[0179] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0180] Obtain the service address identifier of each link node;
[0181] Determine whether there is a newly added address identifier in each service address identifier according to each service address identifier and each address identifier in the node information mapping relationship;
[0182] If there is a newly added address identifier, the node information mapping relationship is updated according to the newly added address identifier and the node information corresponding to the newly added address identifier to obtain an updated node information mapping relationship.
[0183] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0184] Perform tracking operations on each link node on the call link. The tracking of the link node is used to collect node information and link attribute information of the link node respectively;
[0185] For each link node, if the corresponding buried point of the link node cannot collect the node information of the link node, the link node is determined to be a fuzzy node.
[0186] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0187] According to the working unit identifier and parent unit identifier of each link node, the connection edge of each link node is constructed;
[0188] Determine the calling direction of each connection edge based on the work unit description information of each link node;
[0189] Generate an initial link topology graph according to each connection edge and the calling direction of each connection edge;
[0190] Based on the node information of each link node, the node information of each link node in the initial link topology graph is annotated to obtain a call link global topology graph including each link node.
[0191] In some embodiments, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0192] In response to a topology generation instruction for a call link, collecting information about node information and link attribute information of each link node on the call link;
[0193] When it is determined that there is at least one fuzzy node with missing node information in each link node, obtaining a service address identifier of the fuzzy node;
[0194] Perform node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node;
[0195] A global topology integration process is performed based on the information of each node and the attribute information of each link to obtain a call link global topology graph including each link node.
[0196] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0197] Obtain the node information mapping relationship between the address identifier and the node information;
[0198] Based on the service address identifier, searching for an address identifier matching the service address identifier in the node information mapping relationship;
[0199] When it is determined that there is an address identifier matching the service address identifier in the node information mapping relationship, the node information corresponding to the address identifier is determined as the node information of the fuzzy node.
[0200] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0201] When it is determined that there is no address identifier matching the service address identifier in the node information mapping relationship, update monitoring of the node information mapping relationship;
[0202] If it is detected that the node information mapping relationship has been updated, the process returns to the step of obtaining the node information mapping relationship between the address identifier and the node information.
[0203] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0204] Obtain the service address identifier of each link node;
[0205] Determine whether there is a newly added address identifier in each service address identifier according to each service address identifier and each address identifier in the node information mapping relationship;
[0206] If there is a newly added address identifier, the node information mapping relationship is updated according to the newly added address identifier and the node information corresponding to the newly added address identifier to obtain an updated node information mapping relationship.
[0207] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0208] Perform tracking operations on each link node on the call link. The tracking of the link node is used to collect node information and link attribute information of the link node respectively;
[0209] For each link node, if the corresponding buried point of the link node cannot collect the node information of the link node, the link node is determined to be a fuzzy node.
[0210] In some embodiments, when the computer program is executed by the processor, the following steps are also implemented:
[0211] According to the working unit identifier and parent unit identifier of each link node, the connection edge of each link node is constructed;
[0212] Determine the calling direction of each connection edge based on the work unit description information of each link node;
[0213] Generate an initial link topology graph according to each connection edge and the calling direction of each connection edge;
[0214] Based on the node information of each link node, the node information of each link node in the initial link topology graph is annotated to obtain a call link global topology graph including each link node.
[0215] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. In addition, the acquisition, storage, processing, and transmission of data are in compliance with relevant laws and regulations.
[0216] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0217] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0218] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating a global topology of a call link, characterized in that: The method comprises: In response to a topology generation instruction for a call link, collecting information about node information and link attribute information of each link node on the call link; When it is determined that there is at least one fuzzy node with missing node information in each of the link nodes, obtaining a service address identifier of the fuzzy node; Performing node information filling processing on the fuzzy node based on the service address identifier to obtain node information of the fuzzy node; A global topology integration process is performed based on the node information and the link attribute information to obtain a call link global topology graph including the link nodes.
2. The method according to claim 1, characterized in that The performing node information filling processing on the fuzzy node based on the service address identifier to obtain the node information of the fuzzy node includes: Obtain the node information mapping relationship between the address identifier and the node information; Based on the service address identifier, searching the node information mapping relationship for an address identifier that matches the service address identifier; When it is determined that an address identifier matching the service address identifier exists in the node information mapping relationship, the node information corresponding to the address identifier is determined as the node information of the fuzzy node.
3. The method according to claim 2, characterized in that The method further comprises: When it is determined that there is no address identifier matching the service address identifier in the node information mapping relationship, updating and monitoring the node information mapping relationship; If it is detected that the node information mapping relationship has been updated, the process returns to the step of obtaining the node information mapping relationship between the address identifier and the node information.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: Obtaining the service address identifier of each link node; Determine whether there is a newly added address identifier in each of the service address identifiers according to each of the service address identifiers and each of the address identifiers in the node information mapping relationship; If the newly added address identifier exists, the node information mapping relationship is updated according to the newly added address identifier and the node information corresponding to the newly added address identifier to obtain an updated node information mapping relationship.
5. The method according to claim 2 or 3, characterized in that: The collecting of node information and link attribute information of each link node on the calling link includes: Performing a tracking operation on each link node on the call link, wherein the tracking of the link node is used to collect node information and link attribute information of the link node respectively; For each link node, when the corresponding buried point of the link node cannot collect the node information of the link node, the link node is determined to be a fuzzy node.
6. The method according to any one of claims 1 to 3, characterized in that: The link attribute information includes the working unit identification, parent unit identification and working unit description information of the link node; The global topology integration process is performed according to the node information and the link attribute information to obtain a call link global topology graph including the link nodes, including: Constructing connection edges of the link nodes according to the respective working unit identifiers and parent unit identifiers of the link nodes; Determining the calling direction of each of the connection edges based on the respective working unit description information of each of the link nodes; Generate an initial link topology graph according to each of the connection edges and the calling direction of each of the connection edges; Based on the node information of each link node, the node information of each link node in the initial link topology diagram is annotated to obtain a call link global topology diagram including each link node.
7. A device for generating a global topology of a call link, characterized in that: The device comprises: An instruction response module, configured to collect information about node information and link attribute information of each link node on the call link in response to a topology generation instruction for the call link; An address identifier acquisition module, configured to acquire a service address identifier of the fuzzy node when it is determined that there is at least one fuzzy node with missing node information in each of the link nodes; A node information filling module, used to perform node information filling processing on the fuzzy node based on the service address identifier to obtain node information of the fuzzy node; The topology integration module is used to perform global topology integration processing according to the node information and the link attribute information to obtain a call link global topology graph including the link nodes.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
IPv6 local link topology discovery method
CN106027400A
Topology structure identification method, system and device and computer memory medium
CN108429642A
Missing attribute information completion method and device, computer equipment and storage medium
CN110659396A
Topological structure diagram generation method and device, computer equipment and display system
CN112783720A
Network state monitoring method and device, electronic equipment and readable storage medium
CN113079059A