Call chain visualization method and device, electronic equipment and storage medium
By generating a 3D visualization model in the call chain and collecting and mapping the performance metrics of the calling units, the problem of the effectiveness and comprehensiveness of call chain visualization is solved, enabling more intuitive performance analysis and problem localization, and improving the monitoring and optimization efficiency of distributed systems.
Patent Information
- Application Number
- CN202511531693.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-02-24
AI Technical Summary
In existing technologies, the effectiveness and comprehensiveness of call chain visualization are poor, and traditional two-dimensional tree diagrams cannot provide effective reference data for performance analysis and problem localization.
By collecting description information of each call unit in the call chain, calculating multiple performance indicators, and mapping them into a three-dimensional graphic in a three-dimensional coordinate system, a three-dimensional visualization model of the call chain is generated, including call time, call depth, and call concurrency parameters, supporting mouse interaction and view transformation.
It achieves integrated display of multi-dimensional performance indicators, improves the effectiveness and comprehensiveness of call chain visualization, provides more intuitive reference data for distributed system analysis, and improves the efficiency of performance monitoring and problem localization.
Smart Images

Figure CN121560732A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network technology, and in particular to a method, apparatus, electronic device, and storage medium for visualizing call chains. Background Technology
[0002] A distributed system is a system in which multiple computers (nodes) are connected through a network to collaboratively complete tasks. In a distributed system, a user request may be processed by multiple calling units, and the call chain is used to record the complete path of the request. The call chain is a "diagnostic tool" for distributed systems, solving the operational complexity caused by the dispersion of calling units, helping developers understand request flow, optimize performance, and ensure stability.
[0003] In existing technologies, to facilitate the analysis of call chains, they are typically visualized as tree diagrams to show the call relationships between the various call units contained in the call chain. However, this visualization method can only provide information on the call relationships between call units, thus its effectiveness and comprehensiveness are poor. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, electronic device, and storage medium for visualizing call chains, thereby addressing the problem of poor effectiveness and comprehensiveness in call chain visualization. The specific technical solution is as follows: In a first aspect of this invention, a method for visualizing call chains is provided, comprising: Collect description information for each call unit in the call chain, including the call start time, call end time, identifier of the call unit, and identifier of the parent call unit of the call unit; Based on the description information of the calling unit, multiple performance metrics are calculated for each calling unit, including calling time, calling depth, and calling concurrency parameters; Multiple performance metrics of each calling unit are mapped to three-dimensional graphics of the calling unit in a three-dimensional coordinate system to obtain a three-dimensional visualization model of the calling chain.
[0005] Optionally, calculating multiple performance metrics for each calling unit based on its description information includes: Based on the identifiers of each calling unit and the identifiers of the parent calling unit of each calling unit, a calling tree corresponding to the calling chain is constructed. The nodes in the calling tree represent the calling units, and the edges in the calling tree represent the calling relationships between the calling units. For each calling unit, the level of the calling unit in the calling tree is obtained as the calling depth of the calling unit.
[0006] Optionally, calculating multiple performance metrics for each calling unit based on its description information includes: Based on the identifiers of each calling unit and the identifiers of the parent calling unit of each calling unit, a calling tree corresponding to the calling chain is constructed. The nodes in the calling tree represent the calling units, and the edges in the calling tree represent the calling relationships between the calling units. Starting from the call unit corresponding to the root node of the call tree, the call units are traversed. Based on the identifier of the parent call unit of each call unit, the call start time of each call unit, and the call end time of each call unit, call units belonging to the same parent call unit and having overlapping times are obtained as target call unit groups. Call concurrency parameters are assigned to each target call unit in the target call unit group. The call concurrency parameters refer to the index of the target call unit in the target call unit group.
[0007] Optionally, calculating multiple performance metrics for each calling unit based on its description information includes: For each calling unit, the time difference between the end time and the start time of the calling unit is calculated as the calling time of the calling unit.
[0008] Optionally, the description information further includes the target type of the calling unit, the target type including the calling type and / or the thread pool type; the method further includes: configuring the marking information of the three-dimensional graphic of the calling unit according to the target type of the calling unit, wherein different target types correspond to different marking information.
[0009] Optionally, the method further includes: during the process of displaying a three-dimensional visualization model of the call chain, in response to a mouse hover event, determining the call unit to be processed corresponding to the mouse hover event; and displaying descriptive information and / or multiple performance indicators of the call unit to be processed in a three-dimensional graphic.
[0010] Optionally, the method further includes: during the process of displaying the three-dimensional visualization model of the call chain, in response to a mouse interaction event, obtaining the view transformation parameters corresponding to the mouse interaction event; and performing a view transformation on the three-dimensional visualization model according to the view transformation parameters, wherein the view transformation includes view rotation, view scaling, or view translation.
[0011] In a second aspect of the invention, a call chain visualization device is also provided, comprising: The acquisition module is used to acquire the description information of each call unit contained in the call chain. The description information includes the call start time of the call unit, the call end time of the call unit, the identifier of the call unit, and the identifier of the parent call unit of the call unit. The calculation module is used to calculate multiple performance indicators for each calling unit based on the description information of the calling unit. The multiple performance indicators include calling time, calling depth, and calling concurrency parameters. The mapping module is used to map multiple performance indicators of each calling unit into a three-dimensional solid graphic of the calling unit in a three-dimensional coordinate system, thereby obtaining a three-dimensional visualization model of the calling chain.
[0012] Optionally, the computing module includes: The first calculation unit is used to construct a call tree corresponding to the call chain based on the identifier of each of the calling units and the identifier of the parent calling unit of each of the calling units. The nodes in the call tree represent the calling units, and the edges in the call tree represent the call relationships between the calling units. For each calling unit, the level of the calling unit in the call tree is obtained as the call depth of the calling unit.
[0013] Optionally, the computing module includes: The second calculation unit is used to construct a call tree corresponding to the call chain based on the identifier of each calling unit and the identifier of the parent calling unit of each calling unit. The nodes in the call tree represent the calling units, and the edges in the call tree represent the call relationships between the calling units. Starting from the calling unit corresponding to the root node of the call tree, the unit is traversed. Based on the identifier of the parent calling unit of each calling unit, the call start time of each calling unit, and the call end time of each calling unit, the calling units belonging to the same parent calling unit and having overlapping times are obtained as target calling unit groups. Call concurrency parameters are assigned to each target calling unit in the target calling unit group. The call concurrency parameters refer to the index of the target calling unit in the target calling unit group.
[0014] Optionally, the computing module includes: The third calculation unit is used to calculate the time difference between the end time of the call and the start time of the call for each call unit, and use this difference as the call time of the call unit.
[0015] Optionally, the description information further includes the target type of the calling unit, the target type including the calling type and / or the thread pool type; the device further includes: a visualization module, used to configure the marking information of the three-dimensional graphic of the calling unit according to the target type of the calling unit, wherein different target types correspond to different marking information.
[0016] Optionally, the device further includes: a first interaction module, configured to, in response to a mouse hover event, determine the call unit to be processed corresponding to the mouse hover event during the process of displaying the three-dimensional visualization model of the call chain; and display the description information and / or multiple performance indicators of the call unit to be processed for the three-dimensional graphic of the call unit to be processed.
[0017] Optionally, the device further includes: a second interaction module, configured to, in the process of displaying the three-dimensional visualization model of the call chain, respond to a mouse interaction event, obtain view transformation parameters corresponding to the mouse interaction event; and perform view transformation on the three-dimensional visualization model according to the view transformation parameters, wherein the view transformation includes view rotation, view scaling, or view translation.
[0018] In another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor, when executing the computer programs stored in the memory, implements any of the call chain visualization methods described above.
[0019] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and when the computer program is run on a computer, the computer implements any of the call chain visualization methods described above.
[0020] In another aspect of the present invention, a computer program product is also provided, wherein the computer program product stores a computer program that, when the computer program is run on a computer, causes the computer to implement any of the call chain visualization methods described above.
[0021] The call chain visualization method, apparatus, electronic device, and storage medium provided in this invention collect descriptive information of each call unit in the call chain. This descriptive information includes the call start time, call end time, identifier of the call unit, and identifier of its parent call unit. Based on the descriptive information, multiple performance metrics for each call unit are calculated. These performance metrics include call duration, call depth, and call concurrency parameters. These performance metrics are then mapped to a three-dimensional graphic of the call unit. Based on these three-dimensional graphics, a three-dimensional visualization model of the call chain is generated. Therefore, by introducing a three-dimensional visualization model and mapping multiple performance metrics of each call unit in the call chain to a three-dimensional graphic, this invention achieves an integrated display of multi-dimensional performance metrics, improving the effectiveness and comprehensiveness of call chain visualization. This provides more intuitive reference data for the analysis of distributed systems. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0023] Figure 1 This is a flowchart illustrating the steps of a call chain visualization method in an embodiment of the present invention.
[0024] Figure 2 This is a schematic diagram of a three-dimensional visualization model in an embodiment of the present invention.
[0025] Figure 3 This is a structural block diagram of a call chain visualization device according to an embodiment of the present invention.
[0026] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0027] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0028] The call chain visualization method in this invention can be applied to distributed systems, such as microservice architectures and cloud-native systems, to overcome the limitations of traditional two-dimensional tree diagram visualization methods, which can only display the call relationships between various call units within the call chain. This limitation prevents the provision of effective reference data for performance analysis and problem localization, making it difficult to identify bottlenecks, resource contention, and hierarchical relationships within the call chain. The call chain visualization method in this invention introduces three-dimensional spatial modeling, mapping multiple performance indicators of call units to different axes of a three-dimensional coordinate system, achieving a comprehensive and intuitive data display and significantly improving the efficiency of problem localization and performance analysis. This is described in detail below.
[0029] First, the technical terms involved in the embodiments of the present invention will be explained.
[0030] A call chain is the overall link between multiple calling units in a distributed system. It can be understood as a complete "set of call paths". For example, after a user initiates a request, the request is processed by multiple calling units, and the overall chain of calls between these units is a call chain.
[0031] Call unit: It is the smallest independent execution unit in the call chain and is a basic component of the call chain.
[0032] Thread pool: A tool for managing and scheduling thread resources. It is responsible for allocating thread resources for the execution of calling units, controlling the number of concurrently executing threads, and avoiding resource exhaustion.
[0033] Figure 1 This is a flowchart illustrating the steps of a call chain visualization method in an embodiment of the present invention.
[0034] like Figure 1 As shown, calling the chain visualization method may include the following steps: Step 101: Collect the description information of each calling unit in the call chain. The description information includes the call start time of the calling unit, the call end time of the calling unit, the identifier of the calling unit, and the identifier of the parent calling unit of the calling unit.
[0035] In this embodiment of the invention, any suitable information collection component can be deployed in the system to automatically collect raw link data. Furthermore, the collected raw link data can be preprocessed, such as cleansing and noise reduction, to obtain valid raw link data. This processed and valid raw link data is then stored for subsequent querying.
[0036] For example, the information collection component may include, but is not limited to, the SkyWalking component, the Zipkin component, and so on.
[0037] For example, the raw link data may include descriptive information for each calling unit. This descriptive information may include, but is not limited to: the identifier of the calling chain to which the calling unit belongs, the identifier of the calling unit, the identifier of the parent calling unit, the call start time, the call end time, the target type of the calling unit, etc. The target type may include, but is not limited to, the call type (which may include normal call, thread pool call, etc.), the thread pool type, etc.
[0038] In this embodiment of the invention, when call chain visualization is required, for any call chain, the description information of each call unit contained in the call chain can be collected from the stored original link data. For example, each call unit contained in the call chain can be selected based on the identifier of the call chain to which each call unit belongs in the original link data, thereby obtaining the description information of each call unit contained in the call chain.
[0039] Step 102: Calculate multiple performance metrics for each calling unit based on the description information of the calling unit. The multiple performance metrics include calling time, calling depth, and calling concurrency parameters.
[0040] In this embodiment of the invention, by analyzing the description information of each calling unit contained in the calling chain, multiple performance indicators of each calling unit in the calling chain can be calculated.
[0041] For example, the performance metrics of the calling unit may include, but are not limited to, call duration, call depth, and call concurrency parameters. Call duration refers to the execution time of the calling unit from start to finish, directly reflecting its execution efficiency and performance. Call depth refers to the level of the calling unit in the call chain; a higher call depth indicates a lower position in the call chain. Call depth also reflects the complexity of the call chain, providing a reference for system performance analysis and optimization. Call concurrency parameters refer to the index of the target calling unit in the target calling unit group, used to distinguish different target calling units within the same group. This allows for visual differentiation of different target calling units within the same group in the subsequent 3D visualization model, avoiding overlap. Furthermore, the difference between the maximum and minimum values of the call concurrency parameters of the target calling units in the target calling unit group reflects the concurrent call situation of calling units at the same level.
[0042] Of course, the performance metrics may also include service quality metrics, upstream and downstream dependencies, and so on.
[0043] In one optional implementation, the process of calculating multiple performance metrics for each calling unit based on its description information, regarding the call duration, may include: for each calling unit, calculating the time difference between the call end time and the call start time of that calling unit, as the call duration of that calling unit. In this approach, the call duration of the calling unit can be obtained simply by calculating the time difference.
[0044] In one optional implementation, the process of calculating multiple performance metrics for each calling unit based on the description information of the calling unit, with respect to the calling depth, may include: constructing a calling tree corresponding to the calling chain based on the identifier of each calling unit and the identifier of the parent calling unit of each calling unit, wherein nodes in the calling tree represent calling units and edges in the calling tree represent calling relationships between calling units; and for each calling unit, obtaining the level of the calling unit in the calling tree as the calling depth of the calling unit.
[0045] For the call chain, based on the identifiers of each call unit and the identifiers of the parent call units contained in the call chain, each call unit is treated as a node, the call relationships between call units are treated as edges between nodes, and each call unit is connected to its parent call unit with edges, thereby constructing the call tree corresponding to the call chain.
[0046] After obtaining the call tree corresponding to the call chain, starting from the root node of the call tree, the level of each call unit in the call tree is obtained as the call depth of the call unit. For example, the call depth of the root node can be set to 0, the call depth of the child node can be set to the call depth of its parent node plus 1, and so on.
[0047] In one optional implementation, the process of calculating multiple performance metrics for each calling unit based on the description information of the calling unit, for the call concurrency parameters, may include: constructing a call tree corresponding to the call chain based on the identifier of each calling unit and the identifier of the parent calling unit of each calling unit, wherein the nodes in the call tree represent the calling units and the edges in the call tree represent the call relationships between the calling units; traversing from the calling unit corresponding to the root node of the call tree, and based on the identifier of the parent calling unit of each calling unit, the call start time of each calling unit, and the call end time of each calling unit, obtaining calling units belonging to the same parent calling unit and having overlapping times as target calling unit groups, and allocating call concurrency parameters to each target calling unit in the target calling unit group.
[0048] For example, during the process of allocating concurrency parameters for each target call unit in the target call unit group, the call concurrency parameters of the parent call unit of the target call unit group can be obtained. Based on the call concurrency parameters of the parent call unit, the call concurrency parameters of the first target call unit are set to be equal to the call concurrency parameters of the parent call unit, and the call concurrency parameters of the remaining target call units are sequentially increased according to a set span. There is no restriction on the order of the target call units.
[0049] For example, if the concurrency span is 1, and calling units A1, A2, and A3 all belong to parent calling unit A, and calling units A1, A2, and A3 belong to the calling unit group under parent calling unit A, and the concurrency parameter of parent calling unit A is 0, then the concurrency parameter of calling unit A1 is 0, the concurrency parameter of calling unit A2 is 1, and the concurrency parameter of calling unit A3 is 2.
[0050] For example, during the process of allocating concurrency parameters for each target call unit in the target call unit group, the call concurrency parameters of the parent call unit of the target call unit group can be obtained, and based on the call concurrency parameters of the parent call unit, the call concurrency parameters of each target call unit can be set to increase sequentially according to a set span. There is no restriction on the order of the target call units.
[0051] For example, if the span of the concurrent parameters is 1, and calling units A1, A2, and A3 all belong to the parent calling unit A, and calling units A1, A2, and A3 belong to the calling unit group under the parent calling unit A, and the concurrent parameters of the parent calling unit A are 1, then the concurrent parameters of calling unit A1 are 1, the concurrent parameters of calling unit A2 are 2, and the concurrent parameters of calling unit A3 are 3.
[0052] In this embodiment of the invention, a dynamic calculation algorithm for concurrency parameters is used. The time window and depth-first search algorithm are used to analyze the time overlap of calling units at the same level, so as to calculate the accuracy of concurrent operations in real time. This improves the accuracy of the expression of concurrency parameters, enabling users to more intuitively identify potential performance bottlenecks and optimization points in the system.
[0053] Step 103: Map the multiple performance indicators of each calling unit into a three-dimensional solid figure of the calling unit in a three-dimensional coordinate system to obtain a three-dimensional visualization model of the calling chain.
[0054] In this embodiment of the invention, after obtaining multiple performance indicators of each call unit contained in the call chain, the multiple performance indicators of the call unit can be mapped into a three-dimensional solid figure of the call unit in a three-dimensional coordinate system for each call unit. The three-dimensional solid figures of all call units contained in the call chain constitute the three-dimensional visualization model of the call chain.
[0055] In this embodiment of the invention, any applicable 3D visualization model rendering tool can be used to map multiple performance indicators of each calling unit into a 3D solid graphic of the calling unit in a 3D coordinate system, thereby obtaining a 3D visualization model of the calling chain.
[0056] For example, a 3D scene can be created using the Axes3D toolkit of matplotlib, coordinate axis labels and ranges can be set, and then multiple performance metrics of each calling unit can be rendered and mapped to the 3D solid graphics of the calling unit in a 3D coordinate system to obtain a 3D visualization model of the calling chain.
[0057] For example, when the multiple performance metrics of the calling unit include calling time, calling concurrency parameters and calling depth, the calling time can be mapped to the X-axis in a three-dimensional coordinate system, the calling concurrency parameters can be mapped to the Y-axis in a three-dimensional coordinate system, and the calling depth can be mapped to the Z-axis in a three-dimensional coordinate system.
[0058] For example, the start time of the first executed call unit is normalized to 0 and used as its value on the X-axis. The start times of other call units are normalized to their corresponding values based on the time difference between them and the start time of the first executed call unit, and used as their values on the X-axis. For instance, if the start time of the first executed call unit is 10:00:52:110 and the start time of another call unit is 10:00:52:120, then the X-axis value of the first executed call unit is 0ms, and the X-axis value of the other call unit is 10ms. The concurrency parameters of each call unit are used as its value on the Y-axis. The call depth of each call unit is used as its value on the Z-axis.
[0059] For each calling unit, obtain the coordinate point corresponding to the X-axis value, Y-axis value, and Z-axis value of the calling unit in the three-dimensional coordinate system. Take this coordinate point as the lower left corner of the calling unit. Take the calling time of the calling unit as the length of the calling unit on the X-axis. Set the length of the calling unit on the Y-axis and the length of the calling unit on the Z-axis to preset values, which are greater than 0 and less than 1.
[0060] Figure 2 This is a schematic diagram of a three-dimensional visualization model according to an embodiment of the present invention. Figure 2 As shown, in the three-dimensional coordinate system, the X-axis represents the call time, the Y-axis represents the call concurrency parameter, and the Z-axis represents the call depth. Each call unit is mapped to a three-dimensional solid figure, thus mapping the entire call chain to the three-dimensional coordinate system.
[0061] In this embodiment of the invention, by introducing a three-dimensional visualization model, multiple performance indicators of each calling unit in the call chain are mapped into three-dimensional graphics, realizing the integrated display of multi-dimensional performance indicators, improving the effectiveness and comprehensiveness of call chain visualization, and thus providing more intuitive reference data for the analysis of distributed systems.
[0062] In one optional implementation, after mapping multiple performance metrics of each calling unit to a three-dimensional graphic of the calling unit in a three-dimensional coordinate system to obtain a three-dimensional visualization model of the call chain, the labeling information of the three-dimensional graphic of the calling unit can be configured according to the target type of the calling unit, wherein different target types correspond to different labeling information. In this method, by configuring different labeling information for different target types, the different target types of calling units can be distinguished more intuitively, enhancing the visualization differentiation. Users can quickly identify specific types of calls through the labeling information, thereby accelerating understanding and decision-making and optimizing system debugging efficiency.
[0063] For example, the process of configuring the tagging information of the three-dimensional graphic of the calling unit according to the target type of the calling unit may include configuring the tagging information of the three-dimensional graphic of the calling unit according to the target type of the calling unit based on pre-set first configuration information. The first configuration information may include the correspondence between target types and tagging information, that is, which target type needs to be configured with which tagging information.
[0064] For example, the process of configuring the marking information of the three-dimensional graphics of the calling unit according to the target type of the calling unit may include, in response to a configuration instruction triggered by a user, configuring the marking information of the three-dimensional graphics of the calling unit according to the target type of the calling unit based on second configuration information contained in the configuration instruction. The second configuration information may include a correspondence between target types and marking information, i.e., which target types require which marking information to be configured. The system can provide a user interface through which the user can configure the correspondence between target types and marking information and trigger configuration instructions through configuration buttons in the user interface.
[0065] For example, the marking information may include, but is not limited to, color marking information, text marking information, and so on.
[0066] For example, matplotlib's cm (Colormap) toolkit can be used to assign different colors to different target types, thereby enhancing the visual differentiation.
[0067] In one optional implementation, after mapping multiple performance metrics of each calling unit to a 3D graphic of the calling unit in a 3D coordinate system to obtain a 3D visualization model of the call chain, interactive functions can be added to the 3D graphic of the calling unit by calling interactive functions. This approach utilizes matplotlib 3D rendering technology to achieve interactive visualization, providing an intuitive user interaction method that allows users to explore the details of the call chain in depth, thereby optimizing problem localization and resolution processes.
[0068] For example, the interactive functions may include, but are not limited to, hovering to display details, view transformation, etc., and the view transformation may include view rotation, view scaling, view panning, etc.
[0069] For example, during the process of displaying the three-dimensional visualization model of the call chain, in response to a mouse hover event, the call unit to be processed corresponding to the mouse hover event is determined; for the three-dimensional graphic of the call unit to be processed, the description information and / or multiple performance indicators of the call unit to be processed are displayed.
[0070] For example, the system listens for mouse events in real time. When the user hovers the mouse cursor over the 3D graphic of any calling unit, the system can listen for the mouse hover event and then call the on_hover function to query the calling unit corresponding to the 3D graphic where the mouse is hovering as the calling unit to be processed, obtain the description information and / or multiple performance indicators and other detailed information of the calling unit to be processed, and display the detailed information next to the 3D graphic of the calling unit to be processed.
[0071] For example, during the process of displaying the 3D visualization model of the call chain, in response to a mouse interaction event, the view transformation parameters corresponding to the mouse interaction event are obtained; and the view transformation is performed on the 3D visualization model according to the view transformation parameters, wherein the view transformation includes view rotation, view scaling, or view translation.
[0072] For example, the system listens for mouse events in real time. When a user operates the mouse (such as pressing, moving, scrolling, etc.), the system can listen for mouse interaction events and obtain the view transformation parameters corresponding to the mouse interaction events (such as rotation direction and rotation angle, scaling type and scaling factor, translation direction and translation distance, etc.). Then, it calls the transformation control function to perform view transformation on the 3D visualization model according to the view transformation parameters.
[0073] The call chain visualization method in this embodiment of the invention can achieve the following effects: Enhanced performance monitoring capabilities: 3D visualization technology allows for intuitive monitoring of performance bottlenecks and abnormal behaviors in distributed systems. This multi-dimensional analytical capability significantly improves the efficiency of identifying and resolving performance issues.
[0074] Improve user experience: Faster detection and resolution of system problems can reduce service interruptions or performance degradation, ensuring a better customer experience when using products or services.
[0075] Support for product optimization: The system provides product development and operations teams with detailed call chains and performance data to help them identify areas for improvement, thereby promoting continuous product optimization and iteration, and improving product quality and competitiveness.
[0076] Reduce maintenance costs: Early detection and resolution of potential problems and shorter troubleshooting time can significantly reduce system maintenance costs and improve resource utilization.
[0077] Figure 3 This is a structural block diagram of a call chain visualization device according to an embodiment of the present invention.
[0078] like Figure 3 As shown, the call chain visualization device may include the following modules: The acquisition module 301 is used to acquire the description information of each call unit contained in the call chain. The description information includes the call start time of the call unit, the call end time of the call unit, the identifier of the call unit, and the identifier of the parent call unit of the call unit. The calculation module 302 is used to calculate multiple performance indicators for each of the calling units based on the description information of the calling units. The multiple performance indicators include call time, call depth and call concurrency parameters. The mapping module 303 is used to map multiple performance indicators of each calling unit into a three-dimensional solid graphic of the calling unit in a three-dimensional coordinate system, so as to obtain a three-dimensional visualization model of the calling chain.
[0079] Optionally, the computing module 302 includes: The first calculation unit is used to construct a call tree corresponding to the call chain based on the identifier of each of the calling units and the identifier of the parent calling unit of each of the calling units. The nodes in the call tree represent the calling units, and the edges in the call tree represent the call relationships between the calling units. For each calling unit, the level of the calling unit in the call tree is obtained as the call depth of the calling unit.
[0080] Optionally, the computing module 302 includes: The second calculation unit is used to construct a call tree corresponding to the call chain based on the identifier of each calling unit and the identifier of the parent calling unit of each calling unit. The nodes in the call tree represent the calling units, and the edges in the call tree represent the call relationships between the calling units. Starting from the calling unit corresponding to the root node of the call tree, the unit is traversed. Based on the identifier of the parent calling unit of each calling unit, the call start time of each calling unit, and the call end time of each calling unit, the calling units belonging to the same parent calling unit and having overlapping times are obtained as target calling unit groups. Call concurrency parameters are assigned to each target calling unit in the target calling unit group. The call concurrency parameters refer to the index of the target calling unit in the target calling unit group.
[0081] Optionally, the computing module 302 includes: The third calculation unit is used to calculate the time difference between the end time of the call and the start time of the call for each call unit, and use this difference as the call time of the call unit.
[0082] Optionally, the description information further includes the target type of the calling unit, the target type including the calling type and / or the thread pool type; the device further includes: a visualization module, used to configure the marking information of the three-dimensional graphic of the calling unit according to the target type of the calling unit, wherein different target types correspond to different marking information.
[0083] Optionally, the device further includes: a first interaction module, configured to, in response to a mouse hover event, determine the call unit to be processed corresponding to the mouse hover event during the process of displaying the three-dimensional visualization model of the call chain; and display the description information and / or multiple performance indicators of the call unit to be processed for the three-dimensional graphic of the call unit to be processed.
[0084] Optionally, the device further includes: a second interaction module, configured to, in the process of displaying the three-dimensional visualization model of the call chain, respond to a mouse interaction event, obtain view transformation parameters corresponding to the mouse interaction event; and perform view transformation on the three-dimensional visualization model according to the view transformation parameters, wherein the view transformation includes view rotation, view scaling, or view translation.
[0085] In this embodiment of the invention, by introducing a three-dimensional visualization model, multiple performance indicators of each calling unit in the call chain are mapped into three-dimensional graphics, realizing the integrated display of multi-dimensional performance indicators, improving the effectiveness and comprehensiveness of call chain visualization, and thus providing more intuitive reference data for the analysis of distributed systems.
[0086] By adopting a modular architecture design, the entire process from data collection to visualization is integrated, which significantly improves the efficiency of performance analysis and problem localization in distributed systems, and provides an intuitive and comprehensive solution. The modular design improves the scalability and maintainability of the system, making the development and optimization of each module more flexible and adaptable to the needs of distributed systems of different scales.
[0087] This invention also provides an electronic device, such as... Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.
[0088] Memory 403 is used to store computer programs; When processor 401 executes the program stored in memory 403, it performs the following steps: Collect description information for each call unit in the call chain, including the call start time, call end time, identifier of the call unit, and identifier of the parent call unit of the call unit; Based on the description information of the calling unit, multiple performance metrics are calculated for each calling unit, including calling time, calling depth, and calling concurrency parameters; Multiple performance metrics of each calling unit are mapped to three-dimensional graphics of the calling unit in a three-dimensional coordinate system to obtain a three-dimensional visualization model of the calling chain.
[0089] Optionally, calculating multiple performance metrics for each calling unit based on its description information includes: Based on the identifiers of each calling unit and the identifiers of the parent calling unit of each calling unit, a calling tree corresponding to the calling chain is constructed. The nodes in the calling tree represent the calling units, and the edges in the calling tree represent the calling relationships between the calling units. For each calling unit, the level of the calling unit in the calling tree is obtained as the calling depth of the calling unit.
[0090] Optionally, calculating multiple performance metrics for each calling unit based on its description information includes: Based on the identifiers of each calling unit and the identifiers of the parent calling unit of each calling unit, a calling tree corresponding to the calling chain is constructed. The nodes in the calling tree represent the calling units, and the edges in the calling tree represent the calling relationships between the calling units. Starting from the call unit corresponding to the root node of the call tree, the call units are traversed. Based on the identifier of the parent call unit of each call unit, the call start time of each call unit, and the call end time of each call unit, call units belonging to the same parent call unit and having overlapping times are obtained as target call unit groups. Call concurrency parameters are assigned to each target call unit in the target call unit group. The call concurrency parameters refer to the index of the target call unit in the target call unit group.
[0091] Optionally, calculating multiple performance metrics for each calling unit based on its description information includes: For each calling unit, the time difference between the end time and the start time of the calling unit is calculated as the calling time of the calling unit.
[0092] Optionally, the description information further includes the target type of the calling unit, the target type including the calling type and / or the thread pool type; the method further includes: configuring the marking information of the three-dimensional graphic of the calling unit according to the target type of the calling unit, wherein different target types correspond to different marking information.
[0093] Optionally, the method further includes: during the process of displaying a three-dimensional visualization model of the call chain, in response to a mouse hover event, determining the call unit to be processed corresponding to the mouse hover event; and displaying descriptive information and / or multiple performance indicators of the call unit to be processed in a three-dimensional graphic.
[0094] Optionally, the method further includes: during the process of displaying the three-dimensional visualization model of the call chain, in response to a mouse interaction event, obtaining the view transformation parameters corresponding to the mouse interaction event; and performing a view transformation on the three-dimensional visualization model according to the view transformation parameters, wherein the view transformation includes view rotation, view scaling, or view translation.
[0095] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0096] The communication interface is used for communication between the aforementioned terminal and other devices.
[0097] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0098] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0099] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program that, when the computer program is run on a computer, causes the computer to implement any of the call chain visualization methods described in the above embodiments.
[0100] In another embodiment of the present invention, a computer program product is also provided, which stores a computer program that, when run on a computer, enables the computer to implement any of the call chain visualization methods described in the above embodiments.
[0101] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0102] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0103] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0104] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for visualizing call chains, characterized in that, include: Collect description information for each call unit in the call chain, including the call start time, call end time, identifier of the call unit, and identifier of the parent call unit of the call unit; Based on the description information of the calling unit, multiple performance metrics are calculated for each calling unit, including calling time, calling depth, and calling concurrency parameters; Multiple performance metrics of each calling unit are mapped to three-dimensional graphics of the calling unit in a three-dimensional coordinate system to obtain a three-dimensional visualization model of the calling chain.
2. The method according to claim 1, characterized in that, The step of calculating multiple performance metrics for each calling unit based on the description information of the calling unit includes: Based on the identifiers of each calling unit and the identifiers of the parent calling unit of each calling unit, a calling tree corresponding to the calling chain is constructed. The nodes in the calling tree represent the calling units, and the edges in the calling tree represent the calling relationships between the calling units. For each calling unit, the level of the calling unit in the calling tree is obtained as the calling depth of the calling unit.
3. The method according to claim 1, characterized in that, The step of calculating multiple performance metrics for each calling unit based on the description information of the calling unit includes: Based on the identifiers of each calling unit and the identifiers of the parent calling unit of each calling unit, a calling tree corresponding to the calling chain is constructed. The nodes in the calling tree represent the calling units, and the edges in the calling tree represent the calling relationships between the calling units. Starting from the call unit corresponding to the root node of the call tree, the call units are traversed. Based on the identifier of the parent call unit of each call unit, the call start time of each call unit, and the call end time of each call unit, call units belonging to the same parent call unit and having overlapping times are obtained as target call unit groups. Call concurrency parameters are assigned to each target call unit in the target call unit group. The call concurrency parameters refer to the index of the target call unit in the target call unit group.
4. The method according to claim 1, characterized in that, The step of calculating multiple performance metrics for each calling unit based on the description information of the calling unit includes: For each calling unit, the time difference between the end time and the start time of the calling unit is calculated as the calling time of the calling unit.
5. The method according to claim 1, characterized in that, The description information also includes the target type of the calling unit, the target type including a calling type and / or a thread pool type; the method further includes: According to the target type of the calling unit, the marking information of the three-dimensional graphic of the calling unit is configured, wherein different target types correspond to different marking information.
6. The method according to claim 1, characterized in that, The method further includes: During the process of displaying the three-dimensional visualization model of the call chain, in response to the mouse hover event, the call unit to be processed corresponding to the mouse hover event is determined; For the three-dimensional graphic of the call unit to be processed, display the description information and / or multiple performance indicators of the call unit to be processed.
7. The method according to claim 1, characterized in that, The method further includes: During the process of displaying the three-dimensional visualization model of the call chain, in response to mouse interaction events, the view transformation parameters corresponding to the mouse interaction events are obtained; The 3D visualization model is subjected to view transformation according to the view transformation parameters, and the view transformation includes view rotation, view scaling, or view translation.
8. A call chain visualization device, characterized in that, include: The acquisition module is used to collect description information of each call unit contained in the call chain; The calculation module is used to calculate multiple performance metrics for each of the calling units based on the description information of the calling units; The mapping module is used to map multiple performance indicators of each calling unit into a three-dimensional solid graphic of the calling unit in a three-dimensional coordinate system, thereby obtaining a three-dimensional visualization model of the calling chain.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a computer program stored in memory, implements the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run on a computer, it causes the computer to perform the method as described in any one of claims 1-7.