A method, system and device for generating an application topology call relationship

By splitting and storing the application topology node and its calling relationship with the business request call data, and using topology hash fields and link hash fields to solve the problems of inaccurate topology relationships and high computing resource consumption in the existing technology, efficient and accurate topology call relationship generation and query are achieved.

CN119719116BActive Publication Date: 2025-06-03SHENZHOU LINGYUN (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510221734.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-03
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

In complex application systems, the call relationship between applications varies with time and the user access services. The prior art cannot effectively exclude call data that is unrelated to the central node, resulting in inaccurate topological relationships and their indicator data. At the same time, the prior art requires full storage of topological data, resulting in high computing resource consumption and long query time, which is difficult to meet high performance requirements.

Method used

A method for generating topology call relationships is proposed. The topology nodes and their calling relationships are split and stored with the business request call data through the preset topology relationship table and the preset topology call index table, and the two data tables are associated with the topology hash field and the link hash field. In response to the topology query request, obtain the central node and the target time period, query the target topology hash value and the target link hash value, and generate a target topology diagram containing the target call relationship.

Benefits of technology

Ensure the correctness of topological call relationships and the accuracy of index data, reduce computing resource overhead, improve query efficiency, avoid inefficient query mode of full table scanning, and optimize the storage structure and query method of topological relationship data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719116B_ABST
    Figure CN119719116B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data networks, and discloses a method, a system and a device for generating an application topology call relationship. The method includes: in response to receiving a topology query request, obtaining a central node and a target time period corresponding to the topology query request; based on a preset topology relationship table, querying a target topology hash value that matches the central node and the target time period; based on the target topology hash value, determining a plurality of target link hash values; based on a preset topology call index table, querying target index data corresponding to each target link hash value; and generating a target topology graph including a target call relationship based on all the target link hash values and their corresponding target index data. The solution of the present invention can ensure the correctness of the topology call relationship and the accuracy of its index data while effectively reducing the computational resource overhead and improving the query efficiency when performing an application topology query on massive topology data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data networks, and in particular, to a method, system, and device for generating application topology call relationships. Background Art

[0002] In the context of the increasing maturity of technologies such as cloud computing and big data, the microservices architecture has gradually come into view. Full-link performance monitoring plays an important role in the microservices architecture. Full-link performance monitoring covers the mobile side, network side, and server side, comprehensively counting the performance indicators of business requests for applications on each side. The association relationships and call chains between applications are displayed through a topology graph. Each node (Node) in the topology graph represents a service or application instance, and the connection line (Edge) between nodes represents the call relationship between services or applications. With the help of the topology graph, operation and maintenance personnel can quickly identify the performance bottlenecks, fault points, and dependency relationships of applications.

[0003] However, in a complex application system, the call relationships between applications change over time and with different user access to services. In related technologies, the call relationships of application topologies only store the direct relationship data between the calling node and the called node. When querying the application topology, it is impossible to effectively exclude the call data irrelevant to the central node, resulting in inaccurate topology relationships and their index data. In addition, related technologies usually store the application topology nodes and their call relationship data in the same database table as the business request call data. Since the index calculation of the application topology depends on the business request call data stored in full volume, this leads to the need for full-volume storage of topology data. In the scenario of massive topology data, this storage method brings high computational resource consumption and long query time, making it difficult to meet the high-performance requirements.

[0004] Therefore, there is an urgent need to propose an accurate method for generating application topology call relationships to solve the above problems. Summary of the Invention

[0005] In view of this, the present invention proposes a method, system, and device for generating application topology call relationships, which solves the problem that when querying the application topology for massive topology data, the query result cannot only contain the call data related to the central node, ensures the correctness of the topology call relationship and the accuracy of its index data, reduces the computational resource overhead, and improves the query efficiency.

[0006] Based on the above object, on the one hand, an embodiment of the present invention provides a method for generating application topology call relationships, which specifically includes the following steps:

[0007] In response to receiving a topology query request, obtain the central node and the target time period corresponding to the topology query request;

[0008] Query a target topology hash value that matches the central node and the target time period based on a preset topology relationship table;

[0009] Determine a number of target link hash values based on the target topology hash value;

[0010] Query target metric data corresponding to each of the target link hash values based on a preset topology call metric table;

[0011] Generate a target topology graph containing a target call relationship based on all the target link hash values and their corresponding target metric data.

[0012] In some embodiments, the method for generating an application topology call relationship further includes constructing the preset topology relationship table and the preset topology call metric table based on the following steps:

[0013] In response to receiving a number of request data sent by a probe, for each of the request data, store it in a first cache with its corresponding trace identifier as the key field and the request data as the value field, and trigger a preset timer corresponding to the trace identifier;

[0014] In response to the first cache receiving the trace identifier, check whether all the request data corresponding to the trace identifier is cached based on the preset timer;

[0015] In response to all the corresponding request data being cached, obtain all call pairs and the metric data corresponding to each call pair based on all the corresponding request data;

[0016] Construct a first call relationship array according to all the call pairs, and determine a first topology hash value and a number of first link hash values based on the first call relationship array;

[0017] Construct the preset topology relationship table based on the first topology hash value, all the first link hash values and all the call pairs, and construct the preset topology call metric table based on the first topology hash value, all the first link hash values and all the metric data.

[0018] In some embodiments, the step of determining the first topology hash value based on the first call relationship array includes:

[0019] Perform a topological sorting process on all the call pairs in the first call relationship array to obtain a target call relationship array containing a number of first node identifiers;

[0020] Obtain a seed value corresponding to the target call relationship array, and initialize a preset hash algorithm based on the seed value;

[0021] Based on the initialized preset hash algorithm, convert each of the first node identifiers in the target call relationship array into an integer to obtain an integer array;

[0022] Based on a preset function, convert the integer array to obtain the first topological hash value.

[0023] In some embodiments, the step of determining a plurality of first link hash values based on the first call relationship array includes:

[0024] Based on each call pair in the first call relationship array, obtain the initiating node identifier and the receiving node identifier included therein;

[0025] Based on the initialized preset hash algorithm, convert the first topological hash value to obtain a first integer, convert the initiating node identifier to obtain a second integer, and convert the receiving node identifier to obtain a third integer;

[0026] Based on a preset function, convert the array containing the first integer, the second integer, and the third integer to obtain a first link hash value.

[0027] In some embodiments, the step of generating a target topology graph including a target call relationship based on all the target link hash values and their corresponding target metric data includes:

[0028] Based on a preset search algorithm, restore all the target link hash values to obtain a plurality of the target call relationships;

[0029] Based on an aggregation query algorithm, query the topological call metric data corresponding to each target call relationship from the target metric data;

[0030] Based on all the target call relationships and their corresponding topological call metric data, determine all edges, nodes, and edge metrics to construct the target topology graph.

[0031] In some embodiments, the step of querying a target topological hash value that matches the central node and the target time period based on a preset topological relationship table includes:

[0032] According to the central node identifier of the central node, query all first topological relationship data in the preset topological relationship table whose initiating node identifier field value or receiving node identifier field value matches the central node identifier and whose time field value meets the target time period;

[0033] Deduplicate the topological hash field values in all the first topological relationship data, and determine the target topological hash value based on the processing result.

[0034] In some embodiments, the step of determining a plurality of target link hash values based on the target topology hash value includes:

[0035] Query all second topology relationship data in the preset topology relationship table whose topology hash field value matches the target topology hash value;

[0036] Take the link hash field value in each of the second topology relationship data as one of the target link hash values.

[0037] In some embodiments, the method for generating an application topology call relationship further includes:

[0038] Use the application node to be queried input by the user as the central node corresponding to the topology query request, and the time period to be queried as the target time period corresponding to the topology query request.

[0039] On the other hand, an embodiment of the present invention further provides a system for generating an application topology call relationship, including:

[0040] An acquisition unit configured to, in response to receiving a topology query request, acquire the central node and the target time period corresponding to the topology query request;

[0041] A first query unit configured to query, based on a preset topology relationship table, a target topology hash value that matches the central node and the target time period;

[0042] A determination unit configured to determine a plurality of target link hash values based on the target topology hash value;

[0043] A second query unit configured to query, based on a preset topology call index table, target index data corresponding to each of the target link hash values;

[0044] A generation unit configured to generate a target topology graph including a target call relationship based on all the target link hash values and their corresponding target index data.

[0045] In yet another aspect of an embodiment of the present invention, a computer device is further provided, including: at least one processor; and a memory, where the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the above method are implemented.

[0046] The present invention has at least the following beneficial technical effects: In the method for generating the application topology call relationship of the present invention, the topology nodes and their call relationships and business request call data are pre-split and stored in a preset topology relationship table and a preset topology call index table, and the two data tables are associated through a topology hash field and a link hash field, avoiding the full storage of business request data. In the query stage, with the central node and the target time period as conditions, the target topology hash value matching the central node is queried in the preset topology relationship table, which can eliminate the call relationship data not associated with the central node, narrow the query range, improve the query throughput, and determine the target link hash value corresponding to the target call relationship related to the central node according to the target topology hash value. Furthermore, the target index data of each target call relationship can be quickly queried in the preset topology call index table, using the topology hash field and the link hash field to accurately match the topology call relationship and index data, reducing the number of database scans, avoiding the inefficient query mode of full table scan in the traditional method, optimizing the storage structure of the topology relationship data and improving the query method of the topology relationship data, so as to reduce the consumption of computing resources, improve the query efficiency and ensure the accuracy of the generated topology relationship data. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can be obtained based on these drawings.

[0048] Figure 1 A schematic diagram of an embodiment of the application call topology for multiple request call transactions occurring within a period of time;

[0049] Figure 2 A schematic diagram of an embodiment of the application topology relationship and its index data queried with node C as the central node in the related art;

[0050] Figure 3 A block diagram of an embodiment of the application topology fast query method provided by the present invention;

[0051] Figure 4 A schematic diagram of an embodiment of the system architecture provided by the present invention;

[0052] Figure 5 A schematic diagram of an embodiment of the application topology call relationship query code provided by the present invention;

[0053] Figure 6 A schematic diagram of an embodiment of the application topology relationship and its index data queried with node C as the central node provided by the present invention;

[0054] Figure 7 Schematic diagram of an embodiment of the execution process of the topological hash value generation algorithm provided by the present invention;

[0055] Figure 8 Schematic diagram of an embodiment of the execution flow of the method for generating application topology call relationships provided by the present invention;

[0056] Figure 9 Schematic diagram of an embodiment of the system for generating application topology call relationships provided by the present invention;

[0057] Figure 10 Schematic diagram of the structure of an embodiment of the computer device provided by the present invention. Detailed implementation manners

[0058] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the following further describes the embodiments of the present invention in detail with reference to specific embodiments and the accompanying drawings.

[0059] It should be noted that all the expressions using "first" and "second" in the embodiments of the present invention are used to distinguish two entities or parameters with the same name but different ones. It can be seen that "first" and "second" are only for the convenience of expression and should not be construed as a limitation on the embodiments of the present invention. This will not be elaborated one by one in the subsequent embodiments.

[0060] In the related art, the call relationships between applications change with time and different user access services. For example Figure 1 Shown is a schematic diagram of an embodiment of the application call topology of multiple request call transactions within a period of time. Taking Figure 1 as an example, assuming that node C is used as the central node to query its corresponding application topology relationship and index data, since the call relationship of the application topology in the related art only stores the direct relationship data between the call node and the called node, the query result is as shown in Figure 2 Shown, which wrongly includes nodes Y, H, and K that have no direct or indirect call relationship with node C. It can be seen that the following problems exist when the related art queries the application topology call relationship and its related index data within a specific time range:

[0061] (1) The topological call relationship is inaccurate. When generating an application topology with a certain node as the center, irrelevant nodes appear in the application topology;

[0062] (2) The topological call index data is inaccurate. Because the call relationships of irrelevant nodes cannot be eliminated, the call index data is incorrect.

[0063] In view of the above problems, in the first aspect of the embodiments of the present invention, a method for generating an application topology call relationship is proposed. As Figure 3 shown, the method for generating the application topology call relationship of the present invention includes the following steps:

[0064] Step S100, in response to receiving a topology query request, obtain the central node and the target time period corresponding to the topology query request;

[0065] Step S200, based on a preset topology relationship table, query the target topology hash value that matches the central node and the target time period;

[0066] Step S300, based on the target topology hash value, determine a plurality of target link hash values;

[0067] Step S400, based on a preset topology call index table, query the target index data corresponding to each target link hash value;

[0068] Step S500, based on all the target link hash values and their corresponding target index data, generate a target topology graph including the target call relationship.

[0069] In some embodiments, as Figure 4 shown, the execution process of the method of the present invention involves a probe, an application topology data processing system, a database, and an application topology query system. The application topology query system receives a topology query request with the central node and the target time period as conditions. The central node is the application to be queried input by the user, and the target time period is the time range to be queried input by the user. The application identifier of the topology node included in the topology query request is used as the identifier of the central node. As Figure 5As shown, conditional on the target time period and the identifier of the central node, all topo_hashes (i.e., target topology hash values) corresponding to the central node within the target time period are queried from the preset topology relation table. The application call topology relations identified by the queried topo_hashes only contain topology nodes that have direct or indirect call relations with the central node, and this step eliminates topology nodes that are not relevant to the central node. Then, conditional on the target time period and the queried topo_hashes, all link_hashes (i.e., target link hash values) and their corresponding from_appid (calling node) and to_appid (called node) are queried from the preset topology relation table. Further, for each queried link_hash, the target call relation is restored through algorithms such as DFS (Depth-First Search) or BFS (Breadth-First Search), and conditional on the target time period and this link_hash, the target metric data corresponding to this target call relation is aggregated and queried from the preset topology call metric table. All target call relations and their target metric data are assembled to obtain the target topology graph. By splitting and setting up the preset topology relation table and the preset topology call metric table, the query of the application topology call relation and the metric data of the topology call relation are separated, and in a way of querying on demand, the target metric data is queried from the preset topology call metric table with a large amount of data, reducing the system overhead. Figure 5 In Figure 5 , "app_topology" is the preset topology relation table, "C" is the identifier of the example central node, and "ts>=1736153640" and "ts<=1736153700" are the example target time periods.

[0070] In some embodiments, taking Figure 1 as an example, assuming that node C is used as the central node to query its corresponding application topology relation and metric data, the results obtained by querying using the above method of the present invention are as Figure 6 shown, achieving the effect of excluding call relation data that has no association with the central node C and generating the correct application topology call relation and its metric data.

[0071] The method for generating the application topology call relationship of the present invention pre-stores the topology nodes and their call relationships and the service request call data in a preset topology relationship table and a preset topology call index table respectively, and associates the two data tables through a topology hash field and a link hash field, avoiding the full storage of service request data. In the query stage, with the central node and the target time period as conditions, combined with the topology hash field and the link hash field, it accurately matches the target topology call relationship related to the central node and its target index data, reduces the number of database scans, avoids the inefficient query mode of full table scan in the traditional method, optimizes the storage structure of the topology relationship data and improves the query method of the topology relationship data, so as to reduce the consumption of computing resources, improve the query efficiency and ensure the accuracy of the generated topology relationship data.

[0072] In some embodiments, for the method of generating the application topology call relationship, the construction steps of the preset topology relationship table and the preset topology call index table include: in response to receiving a number of request data sent by the probe, for each request data, using its corresponding tracing identifier as the key field and the request data as the value field, storing it in the first cache, and triggering the preset timer corresponding to the tracing identifier; in response to the first cache receiving the tracing identifier, checking whether all the request data corresponding to the tracing identifier are cached based on the preset timer; in response to all the corresponding request data being cached, based on all the corresponding request data, obtaining all call pairs and the index data corresponding to each call pair respectively; constructing a first call relationship array according to all the call pairs, and based on the first call relationship array, determining a first topology hash value and a number of first link hash values; constructing the preset topology relationship table based on the first topology hash value, all the first link hash values and all the call pairs, and constructing the preset topology call index table based on the first topology hash value, all the first link hash values and all the index data.

[0073] In some embodiments, after the probe collects a service request, such as a request for service A to call service B, it encapsulates the call relationship data (such as the calling node and the called node) in the service request, the traceid (i.e., the tracing identifier) field and the appid (application identifier) field corresponding to the call relationship data into request data (i.e., the request data), and then sends the request data in batches to the application topology data processing system.

[0074] In some embodiments, a preset topology relation table and a preset topology call index table are constructed and maintained by applying a topology data processing system. The topology data processing system starts a topology association thread pool and initializes the cache therein, i.e., the first cache. When the topology data processing system ingests the request data sent by the probe, the traceid field and the appid field in the request data are extracted. Since the data sent by multiple probes has a sequence, in order to process the request data in an orderly manner, the topology association thread adds the received request data to the first cache with the traceid as the key (key field), and sets a preset timer for the traceid. The duration of the preset timer can be configured according to actual application requirements, for example, set to 30 seconds. When the first cache receives each request data, it will trigger the preset timer corresponding to the traceid in the request data. When the timer is triggered, it checks whether all the request data corresponding to the traceid in the first cache has arrived. If there is still unarrived request data for the traceid, the preset timer corresponding to the traceid is reset and continues to wait for other timer triggers. If all the request data corresponding to the traceid has arrived, all the request data corresponding to the traceid is taken out from the first cache. According to the call relation data (i.e., call pairs) in all the taken-out request data, the call pair records the appid of the calling node and the appid of the called node, and all the call pairs are put into an array to obtain the first call relation array. Among them, the traceid is used to identify a complete request call transaction. For example, when a request initiated by a user passes through multiple service or application instances, all the request requests of the service or application instances share the same traceid, so that the flow of the entire business request can be traced to determine the overall link.

[0075] In some embodiments, all the request data in a single request call transaction can be used to form an application call topology of a single request call transaction. Due to the emergence of reasons such as system architecture, complex load balancing strategies, and failover, multiple request call transactions initiated at different times may generate the same or different application call topologies. Therefore, the first call relation array can be used to generate a unique topo_hash through a preset algorithm to distinguish different application call topologies, and further generate a unique link_hash to distinguish each business request in different application call topologies.

[0076] In some embodiments, in order to reduce the overhead of application call topology and metric data query, the application call topology data and topology call metric data are stored as two separate tables. The preset topology relation table only stores the fields of ts (timestamp), topo_hash, link_hash, from_appid, and to_appid, as shown in Table 1 below. The preset topology call metric table only stores ts, topo_hash, link_hash, count, and other metric fields, as shown in Table 2 below. Among them, ts is rounded to the nearest minute to reduce the amount of data. For example, the initial ts is represented as 1736153679 (2025 / 01 / 06 16:54:39), and the ts after rounding to the nearest minute is represented as 1736153640. Taking Figure 1 the application call topology of multiple service calls in Figure 1 as an example, the topology call relationship data of each application call topology is de-duplicated and stored in the database in the structure of Table 1 below. The topology call metric data is pre-aggregated and stored in the database in the structure of Table 2 below to reduce the amount of data. The count field in Table 2 records the number of calls, the slow field represents the number of slow calls, and dur represents the average response time.

[0077] Table 1

[0078]

[0079] Table 2

[0080]

[0081] In the method for generating the application topology call relationship of the present invention, in order to optimize the storage and query efficiency, the application topology data processing system uses a preset topology relation table to store topology nodes and their call relationship data, uses a preset topology call metric table to store specific service request call data, and associates the two database tables through topo_hash and link_hash. Since the nodes and their call relationships of the overall application call topology are relatively fixed in a long period, the values of topo_hash and link_hash are relatively fixed and the cardinality is small. Furthermore, the amount of data in the database table storing the application topology nodes and their call relationship data can be ensured to be small through pre-aggregation technology. As a result, the computing resources and query time overhead for querying the application topology call relationship will be very small. Then, the topo_hash and link_hash fields in the query result can be used to accurately aggregate and query the topology call metric data, avoiding unnecessary database scan operations and meeting the high-performance requirements.

[0082] In some embodiments, the step of determining the first topological hash value based on the first call relationship array includes: performing a topological sorting process on all call pairs in the first call relationship array to obtain a target call relationship array containing a number of first node identifiers; obtaining a seed value corresponding to the target call relationship array, and initializing a preset hash algorithm based on the seed value; based on the initialized preset hash algorithm, converting each first node identifier in the target call relationship array into an integer to obtain an integer array; and converting the integer array into the first topological hash value based on a preset function.

[0083] In some embodiments, taking Figure 7 as an example, the topo_hash generation process is described. The full-link application call topology is a directed acyclic graph (DAG, Directed Acyclic Graph), where its vertices are applications (appid) and its edges are reques data (call pairs). By using the Kahn (topological sorting algorithm for graphs) algorithm to perform topological sorting on the first call relationship array, an appid array that conforms to the actual call relationship is generated, that is, the target call relationship array, such as Figure 7 the array "[B, C, D, F, X]" in. Each appid in this appid array is the first node identifier. Since the topological sorting is performed based on the call relationship data in the request data, it is ensured that even if the applications passed through by the request call transactions are the same, different target call relationship arrays will be generated due to different call relationship data. To avoid the situation where when different request call transactions pass through all the same applications but have different mutual call relationships, there may be a high similarity of the first node identifiers in the target call relationship array, resulting in hash collisions in the generated topo_hash, a dynamically generated hash seed value and a double-hash mechanism are introduced to solve the above situation. A seed value of MurmurHash3 (i.e., the preset hash algorithm) is generated according to the generated target call relationship array, and this seed value is used to initialize the hash value. Different seed values will cause MurmurHash3 to generate different hash sequences, improving the randomness of generating topo_hash. Based on the MurmurHash3 algorithm initialized with the dynamically generated seed value, each first node identifier in the target call relationship array is converted into an integer to obtain an integer array, and through the SHA1 (cryptographic hash function) algorithm, this integer array is converted into the final topo_hash corresponding to a request call transaction, that is, the first topological hash value. For example, the means of generating a seed value according to the generated target call relationship array can be to serialize the array into a string and then convert the serialized string into a seed through a simple hash algorithm.

[0084] The method for generating the application topology call relationship of the present invention sorts all associated nodes in a distributed service request call transaction according to the call relationship in the application topology data processing system and calculates the hash value as topo_hash, and uses topo_hash to uniquely identify the application call topology corresponding to different request call transactions, so as to facilitate subsequent optimization of the storage structure of the topology relationship data and improvement of the query method of the topology relationship data, reduce the consumption of computing resources, improve the query efficiency and ensure the accuracy of the generated topology relationship data.

[0085] In some embodiments, the step of determining a plurality of first link hash values based on the first call relationship array includes: obtaining the initiating node identifier and the receiving node identifier included therein based on each call pair in the first call relationship array; based on the initialized preset hash algorithm, converting the first topology hash value to obtain a first integer, converting the initiating node identifier to obtain a second integer, and converting the receiving node identifier to obtain a third integer; converting the array containing the first integer, the second integer, and the third integer to obtain a first link hash value based on a preset function; wherein, each call pair has a corresponding first link hash value, and the first topology hash value has one or more corresponding first link hash values.

[0086] In some embodiments, for each request call transaction, the topo_hash corresponding thereto is converted into an integer through the above-mentioned initialized MurmurHash3 algorithm to obtain a first integer. For each call relationship data in the request call transaction, the appid (i.e., the initiating node identifier) of the calling node and the appid (i.e., the receiving node identifier) of the called node therein are respectively converted into integers through the above-mentioned initialized MurmurHash3 algorithm to obtain a second integer and a third integer. The first integer, the second integer, and the third integer are converted into a final link_hash corresponding to a certain call relationship in a request call transaction, i.e., the first link hash value, through the SHA1 algorithm.

[0087] The method for generating the application topology call relationship of the present invention calculates the hash value of each call relationship data in a distributed service request call transaction in the application topology data processing system and uses it as link_hash, and uses link_hash to uniquely identify different call relationships in different request call transactions, so as to facilitate subsequent optimization of the storage structure of the topology relationship data and improvement of the query method of the topology relationship data, reduce the consumption of computing resources, improve the query efficiency and ensure the accuracy of the generated topology relationship data.

[0088] In some embodiments, the step of generating a target topology graph including target call relationships based on all target link hash values and their corresponding target metric data includes: restoring all target link hash values based on a preset search algorithm to obtain a number of target call relationships; querying, based on an aggregation query algorithm, in the target metric data to obtain topology call metric data corresponding to each target call relationship; and determining all edges, nodes, and edge metrics based on all target call relationships and their corresponding topology call metric data to construct a target topology graph.

[0089] In some embodiments, a topology graph generally consists of nodes and edges. Each node generally represents an application, and the attributes of the node may include the service name, instance status, response time, number of errors, and number of calls of the application, etc. The edge represents the call relationship between applications, and the metrics on the edge may include average response time, throughput, and number of calls, etc. The preset search algorithms include the DFS algorithm and the BFS algorithm. For all the target link hash values queried, the target call relationships are restored through algorithms such as DFS or BFS, thereby determining all the nodes and all the edges of the application call topology. And with the target time period and the target link hash value as conditions, the target metric data corresponding to the target call relationship is aggregated and queried from the preset topology call metric table, and thus the metrics of all the edges of the full-link application call topology can be determined. The target topology graph is constructed from all the nodes, all the edges, and all the edge metrics determined above. The target topology graph only includes the application topology call relationships associated with the central node and the call metric data is accurate.

[0090] The method for generating the application topology call relationship of the present invention can efficiently restore and analyze the application topology call relationship related to the central node and use it for applications such as visualization, performance analysis, or anomaly detection.

[0091] In some embodiments, the step of querying target topology hash values that match the central node and the target time period based on a preset topology relationship table includes: querying, according to the central node identifier of the central node, in the preset topology relationship table all first topology relationship data whose initiating node identifier field value or receiving node identifier field value matches the central node identifier and whose time field value meets the target time period; de-duplicating the topology hash field values in all the first topology relationship data, and determining the target topology hash value based on the processing result.

[0092] In some embodiments, the step of determining a number of target link hash values based on the target topology hash value includes: querying in the preset topology relationship table all second topology relationship data whose topology hash field value matches the target topology hash value; and respectively taking the link hash field value in each second topology relationship data as a target link hash value.

[0093] In some embodiments, such asFigure 5 Taking Table 1 and Table 2 as examples, with node C as the central node, when the target time period is defined by "ts >= 1736153640" and "ts <= 1736153700", each row of data in Table 1 where the ts field value (i.e., the time field value) is within the target time period and the from_appid field value is 'C' or the to_appid field value is 'C' is used as a first topological relationship data respectively. Obtain the topo_hash field values of all the retrieved first topological relationship data and remove duplicates from all the topo_hash field values, and the target topological hash values corresponding to node C are obtained as "bf79a01a19c05f322ce07ecb863ba2772d59d6cd", "7eb592dfcfbd5769abaf2f051d609d1bf003a4b4", and "28806b3e735dbbbaa92e7037501036653a76f376". Taking the target topological hash values and the target time period as conditions, each row of data in Table 1 where the topo_hash field value is the target topological hash value and the ts field value is within the target time period is used as a second topological relationship data respectively, and obtain the link_hash field values of all the retrieved second topological relationship data to obtain all the target link hash values.

[0094] The method for generating the application topology call relationship of the present invention, for the full-link application call topology in the operation and maintenance industry, when querying, it judges whether each call relationship in the call transaction is related to the central node through topo_hash, so as to exclude the call relationship data that has no association with the central node, and obtain the metric data stored in the edges of the relevant call relationships through link_hash, generating a topology graph including the correct application topology relationship and its metric data, reducing the resource consumption during querying and improving the query efficiency.

[0095] In some embodiments, the method for generating the application topology call relationship further includes: taking the application node to be queried input by the user as the central node corresponding to the topology query request, and the time period to be queried as the target time period corresponding to the topology query request.

[0096] In some embodiments, such as Figure 8The figure shows a schematic diagram of an embodiment of the generation process of the application topology call relationship provided by the present invention. The application topology data processing system processes the request data sent by the probe, and pre-splits and stores the topology nodes and their call relationships and the service request call data into a preset topology relationship table and a preset topology call index table, and associates the two data tables by generating topo_hash and link_hash. The application topology query system receives a topology query request with the central node and the target time period as conditions, and accurately queries the topology hash field and the link hash field that match the central node in the preset topology relationship table and the preset topology call index table, so as to determine all target topology call relationships and their target index data that are only related to the central node, and finally restores the query result to the correct topology map. The above process avoids the inefficient query mode of full table scanning in the traditional method, greatly reduces the consumption of computing resources during query, improves the query efficiency and ensures the accuracy of the generated topology relationship data.

[0097] Based on the same inventive concept, according to another aspect of the present invention, as Figure 9 shown, the embodiment of the present invention further provides a system for generating an application topology call relationship. The system for generating an application topology call relationship includes:

[0098] An acquisition unit 110, configured to acquire the central node and the target time period corresponding to the topology query request in response to receiving the topology query request;

[0099] A first query unit 120, configured to query the target topology hash value that matches the central node and the target time period based on the preset topology relationship table;

[0100] A determination unit 130, configured to determine a plurality of target link hash values based on the target topology hash value;

[0101] A second query unit 140, configured to query the target index data corresponding to each target link hash value based on the preset topology call index table;

[0102] A generation unit 150, configured to generate a target topology map including the target call relationship based on all the target link hash values and their corresponding target index data.

[0103] The generation system of the application topology call relationship of the present invention pre-stores topology nodes and their call relationships and service request call data separately into a preset topology relationship table and a preset topology call index table, and associates the two data tables through a topology hash field and a link hash field, avoiding full storage of service request data. In the topology call relationship query stage, according to the central node and time period, the target topology hash value matching the central node is first queried through the preset topology relationship table, narrowing the query range, improving the query throughput, and determining the target link hash value corresponding to the target call relationship related to the central node according to the target topology hash value. Then, according to the target link hash value, the target index data corresponding to each target call relationship is quickly queried in the preset topology call index table. The topology hash field and the link hash field are used to accurately match the topology call relationship and index data, reducing the number of database scans and avoiding the inefficient query mode of full table scan in the traditional method. The above solution optimizes the storage structure of topology relationship data and improves the query method of topology relationship data to reduce computing resource consumption, improve query efficiency, and ensure the accuracy of the generated topology relationship data.

[0104] Based on the same inventive concept, according to another aspect of the present invention, as Figure 10 shown, an embodiment of the present invention further provides a computer device 30. In this computer device 30, a processor 310 and a memory 320 are included. The memory 320 stores a computer program 321 that can run on the processor. When the processor 310 executes the program, it executes the steps of the above method.

[0105] Finally, it should be noted that those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the storage medium of the program can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc. The embodiments of the above computer program can achieve the same or similar effects as the corresponding foregoing method embodiments.

[0106] Those skilled in the art will also understand that the various exemplary logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, the functions of the various illustrative components, blocks, modules, circuits, and steps have been described generally. Whether this function is implemented as software or hardware depends on the particular application and the design constraints imposed on the overall system. The functions that can be implemented by those skilled in the art in various ways for each specific application, but such implementation decisions should not be construed as causing a departure from the scope of the disclosure of the embodiments of the present invention.

[0107] The above are the exemplary embodiments disclosed by the present invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the disclosure of the embodiments of the present invention as defined by the claims. The functions, steps, and / or actions of the method claims according to the disclosed embodiments herein need not be performed in any particular order. The above serial numbers of the disclosed embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments. In addition, although the elements disclosed in the embodiments of the present invention can be described or claimed in an individual form, they can also be understood as plural unless clearly limited to the singular.

[0108] It should be understood that, as used herein, unless the context clearly supports exceptions, the singular form "a" is also intended to include the plural form. It should also be understood that the "and / or" used herein refers to any and all possible combinations of one or more of the associated listed items.

[0109] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features between the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included within the protection scope of the embodiments of the present invention.

Claims

1. A method for generating an application topology calling relationship, characterized in that: include: In response to receiving a topology query request, obtaining a central node and a target time period corresponding to the topology query request; Based on a preset topology relationship table, query a target topology hash value that matches the central node and the target time period; Based on the target topology hash value, determining a number of target link hash values; Based on the preset topology calling indicator table, querying the target indicator data corresponding to each of the target link hash values; Based on all the target link hash values ​​and the corresponding target indicator data, a target topology graph including target call relationships is generated; Constructing the preset topology relationship table and the preset topology call index table includes: Based on all request data corresponding to the tracking identifier, obtain all call pairs and the indicator data corresponding to each of the call pairs; Construct a first call relationship array according to all the call pairs, perform topological sorting on the first call relationship array to obtain a target call relationship array, determine a first topological hash value based on the target call relationship array, and determine a plurality of first link hash values ​​based on all the call pairs and the first topological hash value; The preset topology relationship table is constructed based on the first topology hash value, all the first link hash values ​​and all the call pairs, and the preset topology call index table is constructed based on the first topology hash value, all the first link hash values ​​and all the index data.

2. The method for generating application topology call relations according to claim 1, characterized in that: Based on all request data corresponding to the tracking identifier, all call pairs and the indicator data corresponding to each of the call pairs are obtained, including: In response to receiving a number of request data sent by the probe, for each of the request data, using the corresponding tracking identifier as a key field and the request data as a value field, the request data is stored in the first cache, and a preset timer corresponding to the tracking identifier is triggered; In response to the first cache receiving the tracking identifier, checking based on the preset timer whether all the request data corresponding to the tracking identifier are all cached; In response to all the corresponding request data being cached, all the call pairs and the indicator data corresponding to each of the call pairs are obtained based on all the corresponding request data.

3. The method for generating application topology call relations according to claim 1, characterized in that: The step of performing topological sorting on the first call relation array to obtain a target call relation array, and determining a first topological hash value based on the target call relation array comprises: Performing topological sorting on all the call pairs in the first call relationship array to obtain a target call relationship array containing a plurality of first node identifiers; Obtaining a seed value corresponding to the target call relation array, and initializing a preset hash algorithm based on the seed value; Based on the initialized preset hash algorithm, each of the first node identifiers in the target call relationship array is converted into an integer to obtain an integer array; The integer array is converted based on a preset function to obtain the first topological hash value.

4. The method for generating application topology call relations according to claim 3, characterized in that: The step of determining a plurality of first link hash values ​​based on all the call pairs and the first topology hash value comprises: Based on each of the call pairs in the first call relationship array, obtaining an initiating node identifier and a receiving node identifier included therein; Based on the initialized preset hash algorithm, convert the first topology hash value to obtain a first integer, convert the initiating node identifier to obtain a second integer, and convert the receiving node identifier to obtain a third integer; An array including the first integer, the second integer, and the third integer is converted based on a preset function to obtain a first link hash value.

5. The method for generating application topology call relations according to claim 1, characterized in that: The step of generating a target topology graph including a target call relationship based on all the target link hash values ​​and the corresponding target indicator data includes: Based on a preset search algorithm, all the target link hash values ​​are restored to obtain a number of the target call relationships; Based on the aggregation query algorithm, query the target indicator data to obtain the topology call indicator data corresponding to each target call relationship; Based on all the target call relationships and their corresponding topology call index data, the indexes of all edges, nodes and edges are determined to construct the target topology graph.

6. The method for generating application topology call relations according to claim 1, characterized in that: The step of querying the target topology hash value matching the central node and the target time period based on the preset topology relationship table includes: According to the central node identifier of the central node, query the preset topological relationship table for all first topological relationship data whose initiating node identifier field value or receiving node identifier field value matches the central node identifier and whose time field value satisfies the target time period; The topology hash field values ​​in all the first topology relationship data are deduplicated, and the target topology hash value is determined based on the processing result.

7. The method for generating application topology call relations according to claim 1, characterized in that: The step of determining a plurality of target link hash values ​​based on the target topology hash value comprises: Searching the preset topology relationship table for all second topology relationship data whose topology hash field value matches the target topology hash value; The link hash field value in each of the second topology relationship data is used as a target link hash value.

8. The method for generating application topology call relations according to claim 1, characterized in that: Also includes: The application node to be queried input by the user is used as the central node corresponding to the topology query request, and the time period to be queried is used as the target time period corresponding to the topology query request.

9. A system for generating application topology call relations, characterized in that: include: an acquisition unit, configured to, in response to receiving a topology query request, acquire a central node and a target time period corresponding to the topology query request; A first query unit, configured to query a target topology hash value matching the central node and the target time period based on a preset topology relationship table; A determination unit configured to determine a number of target link hash values ​​based on the target topology hash value; A second query unit is configured to call the indicator table based on a preset topology to query the target indicator data corresponding to each of the target link hash values; A generating unit configured to generate a target topology graph including a target call relationship based on all the target link hash values ​​and the corresponding target indicator data; It also includes an application topology data processing unit configured to: obtain all call pairs and the indicator data corresponding to each of the call pairs based on all request data corresponding to the tracking identifier; construct a first call relationship array based on all the call pairs, perform topological sorting on the first call relationship array to obtain a target call relationship array, determine a first topology hash value based on the target call relationship array, and determine a plurality of first link hash values ​​based on all the call pairs and the first topology hash value; The preset topology relationship table is constructed based on the first topology hash value, all the first link hash values ​​and all the call pairs, and the preset topology call index table is constructed based on the first topology hash value, all the first link hash values ​​and all the index data.

10. A computer device comprising: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 8 when executing the program.

Citation Information

Patent Citations

  • Topological node change tracking method, system and equipment

    CN119271849A