Method and device for generating resource topology graph, electronic equipment and readable storage medium
By generating resource topology maps based on business systems, the problem of insufficient relevance of existing topology maps in business scenarios is solved, enabling efficient management and visualization of business system resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2026-04-10
AI Technical Summary
The existing resource topology map lacks specificity for business scenarios and is difficult to meet resource management needs.
By obtaining the system code of the target business system, associating various types of resources, and generating a system service topology map based on a preset configuration database, the system displays and responds to user operations to obtain the resource service topology map, and uses dynamic structured query statements to obtain the relationship between upper and lower layer resources.
It enables a clear and visual understanding of the relationships between various types of resources in the business system, improving the targeting and efficiency of resource management and allowing for a quick understanding of the scope of impact before and after resource management.
Smart Images

Figure CN116166737B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a resource topology graph generation method and device, electronic equipment and a computer readable storage medium. BACKGROUND
[0002] In the existing network environment, various data resources are associated with each other, and an exception of one resource can cause an exception of other resources.
[0003] In order to facilitate the understanding of resources by data processing personnel, so as to facilitate the exception processing, updating and other resource management of resources, the existing technology forms a topology graph of the association relationship between various types of resources for visualization.
[0004] However, the present inventors have found in practical application that since the existing resource topology graph only associates different types of resources, it is not strong in business pertinence, and it is difficult to meet the resource management needs of the business scenario. SUMMARY
[0005] The present application provides a resource topology graph generation method and device, electronic equipment and a computer readable storage medium, which aims to solve the problem that the existing resource topology graph is not strong in business pertinence, and it is difficult to meet the resource management needs of the business scenario.
[0006] In a first aspect, the present application provides a resource topology graph generation method, which comprises:
[0007] obtaining a target system code of a target business system;
[0008] obtaining various types of resources associated with the target system code;
[0009] obtaining a first association relationship between first resource types corresponding to the various types of resources from a preset configuration database;
[0010] taking the first resource types as nodes, and generating a system service topology graph of the target business system according to the first association relationship.
[0011] In some embodiments of the present application, after taking the first resource types as nodes and generating the system service topology graph of the target business system according to the first association relationship, the method further comprises:
[0012] displaying the system service topology graph, the system service topology graph comprising a plurality of resources;
[0013] in response to a selection operation on a target resource in the system service topology graph, obtaining a resource service topology graph of the target resource;
[0014] display the resource service topology graph.
[0015] In some embodiments of the present application, the method further comprises:
[0016] obtaining target upper and lower layer resources associated with the target resource, and a second association relationship between the target upper and lower layer resources;
[0017] taking the target upper and lower layer resources as nodes, and generating the resource service topology graph of the target resource according to the second association relationship.
[0018] In some embodiments of the present application, the method further comprises:
[0019] detecting whether the target resource is a cut-in point resource of the second resource type corresponding to the target resource;
[0020] if the target resource is the cut-in point resource, inserting identification information of the target resource into a preset dynamic structured query statement;
[0021] obtaining, by using the dynamic structured query statement, the target upper and lower layer resources associated with the target resource record and the second association relationship from a preset resource association configuration database.
[0022] In some embodiments of the present application, the method further comprises:
[0023] if the target resource is not the cut-in point resource, inserting identification information of the cut-in point resource into the dynamic structured query statement;
[0024] obtaining, by using the dynamic structured query statement, upper and lower layer resources associated with the cut-in point resource record from the resource association configuration database as the target upper and lower layer resources, and obtaining an association relationship of the upper and lower layer resources as the second association relationship.
[0025] In some embodiments of the present application, the method further comprises:
[0026] displaying a first system service topology graph containing the first resource type corresponding to each type of resource;
[0027] in response to an expansion operation for a target resource type in the first system service topology graph, displaying a second system service topology graph containing each resource corresponding to the target resource type;
[0028] The response to the selection operation for the target resource in the system service topology map, the resource service topology map of the target resource is obtained, and the target resource is taken from each resource corresponding to the target resource type.
[0029] The response to the selection operation for the target resource in the second system service topology map, the resource service topology map of the target resource is obtained, and the target resource is taken from each resource corresponding to the target resource type.
[0030] In some embodiments of the present application, the first resource type is taken as a node, and the system service topology map of the target business system is generated according to the first association relationship, comprising:
[0031] The aggregate quantity of each type of resource is obtained.
[0032] Through the rendering plug-in in the preset target terminal, the first resource type and the aggregate quantity are taken as nodes, and the system service topology map of the target business system is generated according to the first association relationship.
[0033] In a second aspect, the present application provides a resource topology map generation device, comprising:
[0034] The first acquisition unit is configured to acquire a target system code of a target business system.
[0035] The second acquisition unit is configured to acquire each type of resource associated with the target system code.
[0036] The third acquisition unit is configured to acquire a first association relationship between the first resource types corresponding to each type of resource from a preset configuration database.
[0037] The generation unit is configured to take the first resource type as a node and generate a system service topology map of the target business system according to the first association relationship.
[0038] In some embodiments of the present application, the resource topology map generation device further comprises a display unit, and after the first resource type is taken as a node and the system service topology map of the target business system is generated according to the first association relationship, the display unit is specifically configured to:
[0039] The system service topology map is displayed, and the system service topology map comprises a plurality of resources.
[0040] The response to the selection operation for the target resource in the system service topology map, the resource service topology map of the target resource is obtained.
[0041] The resource service topology map is displayed.
[0042] In some embodiments of the present application, the display unit is specifically configured to:
[0043] obtain target upper and lower layer resources associated with the target resource and a second association relationship between the target upper and lower layer resources;
[0044] take the target upper and lower layer resources as nodes, and generate a resource service topology graph of the target resource according to the second association relationship.
[0045] In some embodiments of the present application, the display unit is specifically configured to:
[0046] detect whether the target resource is a cut-in point resource of a second resource type corresponding to the target resource;
[0047] if the target resource is the cut-in point resource, insert identification information of the target resource into a preset dynamic structured query statement;
[0048] obtain, through the dynamic structured query statement, target upper and lower layer resources of the target resource association record and the second association relationship from a preset resource association configuration database.
[0049] In some embodiments of the present application, the display unit is specifically configured to:
[0050] if the target resource is not the cut-in point resource, insert identification information of the cut-in point resource into the dynamic structured query statement;
[0051] obtain, through the dynamic structured query statement, upper and lower layer resources associated with the cut-in point resource record from the resource association configuration database as the target upper and lower layer resources, and obtain an association relationship of the upper and lower layer resources as the second association relationship.
[0052] In some embodiments of the present application, the display unit is specifically configured to:
[0053] display a first system service topology graph containing a first resource type corresponding to each type of resource;
[0054] in response to an expansion operation for a target resource type in the first system service topology graph, display a second system service topology graph containing each resource corresponding to the target resource type;
[0055] in response to a selection operation for a target resource in the second system service topology graph, obtain a resource service topology graph of the target resource, the target resource being taken from each resource corresponding to the target resource type.
[0056] In some embodiments of the present application, the generation unit is specifically configured to:
[0057] obtaining an aggregated quantity of the resources of the types;
[0058] generating, by a rendering plug-in in a preset target terminal, a system service topology of the target business system according to the first association relationship, taking the first resource types corresponding to the resources of the types associated with the target system code as nodes and taking the aggregated quantity as a node.
[0059] In a third aspect, the present application also provides an electronic device, which comprises a processor and a memory, and the memory stores a computer program, and the processor executes the steps of any of the resource topology generation methods provided by the present application when invoking the computer program in the memory.
[0060] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is loaded by a processor to execute the steps of the resource topology generation method.
[0061] The present application generates the system service topology of the target business system according to the first association relationship between the first resource types, taking the first resource types corresponding to the resources of the types associated with the target system code as nodes. On the one hand, the association relationship between the resources of the types in the target business system can be visualized, so that the user can more clearly and quickly understand the association relationship between the resources of the types in the target business system. Therefore, when the resources in the business system need to be updated, changed, repaired or managed, the scope affected before and after the resource management can be more clearly and quickly understood. On the other hand, the resources topology is generated by taking the business system as the dimension, rather than simply associating different types of resources. Therefore, different types of resources in the business system can be more targetedly associated, and the problem that the business targeting of the resource topology is not strong and it is difficult to meet the resource management requirements of the business scenario is solved. BRIEF DESCRIPTION OF DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0063] Figure 1 is a scene diagram of the resource topology generation system provided by the embodiments of the present application;
[0064] Figure 2 is a flowchart of the resource topology generation method provided by the embodiments of the present application;
[0065] Figure 3is a generation process description schematic diagram of a system service topology diagram provided in an embodiment of the present application;
[0066] Figure 4 is an architecture schematic diagram of a topology diagram provided in an embodiment of the present application;
[0067] Figure 5 is an architecture schematic diagram of a system service topology diagram provided in an embodiment of the present application;
[0068] Figure 6 is a display jump flow schematic diagram of a resource topology diagram provided in an embodiment of the present application;
[0069] Figure 7 is another architecture scenario schematic diagram of a system service topology diagram provided in an embodiment of the present application;
[0070] Figure 8 is a generation process description schematic diagram of a resource service topology diagram provided in an embodiment of the present application;
[0071] Figure 9 is an embodiment structure schematic diagram of a resource topology diagram generation apparatus provided in an embodiment of the present application;
[0072] Figure 10 is an embodiment structure schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative work fall within the scope of protection of the present application.
[0074] In the description of the embodiments of the present application, it should be understood that the terms “first” and “second” are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with “first” and “second” can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of “multiple” is two or more, unless otherwise specifically limited.
[0075] To enable any person skilled in the art to implement and use this application, the following description is provided. In this description, details are set forth for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other instances, well-known processes will not be described in detail to avoid obscuring the description of the embodiments of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in the embodiments of this application.
[0076] The execution subject of the resource topology map generation method in this application embodiment can be the resource topology map generation device provided in this application embodiment, or different types of electronic devices such as server equipment, physical host, or user equipment (UE) that integrate the resource topology map generation device. The resource topology map generation device can be implemented in hardware or software. The UE can specifically be a terminal device such as a smartphone, tablet computer, laptop computer, handheld computer, desktop computer, or personal digital assistant (PDA).
[0077] The electronic device can operate independently or in a cluster. By applying the resource topology map generation method provided in this application, different types of resources in the business system can be associated more specifically, solving the problem that the resource topology map lacks business specificity and thus fails to meet the resource management needs of business scenarios.
[0078] See Figure 1 , Figure 1 This is a schematic diagram of a resource topology map generation system provided in this application embodiment. The resource topology map generation system may include an electronic device 100, which integrates a resource topology map generation device. For example, the electronic device may obtain the target system code of a target business system; obtain various types of resources associated with the target system code; obtain a first association relationship between first resource types corresponding to each type of resource from a preset configuration database; and generate a system service topology map of the target business system based on the first association relationship, using the first resource type as a node.
[0079] In addition, such as Figure 1 As shown, the resource topology map generation system may also include a memory 200 for storing data, such as storing various types of resource data.
[0080] It should be noted that, Figure 1The scenario schematic diagram of the resource topology graph generation system shown is merely an example, and the resource topology graph generation system and scenario described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It can be known by a person of ordinary skill in the art that, as the resource topology graph generation system evolves and new service scenarios appear, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0081] Next, the resource topology graph generation method provided by the embodiments of the present application is introduced. In the embodiments of the present application, an electronic device is taken as an execution subject. In order to simplify and facilitate description, the execution subject will be omitted in subsequent method embodiments. The resource topology graph generation method comprises: obtaining a target system code of a target service system; obtaining each type of resource associated with the target system code; obtaining a first association relationship between first resource types corresponding to the each type of resource from a preset configuration database; and taking the first resource types as nodes, generating a system service topology graph of the target service system according to the first association relationship.
[0082] Reference is made to Figure 2 , Figure 2 FIG. 1 is a flowchart of the resource topology graph generation method provided by the embodiments of the present application. It should be noted that, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein. The resource topology graph generation method comprises steps 201-204, wherein:
[0083] 201. Obtain a target system code of a target service system.
[0084] The service system refers to a resource system of a basic organization unit divided by resource management, for example, a resource system of a company.
[0085] The resource system of a basic organization unit refers to a general term of resources involved by the basic organization unit.
[0086] The target service system is a service system in a plurality of service systems for which a system service topology graph is to be generated. For example, a system service topology graph needs to be generated for the resources of company A, and the target service system is company A.
[0087] The system code refers to an identifier of a service system, and the target system code refers to an identifier of a target service system. For example, a resource management code of a company.
[0088] There are various ways to obtain the target system code in step 201. Exemplarily, the ways include:
[0089] (1) The electronic device pre-sets and stores the system codes of each service system in a preset database, and the target terminal can first read the system codes of each service system stored in the preset database of the electronic device and display them; then, the user can input or select the system code of the service system for which the topology graph needs to be displayed based on the displayed system codes of each service system based on the target terminal; at this time, the electronic device can receive the system code input or selected by the user from the target terminal as the target system code. For example, the present application embodiment provides a user interface (User Interface, UI) for querying the resource topology graph, and the user can input the system code of the service system that needs to be queried in the UI interface of the target terminal, and the electronic device obtains the system code input by the user as the target system code. The target terminal and the electronic device can be the same device, or they can be two different devices.
[0090] The UI is a medium for interaction and information exchange between the system and the user, and it realizes the conversion between the internal form of information and the form acceptable by humans.
[0091] (2) The system service topology graph of the target service system is generated as a timing task of the electronic device, and the target system code of the target service system is stored in the electronic device; when the timing task of "generating the system service topology graph of the target service system" is triggered, the electronic device directly obtains the target system code of the target service system stored in the electronic device.
[0092] 202, Obtain each type of resource associated with the target system code.
[0093] In the present application embodiment, the resource refers to a software or hardware resource for processing business data, for example, a database resource MySQL, Mycat for storing business data, and for example, a computing resource CVM, BMS for calculating business data to form a specific format.
[0094] In step 202, there are many ways to obtain each type of resource, exemplarily including:
[0095] (1) Each resource is stored in a preset resource database in association with the system code, and in step 202, each resource associated with the target system code is obtained first, and then each resource is classified to obtain each type of resource. Please refer to Figure 3 , Figure 3 is a process diagram provided by the present application embodiment for generating the system service topology graph, and at this time, step 202 can specifically include the following steps 2021-2022:
[0096] 2021, Obtain each resource associated with the target system code from the preset resource database.
[0097] 2022. Classify the resources associated with the target system code to obtain the types of resources associated with the target system code and the aggregate quantity of each type of resource.
[0098] For example, such as Figure 3 As shown, after receiving the target system code input by the user in the front-end user interface, the system first queries a pre-defined resource database to retrieve all resources associated with the target system code. Then, according to pre-defined classification rules, all the retrieved resources associated with the target system code are categorized. For example, Kafka and Redis are classified as middleware resources; MySQL and Mycat are classified as database resources; CVM and BMS are classified as computing resources; and CRM is classified as machine resources. Finally, the system obtains the types of resources associated with the target system code and the aggregate quantity of each type of resource.
[0099] Kafka is a distributed, partitioned, multi-replica distributed messaging system coordinated by ZooKeeper.
[0100] Redis is an open-source, ANSI C-written, BSD-licensed, network-enabled, in-memory, distributed, optional persistent key-value store database.
[0101] MySQL is a relational database management system.
[0102] Mycat is a completely open-source database cluster designed for enterprise application development.
[0103] CVM stands for Cloud Server, a simple, efficient, secure, reliable, and elastically scalable computing service.
[0104] BMS stands for Bare Metal Server, which is a computing service that combines the elasticity of virtual machines with the performance of physical machines.
[0105] CRM stands for cloud data center, which is an internet-based computing method that allows shared hardware and software resources and information to be provided to computers and other devices on demand.
[0106] (2) All resources have been pre-classified according to resource type. Each type of resource is associated with the system code and stored in the preset resource database. In step 202, the resources of each type associated with the target system code and the aggregate quantity of each type of resource are directly queried and read.
[0107] 203. Obtain the first association relationship between the first resource types corresponding to each type of resource from the preset configuration database.
[0108] The topology graph is formed by edges and nodes, and the system service topology graph in the embodiments of the present application takes the first resource type corresponding to each type of resource as a node and takes the link relationship between the first resource types as an edge.
[0109] The first resource type refers to the resource category corresponding to each type of resource associated with the target system code, for example, middleware type, database type, and computing type.
[0110] The first association relationship refers to the link relationship between the first resource type corresponding to one type of resource and the first resource type corresponding to another type of resource, for example, the upper and lower resource types of each resource type. The first association relationship is specifically used to indicate whether there is an edge connection relationship between the nodes where the two resource types are located in the system service topology graph, for example, as shown in FIG. 2B. Figure 4 Figure 4 FIG. 2B is a schematic diagram of a topology graph provided in the embodiments of the present application. As shown in FIG. 2B, the nodes where the A resource type and the C resource type are located do not have an edge connection relationship, so the nodes where the A resource type and the C resource type are located do not have an edge connection relationship. The nodes where the A resource type and the B resource type are located have an edge connection relationship, so the nodes where the A resource type and the B resource type are located have an edge connection relationship.
[0111] Specifically, the preconfigured edge connection relationship is recorded in the preset configuration database, and the first association relationship between the first resource types corresponding to each type of resource is read from the preset configuration database based on each type of resource obtained in step 202 in step 203. At this time, step 203 can further include: constructing the edge connection relationship between the resource types; and storing the edge connection relationship between the resource types in the preset configuration database. The preset configuration database can be a configuration management database (CMDB). The CMDB is a logical database that contains information about the full life cycle of configuration items and the relationships between the configuration items (including physical relationships, real-time communication relationships, non-real-time communication relationships, and dependency relationships).
[0112] For example, the preset configuration database records the pre-configured edge connection relationship as shown in Table 1, where source_object_code represents the resource type corresponding to the starting point of the edge, and dest_object_code represents the resource type corresponding to the end point of the edge. If the first resource types corresponding to each type of resource obtained in step 202 are ArrayInstance, ArrayServer, Kafkalnstance, KafkaBroker, MWHostInstance, MongodbService, MongodbCluster, MongodbInstance, RDBHost, and BMSHost, respectively, step 203 can obtain the pre-configured edge connection relationship as shown in Table 1 as the first association relationship.
[0113] Table 1
[0114] id source_object_code dest_object_code 1 ArrayInstance ArrayServer 2 ArrayServer ArrayHardware 3 Kafkalnstance KafkaBroker 4 KafkaBroker MWHostInstance 5 MWHostInstance BMSHost 6 MongodbService MongodbCluster 7 MongodbCluster MongodbInstance 8 MongodbInstance RDBHost 9 RDBHost BMSHost
[0115] 204. generating a system service topology graph of the target business system according to the first association relationship, taking the first resource types as nodes.
[0116] The system service topology graph refers to a topology graph of the target business system formed by taking the first resource types corresponding to each type of resource corresponding to the target system code as nodes and the association relationship between the first resource types as edges. The system service topology graph is a resource topology graph with the business system as the dimension. Each resource type is a node of the system service topology graph.
[0117] There are various ways to generate the system service topology graph in step 204, exemplarily including:
[0118] (1) The target terminal integrates a rendering plug-in for forming a topology graph, and the system service topology graph is generated by the rendering plug-in in the target terminal according to the first resource types and the first association relationship. Exemplarily, at this time, the target system code is obtained based on the target terminal in step 201, and the first resource types obtained in step 202 and the first association relationship obtained in step 203 are returned to the target terminal in step 204; the rendering plug-in in the target terminal draws according to the first resource types and the first association relationship, and forms the system service topology graph of the target business system.
[0119] (2) The system service topology graph can also be directly generated on the electronic device. Exemplarily, at this time, the electronic device integrates a rendering plug-in for forming a topology graph, and in step 204, the rendering plug-in in the electronic device draws according to the first resource types obtained in step 202 and the first association relationship obtained in step 203, and forms the system service topology graph of the target business system.
[0120] For example, assuming that the first resource types corresponding to each type of resource of the target system code "123" are Arraylnstance, ArrayServer, Kafkalnstance, KafkaBroker, MWHostlnstance, MongodbService, MongodbCluster, Mongodblnstance, RDBHost, and BMSHost respectively in step 202, and the preconfigured edge connection relationship as shown in Table 1 is obtained as the first association relationship in step 203, by taking the first resource types (Arraylnstance, ArrayServer, Kafkalnstance, KafkaBroker, MWHostlnstance, MongodbService, MongodbCluster, Mongodblnstance, RDBHost, and BMSHost) as nodes of the system service topology graph respectively (i.e., taking each first resource type as a node), and drawing according to the first association relationship shown in Table 1, a system service topology graph as shown in FIG. 3 can be formed as the system service topology graph corresponding to the target system code "123". Figure 5
[0121] Further, the system service topology graph of the target business system also includes the aggregate quantity of each type of resource associated with the target system code. At this time, the aggregate quantity of each type of resource associated with the target system code can also be further counted in step 202, and step 204 can generate the system service topology graph of the target business system carrying the aggregate quantity information of each type of resource based on the aggregate quantity of each type of resource associated with the target system code counted in step 202. Specifically, in step 204, the first resource type and the aggregate quantity of each type of resource are taken as nodes, and drawing is performed according to the first association relationship to form the system service topology graph of the target business system. The aggregate quantity of each type of resource refers to the total number of this type of resource in the target business system. By taking the first resource type and the aggregate quantity as nodes, the system service topology graph of the target business system is generated according to the first association relationship, so that the user can more intuitively and comprehensively understand the influence range and influence quantity of the resource when subsequently performing management such as updating and maintaining the resource data of the target business system.
[0122] Please refer to Figure 3 For ease of understanding, the following takes, for example, the edge and node data (i.e., each type of resource and the first association relationship) of the resource topology graph formed by the electronic device and the system service topology graph formed by the rendering plug-in integrated in the WEB front end to draw a graph as an example to illustrate the generation process of the system service topology graph. For example, the user can input the system code of the business system to be queried in the WEB front end as the target system code into the electronic device. The electronic device queries each type of resource associated with the target system code and the aggregation quantity of each type of resource in the database, and returns the edge and node data (i.e., each type of resource and the first association relationship) of the resource topology graph to be generated according to each type of resource to the WEB front end according to the preset rule. The rendering plug-in (such as Echarts plug-in, Antv.G6 plug-in) for forming a topology graph is integrated in the WEB front end, and the rendering plug-in in the WEB front end will draw a graph according to the edge and node data (i.e., each type of resource and the first association relationship) returned by the electronic device, form the system service topology graph of the target business system corresponding to the target system code, and display the system service topology graph of the target business system in the WEB front end.
[0123] By taking the first resource type corresponding to each type of resource associated with the target system code as the node and generating the system service topology graph of the target business system according to the first association relationship between the first resource types, on the one hand, the association relationship between each type of resource in the target business system can be visualized, so that the user can more clearly and quickly understand the association relationship between each type of resource in the target business system, and therefore, when data management such as updating, changing, repairing, etc. of the resources in the business system is needed, the scope affected before and after the resource management can be more clearly and quickly understood. On the other hand, since the resource topology graph is generated based on the business system as the dimension, rather than simply associating different types of resources, different types of resources in the business system can be more targetedly associated, and the problem that the business targeting of the resource topology graph is not strong, resulting in difficulty in meeting the resource management needs of the business scenario is solved.
[0124] On the one hand, in order to improve the business targeting of the topology graph in the actual business scenario; on the other hand, in order to meet the resource upper and lower layer mining needs of the business scenario, the resource service topology graph (i.e., the topology graph based on the resource as the dimension) of the upper and lower layer link resources of a certain resource can also be provided based on the system service topology graph formed based on the business system as the dimension. However, considering that due to the limitation of the page size, if there are too many nodes in the topology graph, the formed graph will be particularly dense and difficult to observe, in the embodiments of the present application, the system service topology graph based on the business system as the dimension is displayed first, and then for each resource in the system service topology graph, the resource service topology graph for displaying the upper and lower layer link resources of the resource is jumped to. For example, Figure 6As shown, after the step 204 of "generating the system service topology graph of the target business system according to the first association relationship with the first resource type as the node", the following steps 601-603 can also be included, wherein:
[0125] 601. Display the system service topology graph.
[0126] The system service topology graph includes a plurality of resources.
[0127] There are various ways to display the system service topology graph in step 601, including, for example:
[0128] Method 1: The system service topology graph displayed in step 601 displays the icons of the first resource type corresponding to each type of resource, and displays the resource list corresponding to the first resource type under each first resource type icon, as shown in (a) of Figure 7 At this time, the system service topology graph is used to display multiple resources under one resource type.
[0129] Method 2: In order to simplify page display and facilitate the query of link relationships between each type of resource, so as to more intuitively observe the link relationships between each type of resource, the first system service topology graph containing the first resource type corresponding to each type of resource is displayed in step 601; then, it is detected whether there is an expansion operation of the user for the first resource type in the first system service topology graph; when it is detected that there is an expansion operation of the user for the first resource type in the first system service topology graph, in response to the expansion operation for the target resource type (such as the P resource type in (b) of Figure 7 ), a second system service topology graph containing each resource corresponding to the target resource type is displayed, as shown in (b) of Figure 7 At this time, the second system service topology graph can also be used to display multiple resources under one resource type.
[0130] There are various terminal implementation methods for displaying the system topology graph in step 601, including, for example:
[0131] (1) Generating and displaying the system topology graph for different terminals. For example, the target system code is received in step 201 as the target system code input by the user from the target terminal, the types of resources associated with the target system code and the first management relationship are fed back to the target terminal in steps 202-203, the system service topology graph of the target business system is generated in step 204 according to the types of resources and the first association relationship through the rendering plug-in in the target terminal, and the target terminal displays the system service topology graph of the target business system generated by it in step 601.
[0132] (2) Generating and displaying the system topology diagram for different terminals. For example, in step 201, the user inputs the system code of the target terminal as the target system code, in steps 202-203, the electronic device obtains each type of resource and the first management relationship associated with the target system code, and in step 204, the electronic device directly generates the system service topology diagram of the target business system. The electronic device feeds back the system service topology diagram of the target business system generated by the electronic device to the target terminal, and in step 601, the target terminal displays the system service topology diagram of the target business system generated by the electronic device.
[0133] (3) Generating and displaying the system topology diagram for the same terminal. For example, the system service topology diagram of the target business system is generated as a timing task of the electronic device, and each time the timing task of “generating the system service topology diagram of the target business system” is completed, the system service topology diagram of the target business system is generated and sent to the preset display management platform, and the system service topology diagram of the target business system is displayed through the preset display management platform. Here, the preset display management platform can be a server, a terminal, or other forms, and the specific form of the preset display management platform in the embodiments of the present application is not limited.
[0134] 602, in response to a selection operation on a target resource in the system service topology diagram, obtaining a resource service topology diagram of the target resource.
[0135] Wherein, the selection operation refers to an operation of selecting a target resource, for example, a user's click operation on a target resource icon in the system service topology diagram displayed on the target terminal.
[0136] Wherein, the resource service topology diagram refers to a resource topology diagram with a single resource as the dimension.
[0137] Wherein, the target resource refers to a resource corresponding to the selection operation for generating a resource topology diagram.
[0138] In some embodiments, the system service topology diagram displayed in step 601 displays icons of the first resource type corresponding to each type of resource, and displays a list of resources corresponding to the first resource type under each icon of the first resource type. At this time, the user can directly perform the selection operation of the target resource based on the system service topology diagram displayed in step 601.
[0139] In some embodiments, in order to simplify the page display, the system service topology diagram displayed in step 601 only displays icons of various types of resources, and in order to facilitate inquiry, when an icon of a resource of a certain type in the system service topology diagram displayed in step 601 is clicked, a list of resources corresponding to the resource of the certain type can be further displayed. The user can perform a selection operation on the target resource based on the further displayed resource list. At this time, step 601 can specifically include: displaying a first system service topology diagram containing a first resource type corresponding to the various types of resources; and in response to an expansion operation on a target resource type in the first system service topology diagram, displaying a second system service topology diagram containing various resources corresponding to the target resource type. Step 602 can specifically include: in response to a selection operation on a target resource in the second system service topology diagram, acquiring a resource service topology diagram of the target resource, wherein the target resource is taken from the various resources corresponding to the target resource type.
[0140] There are various ways to acquire the resource service topology diagram in step 602, and exemplarily, they include:
[0141] 1. Real-time generation. Refer to Figure 8 , Figure 8 FIG. 2 is a schematic diagram illustrating a generation process of a resource service topology diagram provided in an application embodiment, and at this time, step 602 can specifically include steps 6021-6022 as follows:
[0142] 6021. Acquire target upper and lower layer resources associated with the target resource, and a second association relationship between the target upper and lower layer resources.
[0143] Wherein, the upper and lower layer resources refer to resources that have an association relationship with a certain resource and are in the upper layer of the resource, and resources that have an association relationship with the certain resource and are in the lower layer of the resource.
[0144] Wherein, the target upper and lower layer resources refer to resources that have an association relationship with the target resource and are in the upper layer of the target resource, and resources that have an association relationship with the target resource and are in the lower layer of the target resource.
[0145] Wherein, the second association relationship refers to a link relationship between the target resource and the upper and lower layer resources of the target resource, and the second association relationship is specifically used to indicate whether there is an edge connection relationship between the nodes where the two resources are located in the resource service topology diagram. The link relationship between the two resources in the resource service topology diagram can be represented by edge connection.
[0146] Exemplarily, the target upper and lower layer resources and the second association relationship can be queried through a preconfigured dynamic SQL statement in step 6021. At this time, step 6021 can specifically include steps A1-A4 as follows:
[0147] A1, detecting whether the target resource is a cut-in point resource of the second resource type corresponding to the target resource.
[0148] The second resource type refers to a resource category corresponding to the target resource, for example, the second resource type corresponding to the target resource is middleware type, database type, or computing type.
[0149] The cut-in point resource refers to a resource serving as a query cut-in point among resources in a link relationship corresponding to the second resource type.
[0150] In order to ensure that the upper and lower layer resources of each resource and the association relationship between the resource and its upper and lower layer resources can be normally queried, before step A1, the following steps are further included: pre-configuring a plurality of type link relationships and storing them into a resource association configuration database, each type link relationship including the upper and lower layer resources associated with each resource; and selecting a resource from each resource under each type link relationship as a cut-in point resource of the type link relationship.
[0151] In the embodiments of the present application, the purpose of selecting the cut-in point resource is that, since there are many resources, if the link relationship of the upper and lower layer resources of a resource is queried based on an arbitrary resource, the number of resources that need to be traversed is large, and therefore the speed of querying the upper and lower layer resources of the resource will be slow; therefore, setting a cut-in point resource for each type link relationship can reduce the number of resources that need to be traversed, and thus the target upper and lower layer resources associated with the target resource can be quickly queried. The selection method of the cut-in point resource is various, for example, a resource can be arbitrarily selected from each resource under each type link relationship as the cut-in point resource; or a resource of a specific type (such as a pre-defined cut-in point resource type) can be selected from each resource under each type link relationship as the cut-in point resource.
[0152] In step A1, whether the target resource is the cut-in point resource of the second resource type corresponding to the target resource is determined by detecting whether the target resource and the cut-in point resource of the second resource type are the same. At this time, step A1 can specifically include: first, obtaining the cut-in point resource of the second resource type corresponding to the target resource; then, detecting whether the target resource and the cut-in point resource of the second resource type are the same; when the target resource and the cut-in point resource of the second resource type are the same, it is determined that the target resource is the cut-in point resource. When the target resource and the cut-in point resource of the second resource type are not the same, it is determined that the target resource is not the cut-in point resource.
[0153] A2, if the target resource is the cut-in point resource, inserting the identification information of the target resource into a pre-set dynamic structured query statement.
[0154] A3, obtaining the target upper and lower resources of the target resource association record and the second association relationship from the preset resource association configuration database through the dynamic structured query statement.
[0155] The identification information of the target resource is information used to uniquely identify the target resource. For example, the identification information of the target resource can be srn: prd: fbox: 1: Deployment: fbox-IiME7s5Q, which is abbreviated as resource sm. The meanings of the several segments are as follows:
[0156] srn: fixed starting identifier of all resources;
[0157] prd: identify the environment, such as production, test environment;
[0158] fbox: type of this resource;
[0159] Deployment: identify the deployment type under fbox;
[0160] fbox-IiME7s5Q: unique identification.
[0161] In the embodiments of the present application, a dynamic structured query statement (Structured Query Language, SQL) is configured for each type of resource, which is used to query the target upper and lower resources associated with the target resource and the second association relationship between the target upper and lower resources. For example, the following dynamic SQL is configured for the second resource type. By inserting the identification information of the target resource into the following dynamic SQL, the target upper and lower resources of the target resource association record can be queried from the preset resource association configuration database.
[0162] Exemplarily, the dynamic SQL configured for the second resource type can be as follows:
[0163] 1. {"nodes": "SELECT DISTINCT s.srn AS'source_srn', s.resource_type AS'source_resource_type', CONCAT_WS(':', s.server_ip, s.server_port) AS'source_display_name', null as'service', null as node_type
[0164] 2. FROM t_res_jboss_server s, t_res_jboss_instance i
[0165] 3. WHERE s.instance_id = i.instance_id
[0166] 4. AND i.srn in($(srn)) AND i.resource_status IN($(resourceStatus)) AND s.resource_status IN($(resourceStatus))
[0167] 5. UNION ALL
[0168] 6. SELECT DISTINCT i.srn AS'source_srn', i.resource_type AS'source_resource_type', CONCAT_WS(':', i.instance_name) AS'source_display_name', null as'service', null as node_type
[0169] 7. FROM t_res_jboss_instance i
[0170] 8. WHERE i.srn in($(srn)) AND i.resource_status IN($(resourceStatus))",
[0171] 9. "links":"SELECT DISTINCT s.srn AS 'dest_srn', 'JBossServer' AS dest, i.srn AS'source_srn', 'JBossInstance' AS source
[0172] 10. FROM t_res_jboss_server s, t_res_jboss_instance i
[0173] 11. WHERE s.instance_id = i.instance_id
[0174] 12. AND i.srn in($(srn)) AND i.resource_status IN($(resourceStatus)) AND s.resource_status IN($(resourceStatus))
[0175] 13. UNION ALL
[0176] 14. SELECT DISTINCT h.srn AS 'dest_srn', 'BMSHost' AS dest, ins.srn AS'source_srn', 'MWHostInstance' AS source
[0177] 15. FROM t_res_bms_host h, t_res_jboss_instance i, `t_res_jboss_server` w, `t_res_mwhost_instance` ins
[0178] 16. WHERE w.instance_id = i.instance_id
[0179] 17. AND ins.srn = w.host_srn
[0180] 18. AND ins.host_srn = h.srn
[0181] 19. AND i.srn in($(srn)) AND i.resource_status IN($(resourceStatus)) AND h.resource_status IN($(resourceStatus)) AND ins.resource_status IN($(resourceStatus))"}'
[0182] In the dynamic SQL corresponding to the second resource type, the first sentence indicates querying the target upper and lower resources associated with the target resource, and the ninth sentence indicates querying the second association relationship between the target upper and lower resources.
[0183] A4. If the target resource is not the cut-in point resource, inserting the identification information of the cut-in point resource into the dynamic structured query statement; obtaining, from the resource association configuration database, the upper and lower resources associated with the cut-in point resource as the target upper and lower resources and the association relationship of the upper and lower resources as the second association relationship through the dynamic structured query statement.
[0184] Specifically, in order to effectively query the target upper and lower layer resources associated with the target resource, if the target resource is not the entry point resource, the corresponding entry point resource can be first found based on the target resource, and then the identification information of the entry point resource is inserted into the dynamic SQL (such as the dynamic SQL configured according to the second resource type described above) to execute, so that the target upper and lower layer resources associated with the target resource record can be queried from the preset resource association configuration database.
[0185] 6022、with the target upper and lower layer resource as a node, generating a resource service topology graph of the target resource according to the second association relationship.
[0186] Among them, the resource service topology graph takes each resource in the target upper and lower layer resource as a node, and the association relationship between two resources in the target upper and lower layer resource as an edge, to generate the resource service topology graph of the target resource.
[0187] The way of generating the resource service topology graph in step 6022 is similar to the way of generating the system service topology graph in step 204 described above, and specific reference can be made to the related description of step 204 described above, which will not be repeated here.
[0188] Through the above steps 6021-6022, for any resource under a resource type in the system topology graph, a resource service topology graph for displaying the upper or lower layer resources of the resource can be generated.
[0189] 2, read from the preset database. Before step 602, the resource service topology graph of each resource is generated in advance by the way of generating the resource service topology graph in real time in step 1, and stored in the preset database. In step 602, the resource service topology graph associated with the target resource is directly queried and read from the preset database.
[0190] 603, display the resource service topology graph.
[0191] There are many ways to display the resource service topology graph in step 603, including, for example:
[0192] (1) Switching the display page from displaying the system service topology graph to displaying the resource service topology graph obtained in step 602. Jumping from the system service topology graph to the resource service topology graph of the target resource.
[0193] (2) Reduce the display of the system service topology graph in the display page, and display the resource service topology graph obtained in step 602 in the same display page as the system service topology graph.
[0194] The system service topology graph is displayed first in step 601, and a resource service topology graph with resources as the dimension is further generated for the resources under a certain resource type in the system service topology graph, which is displayed in step 603, so as to realize the jump from the system service topology graph to the resource service topology graph with resources as the dimension. In this way, on the one hand, the resource service topology graph with resources as the dimension can further penetrate the upper and lower links of the resources; on the other hand, the system service topology graph with the system as the dimension can improve the business pertinence of the topology graph, and can avoid the problem of too dense resource display. It can be seen that, through the above steps 601-603, the interface display is simplified on the basis of meeting the in-depth demand of the resource association relationship. Since the interface display is simplified for easier viewing and understanding, the time for the user to understand the upper and lower relationship of the resources can be reduced to a certain extent, and the resource management demand of the business scene is met.
[0195] Further, the system service topology graph reflecting the relationship between the resources of different types in the same business system is displayed first, and then the resource service topology graph reflecting the relationship between the associated resources of different types under a certain resource is jumped to, so that the relationship between the resources of a certain business system and the resources of other business systems can be reflected to a certain extent, and the relationship between the resources of a certain business system and the resources of other business systems can be reflected to a certain extent.
[0196] Please refer to Figure 3 , Figure 7 and Figure 8 , in order to facilitate understanding, the following will take an example of forming the edge and node data (i.e. target upper and lower resources and second association relationship) of the resource topology graph in the electronic device, and forming the system service topology graph by the rendering plug-in integrated in the WEB front end to illustrate the generation process of the resource service topology graph. For example, the user can input the system code of the business system to be queried in the WEB front end as the target system code into the electronic device.
[0197] First, the electronic device queries the resources of different types and the aggregation quantity of the resources of different types associated with the target system code in the database, and returns the edge and node data (i.e. the resources of different types and the first association relationship) of the resource topology graph to be generated to the WEB front end according to the resources of different types according to the preset rule. The rendering plug-in for forming the topology graph is integrated in the WEB front end, and the rendering plug-in in the WEB front end will draw a graph according to the edge and node data (i.e. the resources of different types and the first association relationship) returned by the electronic device, form the system service topology graph of the target business system corresponding to the target system code, and display the system service topology graph of the target business system in the WEB front end.
[0198] Then, the WEB front end first displays a first system service topology graph containing the first resource type corresponding to each type of resource. When it is detected that there is a user expansion operation for the first resource type in the first system service topology graph, the WEB front end displays a second system service topology graph containing each resource corresponding to the target resource type (such as the P resource type in (b) of Figure 7 ) in response to the expansion operation for the target resource type in the first system service topology graph. Figure 7
[0199] Then, the user can select a target resource under the resource list of the target resource type (such as clicking the resource icon). At this time, the WEB front end transmits the identification information (i.e., resource sm) of the target resource selected by the user to the electronic device. The electronic device first detects whether the target resource is a cut-in point resource of the second resource type corresponding to the target resource; if the target resource is a cut-in point resource, the identification information (i.e., resource sm) of the target resource is inserted into a preset dynamic structured query statement for execution; if the target resource is not a cut-in point resource, the identification information (i.e., resource sm) of the cut-in point resource is found and inserted into a preset dynamic structured query statement for execution; the edge and node data (i.e., target upper and lower resources and the second association relationship) of the resource topology graph to be generated are found and determined according to the preset rule, and returned to the WEB front end.
[0200] Finally, the rendering plug-in in the WEB front end draws a resource service topology graph with the target resource as the dimension according to the edge and node data (i.e., target upper and lower resources and the second association relationship) returned by the electronic device, and displays the resource service topology graph in the WEB front end.
[0201] In order to better implement the resource topology graph generation method in the embodiments of the present application, on the basis of the resource topology graph generation method, the embodiments of the present application also provide a resource topology graph generation device, as shown in Figure 9 , which is an embodiment structure schematic diagram of the resource topology graph generation device in the embodiments of the present application. The resource topology graph generation device 900 comprises:
[0202] A first acquisition unit 901 is configured to acquire a target system code of a target business system.
[0203] A second acquisition unit 902 is configured to acquire each type of resource associated with the target system code.
[0204] A third acquisition unit 903 is configured to acquire a first association relationship between first resource types corresponding to each type of resource from a preset configuration database.
[0205] The generating unit 904 is configured to generate a system service topology graph of the target business system according to the first association relationship with the first resource type as a node.
[0206] In some embodiments of the present application, the resource topology graph generating apparatus 900 further includes a display unit (not shown in the figure), and after the system service topology graph of the target business system is generated according to the first association relationship with the first resource type as a node, the display unit is specifically configured to:
[0207] display the system service topology graph, wherein the system service topology graph includes a plurality of resources;
[0208] in response to a selection operation on a target resource in the system service topology graph, acquire a resource service topology graph of the target resource;
[0209] display the resource service topology graph.
[0210] In some embodiments of the present application, the display unit is specifically configured to:
[0211] acquire target upper and lower resources associated with the target resource and a second association relationship between the target upper and lower resources;
[0212] generate a resource service topology graph of the target resource according to the second association relationship with the target upper and lower resources as nodes.
[0213] In some embodiments of the present application, the display unit is specifically configured to:
[0214] detect whether the target resource is a cut-in point resource of a second resource type corresponding to the target resource;
[0215] if the target resource is the cut-in point resource, insert identification information of the target resource into a preset dynamic structured query statement;
[0216] acquire, from a preset resource association configuration database, target upper and lower resources of a target resource association record and the second association relationship through the dynamic structured query statement.
[0217] In some embodiments of the present application, the display unit is specifically configured to:
[0218] if the target resource is not the cut-in point resource, insert identification information of the cut-in point resource into the dynamic structured query statement;
[0219] The dynamic structured query statement is used to obtain upper and lower layer resources associated with the cut-in point resource record from the resource association configuration database as the target upper and lower layer resources, and obtain the association relationship of the upper and lower layer resources as the second association relationship.
[0220] In some embodiments of the present application, the display unit is specifically configured to:
[0221] display a first system service topology graph containing the first resource type corresponding to each type of resource;
[0222] In response to an expansion operation for a target resource type in the first system service topology graph, display a second system service topology graph containing each resource corresponding to the target resource type;
[0223] In response to a selection operation for a target resource in the second system service topology graph, obtain a resource service topology graph of the target resource, the target resource being taken from each resource corresponding to the target resource type.
[0224] In some embodiments of the present application, the generation unit 904 is specifically configured to:
[0225] obtain the aggregate number of each type of resource;
[0226] using a rendering plug-in in a preset target terminal, taking the first resource type and the aggregate number as nodes, generate a system service topology graph of the target business system according to the first association relationship.
[0227] In implementation, each of the above units can be implemented as an independent entity, or can be combined as the same or several entities, and the specific implementation of each of the above units can be referred to the method embodiments above, which will not be repeated here.
[0228] Since the resource topology graph generation apparatus can perform the method of the present application as described above, Figure 1 to Figure 8 According to any embodiment of the resource topology graph generation method, the method can achieve the beneficial effects of the present application as described above, Figure 1 to Figure 8 According to the beneficial effects of any embodiment of the resource topology graph generation method, the specific implementation is described above, which will not be repeated here.
[0229] In addition, in order to better implement the resource topology graph generation method in the embodiments of the present application, based on the resource topology graph generation method, the embodiments of the present application also provide an electronic device, which is described in detail in Figure 10 , Figure 10A structural schematic diagram of an electronic device according to an embodiment of the present application is shown. Specifically, the electronic device provided by the embodiment of the present application includes a processor 1001, which is configured to execute a computer program stored in a memory 1002 to implement the functions of the present application. Figure 1 to Figure 8 The processor 1001 is configured to execute a computer program stored in the memory 1002 to implement the functions of the present application. Figure 9 The processor 1001 is configured to execute a computer program stored in the memory 1002 to implement the functions of the present application.
[0230] By way of example, the computer program can be divided into one or more modules / units, one or more modules / units are stored in the memory 1002 and executed by the processor 1001 to complete the embodiments of the present application. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the computer device.
[0231] The electronic device can include, but is not limited to, the processor 1001, the memory 1002. Those skilled in the art can understand that the schematic diagram is only an example of the electronic device and does not constitute a limitation on the electronic device, which can include more or fewer components than the diagram, or combine certain components, or different components, for example, the electronic device can also include an input / output device, a network access device, a bus, etc. The processor 1001, the memory 1002, the input / output device, and the network access device are connected through the bus.
[0232] The processor 1001 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor is the control center of the electronic device, which connects all parts of the electronic device through various interfaces and lines.
[0233] The memory 1002 can be used to store computer programs and / or modules, and the processor 1001 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 1002, and calling data stored in the memory 1002. The memory 1002 can mainly include a program storage area and a data storage area, wherein the program storage area can store operating systems, application programs required by at least one function (such as a sound playing function, an image playing function, etc.), etc.; and the data storage area can store data created according to the use of the electronic device (such as audio data, video data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0234] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the resource topology graph generation apparatus, the electronic device and the corresponding units thereof described above can be referred to as Figure 1 to Figure 8 The description of the method for generating the resource topology graph in any embodiment is not repeated here.
[0235] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by related hardware controlled by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0236] Therefore, the embodiments of the present application provide a computer readable storage medium, which stores a plurality of instructions, the instructions can be loaded by a processor to execute the embodiments of the present application, such as Figure 1 to Figure 8 The specific operations of the steps in the method for generating the resource topology graph in any embodiment can be referred to as Figure 1 to Figure 8 The description of the method for generating the resource topology graph in any embodiment is not repeated here.
[0237] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0238] Due to the instructions stored in the computer readable storage medium, the embodiments of the present application, such as Figure 1 to Figure 8 The specific operations of the steps in the method for generating the resource topology graph in any embodiment can be referred to as Figure 1 to Figure 8The beneficial effects that can be achieved by the method for generating a resource topology graph according to any of the embodiments are described in detail above and will not be repeated here.
[0239] The above describes in detail the method, device, electronic equipment and computer readable storage medium for generating a resource topology graph provided by the embodiments of the present application. The principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method and core idea of the present application. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges will be changed according to the idea of the present application. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method of generating a resource topology graph, characterized by, The method comprises: acquiring a target system code of a target business system; acquiring various types of resources associated with the target system code; from a preset configuration database, acquiring a first association relationship between first resource types corresponding to the various types of resources; taking the first resource types as nodes, generating a system service topology graph of the target business system according to the first association relationship; displaying the system service topology graph, the system service topology graph comprising a plurality of resources; in response to a selection operation on a target resource in the system service topology graph, detecting whether the target resource is a pointcut resource of a second resource type corresponding to the target resource; if the target resource is the pointcut resource, inserting identification information of the target resource into a preset dynamic structured query statement; through the dynamic structured query statement, acquiring target upper and lower layer resources of a target resource association record and a second association relationship between the target upper and lower layer resources from a preset resource association configuration database; taking the target upper and lower layer resources as nodes, generating a resource service topology graph of the target resource according to the second association relationship; displaying the resource service topology graph.
2. The method of claim 1, wherein, The method further comprises: if the target resource is not the pointcut resource, inserting identification information of the pointcut resource into the dynamic structured query statement; through the dynamic structured query statement, acquiring upper and lower layer resources of a pointcut resource association record from the resource association configuration database as the target upper and lower layer resources, and acquiring an association relationship of the upper and lower layer resources as the second association relationship.
3. The method of claim 1, wherein, The displaying of the system service topology graph comprises: displaying a first system service topology graph comprising first resource types corresponding to the various types of resources; in response to an expansion operation on a target resource type in the first system service topology graph, displaying a second system service topology graph comprising various resources corresponding to the target resource type; the selection operation on the target resource in the system service topology graph refers to a selection operation on a target resource in the second system service topology graph; the target resource is taken from the various resources corresponding to the target resource type.
4. The method of claim 1-3, wherein, The taking of the first resource types as nodes and the generating of the system service topology graph of the target business system according to the first association relationship comprises: acquiring an aggregated number of the various types of resources; through a rendering plug-in in a preset target terminal, taking the first resource types and the aggregated number as nodes, and generating the system service topology graph of the target business system according to the first association relationship.
5. An apparatus for generating a resource topology map, the apparatus comprising: The resource topology graph generation apparatus comprises: a first acquisition unit configured to acquire a target system code of a target business system; a second acquisition unit configured to acquire various types of resources associated with the target system code; a third acquisition unit configured to acquire a first association relationship between first resource types corresponding to the various types of resources from a preset configuration database; a generation unit configured to take the first resource types as nodes and generate a system service topology graph of the target business system according to the first association relationship; The display unit is configured to display the system service topology diagram including a plurality of resources; in response to a selection operation on a target resource in the system service topology diagram, it is detected whether the target resource is a point-in-time resource of a second resource type corresponding to the target resource; if the target resource is the point-in-time resource, identification information of the target resource is inserted into a preset dynamic structured query statement; the target upper and lower layer resources of the target resource associated record and the second association relationship between the target upper and lower layer resources are obtained from a preset resource association configuration database through the dynamic structured query statement; the resource service topology diagram of the target resource is generated according to the second association relationship with the target upper and lower layer resources as nodes; and the resource service topology diagram is displayed.
6. An electronic device, comprising: A processor and a memory are included, the memory has a computer program stored therein, and the processor executes the computer program in the memory to perform the resource topology diagram generation method according to any one of claims 1 to 4.
7. A computer readable storage medium characterized by A computer program is stored thereon, and the computer program is loaded by a processor to perform the steps in the resource topology diagram generation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Topology diagram generation method, device, apparatus, and readable storage medium
CN109039786A
Topological map presentation system, topological map presentation method, and computer readable recording medium
US20200336387A1