Layered topological graph generation method and device, equipment and storage medium
By hierarchically processing and rendering log data, a hierarchical topology diagram is generated, which solves the problem of difficulty in displaying hierarchical structure and topological relationships in log data visualization in the existing technology, improves display and interaction efficiency, and enhances user experience.
Patent Information
- Application Number
- CN202410862168.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing log data visualization methods are difficult to intuitively display hierarchical structures and topological relationships, and the entire image needs to be re-rendered when users interact, resulting in low processing efficiency, long time consumption, inability to quickly respond to user needs, and affecting user experience.
By collecting log data from the business system, storage data is generated based on the identifier information, and the data is processed and rendered hierarchically to generate a hierarchical topology map, which reduces loading time and improves display efficiency. Only the nodes of the corresponding level are re-rendered when the user interacts, not the entire topology map.
It achieves a clear display of the hierarchical relationship of the business system, reduces the loading time and interactive response time, and improves the user experience and processing efficiency.
Smart Images

Figure CN118606097A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for generating a layered topology map. Background Art
[0002] With the rapid development of information technology, various systems and applications generate a large amount of log data. However, due to the complexity and large amount of log data, traditional log analysis methods are often difficult to process effectively. In order to better understand the relationship and structure between log data, a method that can visualize log data is needed.
[0003] At present, there are some log data visualization methods, such as log tables, bar charts, line charts, etc. Although the existing methods can provide some useful information, they cannot intuitively display the hierarchical structure and topological relationship between log data, and when users interact, the entire image needs to be re-rendered, resulting in low processing efficiency and long time consumption, and unable to quickly respond to user needs, resulting in a poor user interaction experience. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for generating a layered topology map, which reduces loading time and improves display efficiency by layering a link topology map according to business fields and rendering topology maps of each layer in parallel.
[0005] According to one aspect of the present invention, a method for generating a hierarchical topology graph is provided, the method comprising:
[0006] Collect log data of each link of the business system, and determine identifier information contained in each log data, wherein the identifier information includes a tracking identifier, a span identifier, and a parent identifier;
[0007] Processing each log data according to the identifier information to generate storage data;
[0008] The stored data is processed in layers to generate each layer of data, and each layer of data is rendered in layers to generate a layered topology diagram of the business system.
[0009] Optionally, collecting log data of each link of the business system includes: determining each link to be collected contained in the business system; using a distributed collection system to allocate a distributed node to each link to be collected; performing data collection based on each distributed node through a collector, and storing the collected data to a first designated address to generate each log data.
[0010] Optionally, each log data is processed according to the identifier information to generate storage data, including: grouping each log data by tracking identifier to generate each log group, wherein the log group contains log data with the same tracking identifier; taking each log group as a target log group; determining the upstream log of the target log group and its corresponding downstream log according to the span identifier and the parent identifier; and generating storage data according to the upstream log and the corresponding downstream log.
[0011] Optionally, the upstream log of the target log group and its corresponding downstream log are determined according to the span identifier and the parent identifier, including: taking the span identifier of each log data in the target log group as the target span identifier respectively; taking the parent identifier in the target log group that is the same as the target span identifier as the target parent identifier; taking the log data corresponding to the target span identifier as the upstream log, and taking the log data corresponding to the target parent identifier as the downstream log corresponding to the upstream log.
[0012] Optionally, storage data is generated based on the upstream log and the corresponding downstream log, including: establishing association relationships between each upstream log and the corresponding downstream log in parallel, and generating each association log based on each association relationship; determining the business field corresponding to each association log; caching each association log according to the business field to generate a cache log, and storing the cache log in a second designated address to generate storage data.
[0013] Optionally, the stored data is processed in layers to generate each layer of data, including: grouping the stored data based on business fields to generate each business group, wherein the business group includes stored data with the same business field; and processing the stored data in layers according to each business group to generate each layer of data.
[0014] Optionally, the method also includes: generating a display page based on the hierarchical topology map; displaying the display page to the user to obtain a control instruction input by the user; determining target hierarchical data corresponding to the control instruction, and processing the target hierarchical data according to the control instruction.
[0015] According to another aspect of the present invention, there is provided a device for generating a layered topology map, the device comprising:
[0016] A log data collection module, used to collect log data of each link of the business system and determine the identifier information contained in each log data, wherein the identifier information includes a tracking identifier, a span identifier and a parent identifier;
[0017] A storage data generation module, used for processing each log data according to the identifier information to generate storage data;
[0018] The layered topology map generation module is used to perform layered processing on the stored data to generate each layer of data, and to perform layered rendering on each layer of data to generate a layered topology map of the business system.
[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0020] at least one processor; and
[0021] a memory communicatively connected to the at least one processor; wherein,
[0022] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a method for generating a layered topology map as described in any embodiment of the present invention.
[0023] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a method for generating a layered topology map as described in any embodiment of the present invention when executed.
[0024] The technical solution of the embodiment of the present invention can accurately identify and associate different log data through the identifier information of the log data, providing a basis for subsequent processing and analysis. By processing the stored data in layers, the hierarchical relationship of the business system can be clearly displayed. By layering the link topology map according to the business field and rendering the topology maps of each layer in parallel, the loading time is reduced and the display efficiency is improved. When the user interacts, only the nodes of the corresponding layer are re-rendered instead of re-rendering the entire topology map, thereby improving the interactive response speed.
[0025] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 is a flowchart of a method for generating a hierarchical topology map provided according to Embodiment 1 of the present invention;
[0028] Figure 2is a flowchart of another method for generating a hierarchical topology map according to the first embodiment of the present invention;
[0029] Figure 3 is a flowchart of another method for generating a hierarchical topology map provided according to the second embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of the structure of a device for generating a layered topology map according to Embodiment 3 of the present invention;
[0031] Figure 5 It is a structural schematic diagram of an electronic device for implementing a layered topology map generating method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] Embodiment 1
[0035] Figure 1 A flowchart of a method for generating a layered topology map is provided for the first embodiment of the present invention. This embodiment is applicable to the case of rendering log data. The method can be executed by a layered topology map generating device. The layered topology map generating device can be implemented in the form of hardware and / or software. The layered topology map generating device can be configured in a computer controller. Figure 1 As shown, the method includes:
[0036] S110 , collecting log data of each link of the business system, and determining identifier information contained in each log data, wherein the identifier information includes a tracking identifier, a span identifier, and a parent identifier.
[0037] Among them, a link refers to a path or channel for the transmission of data or information from one point to another. Log data refers to the record information automatically generated by the business system during operation. The trace identifier refers to the traceid identifier, which is an identification code used to uniquely identify a complete business process or transaction so as to track its execution process in the entire system. The span identifier refers to the spanid identifier, which is an identification code used to identify specific sub-steps or operations in a business process. The parent identifier refers to the parentid identifier, which is used to represent the identification code of the parent element of the current element in a hierarchical structure, and can be used to clarify the hierarchical relationship between elements.
[0038] Optionally, collecting log data of each link of the business system includes: determining each link to be collected contained in the business system; using a distributed collection system to allocate a distributed node to each link to be collected; performing data collection based on each distributed node through a collector, and storing the collected data to a first designated address to generate each log data.
[0039] Specifically, the controller will determine the links to be collected in the business system. Specifically, the business system can be pre-evaluated to identify which links need to collect log data, such as user access links, data processing links, transaction links, etc. Then a distributed collection system is used to allocate distributed nodes to these links. The distributed collection system can reasonably allocate collection tasks to different nodes based on the characteristics of the links, the amount of data, and the requirements of collection.
[0040] Furthermore, the collector will collect data from the corresponding link in real time according to predetermined rules and strategies. The collected data will be timely transmitted and stored in a pre-set first designated address as log data, such as memory 1.
[0041] S120: Process each log data according to the identifier information to generate storage data.
[0042] Among them, stored data refers to data stored in a database or other storage media after being processed and organized.
[0043] Specifically, the controller may process the collected raw log data according to the determined identifier information, and convert the raw log data into storage data that can be subsequently analyzed and used.
[0044] Figure 2A flowchart of a method for generating a layered topology map is provided for the first embodiment of the present invention. Step S120 mainly includes the following steps S121 to S124:
[0045] S121. Grouping each log data by a tracking identifier to generate each log group, wherein the log group contains log data with the same tracking identifier.
[0046] S122. Each log group is used as a target log group.
[0047] Specifically, the controller will classify the log data by tracking identifiers to form different log groups. During classification, log data with the same tracking identifier will be classified into the same log group. That is, the log data in each log group has the same business process tracking identifier. Then the controller will set each generated log group as a target log group. Here, respectively refers to multi-threaded parallel calculation of each target log group.
[0048] It should be noted that multithreaded parallel computing refers to running multiple threads simultaneously in a program, and each thread can independently perform a part of the computing task. When processing log data, the entire computing task is decomposed into multiple subtasks, and each thread is responsible for processing a part of it. Each thread can be executed in parallel on a multi-core processor or multiple CPU cores at the same time, thereby improving computing efficiency. In this embodiment, each thread processes a target log group.
[0049] In a specific implementation, to implement multi-threaded parallel computing of log data, it is necessary to first decompose the log data processing task into multiple relatively independent subtasks. For example, the log data of different tracking identifiers can be divided into different subtasks. Then use the thread creation mechanism provided by the programming language to create multiple threads. For example, in Java, the Thread class or thread pool can be used to create threads. Then the decomposed subtasks are assigned to each thread, and the subtasks can be passed to the thread by the execution function of the thread or the task submission. When each thread completes its own subtask, the processing results of each thread are merged and sorted to obtain the final complete result.
[0050] In summary, processing log data simultaneously through multiple threads can greatly shorten the processing time, especially for large-scale log data sets, which can fully utilize the computing power of multi-core processors and improve the program running speed. In user interface applications, multithreading can perform time-consuming tasks in the background without blocking the main thread and maintaining the responsiveness of the interface. Threads can share memory and resources, and the communication overhead is small.
[0051] S123: Determine the upstream log of the target log group and its corresponding downstream log according to the span identifier and the parent identifier.
[0052] Optionally, the upstream log of the target log group and its corresponding downstream log are determined according to the span identifier and the parent identifier, including: taking the span identifier of each log data in the target log group as the target span identifier respectively; taking the parent identifier in the target log group that is the same as the target span identifier as the target parent identifier; taking the log data corresponding to the target span identifier as the upstream log, and taking the log data corresponding to the target parent identifier as the downstream log corresponding to the upstream log.
[0053] Specifically, the controller will use the span identifier of each log data in the target log group as the target span identifier, and then further filter out the parent identifier that is the same as the target span identifier as the target parent identifier. Finally, the controller will use the log data corresponding to the target span identifier as the upstream log, and the log data corresponding to the target parent identifier as the downstream log corresponding to the upstream log.
[0054] In a specific implementation, the controller extracts log data from the memory 1, and when the same traceid exists, further comparison and analysis will be performed. Specifically, if the spanid value of a log is exactly equal to the parentid value of another log, then it can be determined that there is an upstream and downstream association between the two logs.
[0055] S124. Generate storage data according to the upstream log and the corresponding downstream log.
[0056] Optionally, storage data is generated based on the upstream log and the corresponding downstream log, including: establishing association relationships between each upstream log and the corresponding downstream log in parallel, and generating each association log based on each association relationship; determining the business field corresponding to each association log; caching each association log according to the business field to generate a cache log, and storing the cache log in a second designated address to generate storage data.
[0057] Specifically, the controller will use parallel processing to simultaneously build the association between each upstream log and its corresponding downstream log. That is, the establishment of multiple associations can be carried out at the same time, making full use of the system's multi-core processing capabilities or distributed computing resources, greatly improving processing efficiency.
[0058] Furthermore, the controller determines the business fields corresponding to each associated log. Business fields are key information closely related to specific business operations and processes, such as paying for goods, searching for goods, etc. The controller also caches each associated log. During the caching process, the related associated logs are grouped and sorted according to the characteristics and classification rules of the business fields, which can reduce repeated calculations and improve data access and processing efficiency. Finally, the controller stores the cached log in the second specified address, which can be memory 2.
[0059] S130 , performing layered processing on the stored data to generate each layer of data, and performing layered rendering on each layer of data to generate a layered topology diagram of the business system.
[0060] Hierarchical data refers to a collection of log data divided according to a hierarchical structure. Log data at different levels have different characteristics and associations. A hierarchical topology diagram refers to a diagram that displays the system or network structure and connection relationships in a hierarchical manner. The hierarchical topology diagram can intuitively present the associations between the logs of each link in the business system.
[0061] Specifically, the controller will perform layered processing on the stored data. The basis for layering can be different stages of the business process, the division of functional modules, or other related logical rules. Through layered processing, each layer of data can be obtained. The controller will combine the associations and dependencies between each layer of data to render and generate a layered topology diagram of the business system.
[0062] Optionally, the method also includes: generating a display page based on the hierarchical topology map; displaying the display page to the user to obtain a control instruction input by the user; determining target hierarchical data corresponding to the control instruction, and processing the target hierarchical data according to the control instruction.
[0063] Specifically, when browsing the display page, the user can input control instructions through the input methods provided on the page, such as clicking buttons, filling out forms, dragging elements, etc. The controller will receive and parse the control instructions input by the user, and determine the target hierarchical data corresponding to the control instructions by analyzing and identifying the instructions. The target hierarchical data refers to the specific part that the user wants to operate and process. The controller will perform corresponding processing operations on the determined target hierarchical data according to the specific requirements of the control instructions input by the user. The processing operations may include filtering, sorting, calculating, updating, etc. of the data to meet the needs of the user, and the processing results will be fed back to the user to achieve effective interaction with the user and meet the user's operational needs for the hierarchical topological data.
[0064] In a specific implementation, when a user interacts with a specific node of a certain layer on a page, for example, by clicking on the node to display its indicator content. At this point, the controller will re-render the layer where the node clicked by the user is located. That is, the controller will identify the layer to which the node belongs and only process that layer. For the topological diagrams of other layers on the page, re-rendering will not be performed. The technical solution of the embodiment of the present invention can ensure that when a user performs a local operation, it will not trigger a large-scale redrawing of the entire page, thereby significantly improving the user experience and reducing unnecessary system resource consumption and page loading time.
[0065] It should be noted that interactive operations are processed asynchronously. That is, when a user initiates an interactive request, such as clicking a node to display indicator content, the controller will not immediately stop other ongoing operations to specifically process this request, but will put it into an asynchronous task queue. In this way, the controller can continue to process other concurrent operations, such as other click operations that the user may perform at the same time or data loading that is being performed in the background. Through asynchronous processing, the situation where one operation blocks other operations is avoided, allowing the controller to process multiple tasks at the same time, improving concurrent processing capabilities and response efficiency, so that users will not feel obvious lag or delay when performing a series of operations.
[0066] In addition, the embodiment of the present invention also adopts virtual DOM technology. In the traditional page update method, each data change may cause the entire page to be redrawn, which is very time-consuming and resource-intensive. In the technical solution of the embodiment of the present invention, when the page data changes, the controller will create a virtual document object model (DOM) structure to represent the current state and the updated state of the page. Then, by comparing the two virtual DOM structures, find out the changed parts. That is, the controller only needs to update the necessary parts of the page that actually change, rather than the entire page. By adopting a local update method, the scope and time of page redrawing are greatly reduced, the response speed of the page is significantly improved, allowing users to see the results of the operation faster, while also reducing performance overhead, so that the page can still remain efficient and smooth when processing large amounts of data and frequent interactions.
[0067] The technical solution of the embodiment of the present invention can accurately identify and associate different log data through the identifier information of the log data, providing a basis for subsequent processing and analysis. By processing the stored data in layers, the hierarchical relationship of the business system can be clearly displayed. By layering the link topology map according to the business field and rendering the topology maps of each layer in parallel, the loading time is reduced and the display efficiency is improved. When the user interacts, only the nodes of the corresponding layer are re-rendered instead of re-rendering the entire topology map, thereby improving the interactive response speed.
[0068] Embodiment 2
[0069] Figure 3 This is a flowchart of a method for generating a hierarchical topology map provided in the second embodiment of the present invention. This embodiment adds a specific process of hierarchical processing of stored data to generate each hierarchical data on the basis of the above-mentioned first embodiment. Among them, the specific contents of steps S210-S220 are roughly the same as steps S110-S120 in the first embodiment, so they will not be repeated in this embodiment. Figure 3 As shown, the method includes:
[0070] S210 , collecting log data of each link of the business system, and determining identifier information contained in each log data, wherein the identifier information includes a tracking identifier, a span identifier, and a parent identifier.
[0071] Optionally, collecting log data of each link of the business system includes: determining each link to be collected contained in the business system; using a distributed collection system to allocate a distributed node to each link to be collected; performing data collection based on each distributed node through a collector, and storing the collected data to a first designated address to generate each log data.
[0072] S220: Process each log data according to the identifier information to generate storage data.
[0073] Optionally, each log data is processed according to the identifier information to generate storage data, including: grouping each log data by tracking identifier to generate each log group, wherein the log group contains log data with the same tracking identifier; taking each log group as a target log group; determining the upstream log of the target log group and its corresponding downstream log according to the span identifier and the parent identifier; and generating storage data according to the upstream log and the corresponding downstream log.
[0074] Optionally, the upstream log of the target log group and its corresponding downstream log are determined according to the span identifier and the parent identifier, including: taking the span identifier of each log data in the target log group as the target span identifier respectively; taking the parent identifier in the target log group that is the same as the target span identifier as the target parent identifier; taking the log data corresponding to the target span identifier as the upstream log, and taking the log data corresponding to the target parent identifier as the downstream log corresponding to the upstream log.
[0075] Optionally, storage data is generated based on the upstream log and the corresponding downstream log, including: establishing association relationships between each upstream log and the corresponding downstream log in parallel, and generating each association log based on each association relationship; determining the business field corresponding to each association log; caching each association log according to the business field to generate a cache log, and storing the cache log in a second designated address to generate storage data.
[0076] S230 . Group the stored data based on the business field to generate business groups, wherein the business groups include stored data with the same business field.
[0077] Among them, the business field is a key identifier that reflects the business type, nature or purpose of the data. The controller will group the stored data according to the business field. During the grouping process, the stored data with the same business field is grouped into the same group, thus forming different business groups. For example, if the business field is "payment goods", then all the data of "payment goods" will be grouped into one group, and all the data of "search goods" will be grouped into another group.
[0078] S240: Perform layered processing on the stored data according to each business group to generate each layer of data.
[0079] Specifically, the controller will perform hierarchical processing on the stored data according to the business grouping. During hierarchical processing, the controller can divide the data in each business group into different layers according to certain rules, such as the importance, priority, and processing order of the business. For example, the controller can treat each business group as a layer, and then generate multiple hierarchical data based on the stored data. By layering the link topology according to the business field and rendering the topology of each layer in parallel, the loading time is reduced and the display efficiency is improved.
[0080] S250: Render each layer of data in a layered manner to generate a layered topology diagram of the business system.
[0081] Optionally, the method also includes: generating a display page based on the hierarchical topology map; displaying the display page to the user to obtain a control instruction input by the user; determining target hierarchical data corresponding to the control instruction, and processing the target hierarchical data according to the control instruction.
[0082] The technical solution of the embodiment of the present invention can accurately identify and associate different log data through the identifier information of the log data, providing a basis for subsequent processing and analysis. By processing the stored data in layers, the hierarchical relationship of the business system can be clearly displayed. By layering the link topology map according to the business field and rendering the topology maps of each layer in parallel, the loading time is reduced and the display efficiency is improved. When the user interacts, only the nodes of the corresponding layer are re-rendered instead of re-rendering the entire topology map, thereby improving the interactive response speed.
[0083] Embodiment 3
[0084] Figure 4 The schematic diagram of the structure of a device for generating a layered topology map provided in the third embodiment of the present invention is shown in FIG. Figure 4As shown, the device includes: a log data collection module 310, which is used to collect log data of each link of the business system and determine the identifier information contained in each log data, wherein the identifier information includes a tracking identifier, a span identifier and a parent identifier;
[0085] The storage data generating module 320 is used to process each log data according to the identifier information to generate storage data;
[0086] The layered topology map generating module 330 is used to perform layered processing on the stored data to generate each layer of data, and perform layered rendering on each layer of data to generate a layered topology map of the business system.
[0087] Optionally, the log data collection module 310 is specifically used to: determine each link to be collected contained in the business system; use a distributed collection system to allocate a distributed node to each link to be collected; perform data collection based on each distributed node through a collector, and store the collected data to a first designated address to generate each log data.
[0088] Optionally, the storage data generation module 320 specifically includes: a log grouping generation unit, used to: group each log data by tracking identifier to generate each log group, wherein the log group contains log data with the same tracking identifier; a target log grouping determination unit, used to: respectively use each log group as a target log group; an upstream and downstream log determination unit, used to: determine the upstream log of the target log group and its corresponding downstream log according to the span identifier and the parent identifier; a storage data generation unit, used to: generate storage data according to the upstream log and the corresponding downstream log.
[0089] Optionally, the upstream and downstream log determination unit is specifically used to: use the span identifier of each log data in the target log group as the target span identifier; use the parent identifier in the target log group that is the same as the target span identifier as the target parent identifier; use the log data corresponding to the target span identifier as the upstream log, and use the log data corresponding to the target parent identifier as the downstream log corresponding to the upstream log.
[0090] Optionally, the storage data generation unit is specifically used to: establish association relationships between each upstream log and the corresponding downstream log in parallel, and generate each association log according to each association relationship; determine the business field corresponding to each association log; cache each association log according to the business field to generate a cache log, and store the cache log into a second designated address to generate storage data.
[0091] Optionally, the layered topology map generation module 330 is specifically used to: group the stored data based on the business field to generate each business group, wherein the business group includes the stored data with the same business field; and perform layered processing on the stored data according to each business group to generate each layered data.
[0092] Optionally, the device also includes: a user interaction module, used to: generate a display page based on the hierarchical topology map; display the display page to the user to obtain control instructions input by the user; determine the target hierarchical data corresponding to the control instructions, and process the target hierarchical data according to the control instructions.
[0093] The technical solution of the embodiment of the present invention can accurately identify and associate different log data through the identifier information of the log data, providing a basis for subsequent processing and analysis. By processing the stored data in layers, the hierarchical relationship of the business system can be clearly displayed. By layering the link topology map according to the business field and rendering the topology maps of each layer in parallel, the loading time is reduced and the display efficiency is improved. When the user interacts, only the nodes of the corresponding layer are re-rendered instead of re-rendering the entire topology map, thereby improving the interactive response speed.
[0094] A layered topology map generating device provided in an embodiment of the present invention can execute a layered topology map generating method provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0095] Embodiment 4
[0096] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0097] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0098] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0099] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a hierarchical topology map generation method.
[0100] In some embodiments, a method for generating a layered topology map may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for generating a layered topology map described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform a method for generating a layered topology map in any other appropriate manner (e.g., by means of firmware).
[0101] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0103] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0104] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0105] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0106] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0107] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0108] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating a hierarchical topology graph, characterized in that: include: Collecting log data of each link of the business system, and determining identifier information contained in each log data, wherein the identifier information includes a tracking identifier, a span identifier, and a parent identifier; Processing each of the log data according to the identifier information to generate storage data; The stored data is processed in layers to generate each layer of data, and each layer of data is rendered in layers to generate a layered topology diagram of the business system.
2. The method according to claim 1, characterized in that The log data of each link of the collection business system includes: Determine the links to be collected in the business system; Using a distributed collection system to allocate distributed nodes to each of the links to be collected; The collector collects data based on each distributed node, and stores the collected data to the first designated address to generate each log data.
3. The method according to claim 1, characterized in that The processing of each log data according to the identifier information to generate storage data includes: Grouping each of the log data by a tracking identifier to generate each log group, wherein the log group contains log data with the same tracking identifier; Each of the log groups is used as a target log group respectively; Determine the upstream log of the target log group and its corresponding downstream log according to the span identifier and the parent identifier; The storage data is generated according to the upstream log and the corresponding downstream log.
4. The method according to claim 3, characterized in that The determining the upstream log of the target log group and its corresponding downstream log according to the span identifier and the parent identifier includes: Using the span identifier of each log data in the target log group as the target span identifier respectively; Taking the parent identifier in the target log group that is the same as the target span identifier as the target parent identifier; The log data corresponding to the target span identifier is used as the upstream log, and the log data corresponding to the target parent identifier is used as the downstream log corresponding to the upstream log.
5. The method according to claim 3, characterized in that: The generating the storage data according to the upstream log and the corresponding downstream log includes: Establishing associations between the upstream logs and the corresponding downstream logs in parallel, and generating associated logs according to the associations; Determine the business fields corresponding to each associated log; Each of the associated logs is cached according to the business field to generate a cache log, and the cache log is stored in a second designated address to generate the storage data.
6. The method according to claim 5, characterized in that The step of performing layered processing on the stored data to generate each layer of data includes: Grouping the stored data based on the business field to generate each business group, wherein the business group includes stored data with the same business field; The stored data is processed in layers according to each of the business groups to generate each layer of data.
7. The method according to claim 1, characterized in that The method further comprises: Generate a display page according to the layered topology diagram; Displaying the display page to the user to obtain a control instruction input by the user; The target hierarchical data corresponding to the control instruction is determined, and the target hierarchical data is processed according to the control instruction.
8. A device for generating a layered topology graph, characterized in that: include: A log data collection module, used to collect log data of each link of the business system, and determine the identifier information contained in each log data, wherein the identifier information includes a tracking identifier, a span identifier and a parent identifier; A storage data generating module, used for processing each of the log data according to the identifier information to generate storage data; The layered topology map generating module is used to perform layered processing on the stored data to generate each layer of data, and perform layered rendering on each layer of data to generate a layered topology map of the business system.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Log association processing method, device and equipment
CN111488319A
Data processing method and device, equipment and storage medium
CN116108233A
Link alarm processing method and device, equipment and storage medium
CN117061334A
Node folding method and device based on directed link calling topological graph and medium
CN118170951A
Log management method and device, electronic equipment and storage medium
CN118210772A
Cited By
Transaction link aggregation tracking method and system
CN119088662B
Log-based node generation method and device, equipment, medium and product
CN119149502A
