CN-122027485-A - Method and device for issuing network instruction based on visual topology
Abstract
The application provides a method and a device for issuing a network instruction based on a visual topology, which can intuitively present a topological graph showing the hierarchy and connection relation between resources, so that a user can realize the issuing of the network instruction based on the visual topological graph. The method comprises the steps of obtaining attribute information of each resource node and connection relations between the resource nodes in a first network scene, generating a visual topological graph according to the attribute information of each resource node and the connection relations between the resource nodes and a predefined hierarchical relation rule of the resource node type, wherein the visual topological graph comprises topological nodes representing the resource nodes and connecting lines representing the connection relations between the resource nodes, generating configuration instructions corresponding to the target topological nodes in the visual topological graph in response to configuration operation of a user on the target topological nodes, and sending the configuration instructions to a back-end service to trigger the back-end service to configure the resource nodes corresponding to the target topological nodes according to the configuration instructions.
Inventors
- WANG XIAOJUN
- LIU PENG
- Zhou Tengxiao
Assignees
- 北京神州泰岳软件股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260317
Claims (10)
- 1. A method for issuing network instructions based on a visualization topology, comprising: acquiring attribute information of each resource node in a first network scene, and connecting the resource nodes with each other; Generating a visual topological graph according to attribute information of each resource node and the connection relation between the resource nodes and the predefined hierarchical relation rule of the resource node types, wherein the visual topological graph comprises topological nodes representing the resource nodes and connecting lines representing the connection relation between the resource nodes; responding to configuration operation of a user on a target topological node in the visual topological graph, and generating a configuration instruction corresponding to the target topological node; And sending the configuration instruction to a back-end service to trigger the back-end service to configure a resource node corresponding to the target topology node according to the configuration instruction.
- 2. The method according to claim 1, wherein the attribute information includes resource node types, and the generating the visualized topological graph according to the attribute information of each resource node and the connection relation between the resource nodes and the resource node in combination with the predefined hierarchical relation rule of the resource node types includes: generating a node relation tree representing a logic structure among the resource nodes according to the resource node types of the resource nodes, the connection relation among the resource nodes and the hierarchical relation rule of the predefined resource node types; Determining the position of each topological node in a visual interface according to the node relation tree; And displaying each topological node in the visual interface according to the position of each topological node, and displaying the connection line between the topological nodes based on the connection relation of each node in the node relation tree so as to generate a visual topological graph.
- 3. The method of claim 2, wherein determining the location of each topology node in a visualization interface from the node relationship tree comprises: Dividing the node relationship tree into one or more logical tiles, wherein each logical tile includes nodes on a path from a selected leaf node to an ancestor node of a first owned sibling node of the selected leaf node, and child nodes of each target ancestor node of the selected leaf node other than the selected leaf node, the target ancestor node being the ancestor node of the first owned sibling node of the selected leaf node, the same level of nodes within the same logical tile forming a node group, the nodes contained by different logical tiles being different; Determining a node group with the largest number of nodes in each logic slice as a reference node group; determining whether each logic slice is expandable or not based on the preset number of single-row reference nodes and the number of nodes of the reference node group of each logic slice; Determining the initial layout width of each logic chip correspondingly occupied on the visual interface according to the reference width of the predefined topological node occupied on the visual interface and the node number of the reference node group of each logic chip; Comparing the sum W1 of the initial layout widths corresponding to the logic pieces on the visual interface with the actual width W2 of the visual interface; If W1 is smaller than W2, performing capacity expansion operation on the expandable logic slices, and then determining the positions of the topological nodes corresponding to each logic slice on the visual interface, wherein the capacity expansion operation comprises the steps of increasing the number of single-row nodes of the node group in the logic slice until an end condition is reached; If W1 is greater than W2, determining the positions of the topological nodes corresponding to the logic pieces on the canvas according to the initial layout width corresponding to the logic pieces, and reducing the canvas to adapt to the actual display area of the visual interface, wherein the positions of the topological nodes after the canvas is reduced are the final positions of the topological nodes in the visual interface.
- 4. A method according to claim 3, wherein the end condition is a first condition or a second condition, the first condition is that a sum of layout widths corresponding to the expanded logic slices is greater than W2, and the second condition is that a number of single-row nodes of each expandable logic slice reaches a preset threshold.
- 5. The method according to any one of claims 1-4, further comprising: The interconnection state among all the resource nodes reported by the acquisition service is obtained regularly; And dynamically adjusting the display style of the corresponding connecting line in the visual topological graph according to the interconnection state.
- 6. The method according to any one of claims 1-4, further comprising: Periodically acquiring an alarm message from a resource monitoring service; Determining a resource node in an abnormal state according to the alarm message; Updating the display pattern of the topology node corresponding to the resource node in the abnormal state in the visual topology map to be a preset alarm pattern so as to carry out visual alarm prompt.
- 7. The method according to any one of claims 1-4, wherein the connection line in the visual topological graph is provided with an interaction control for controlling the on-off of a link, and the method further comprises: Responding to the operation of the user on the interaction control, and acquiring a starting resource node and an ending resource node corresponding to the connection; Generating a control instruction for controlling the on-off state of a link between a starting resource node and an ending resource node according to the type of the operation; And sending the control instruction to the back-end service to trigger the back-end service to control the opening or closing of a link between the initial resource node and the end resource node according to the control instruction.
- 8. The method according to any one of claims 1-4, further comprising: Responsive to a user selection operation of a selected topology node in the visual topology map, determining an upstream link and/or a downstream link having a connection relationship with the selected topology node; And updating the visual patterns of the upstream connecting lines and/or the downstream connecting lines corresponding to the selected topological nodes into preset highlighting patterns so as to indicate the connecting paths of the selected topological nodes.
- 9. The method according to any one of claims 1-4, further comprising: responding to the selected operation of a user on a second network scene, and acquiring a stored visual topological graph corresponding to the second network scene and configuration information of each topological node from a database; displaying the visual topological graph corresponding to the second network scene to a user through an interface; Responding to configuration modification operation of a user on the selected topological node in the visual topological graph, and displaying a configuration window of the selected topological node to the user, wherein the configuration window displays initial configuration information of the selected topological node; acquiring modified configuration information input by a user through the configuration window; Generating a latest configuration instruction according to the modified configuration information; And sending the latest configuration instruction to the back-end service to trigger the back-end service to configure the resource node corresponding to the selected topology node according to the latest configuration instruction.
- 10. A device for issuing network instructions based on a visual topology, comprising: The data acquisition module is used for acquiring attribute information of each resource node and the connection relation between the resource nodes in the first network scene; The system comprises a topology map generation module, a resource node type generation module and a resource node type generation module, wherein the topology map generation module is used for generating a visual topology map according to attribute information of each resource node and connection relation between the resource nodes and combining a predefined hierarchical relation rule of the resource node type, and the visual topology map comprises topology nodes representing the resource nodes and connecting lines representing the connection relation between the resource nodes; The instruction generation module is used for responding to the configuration operation of a user on a target topological node in the visual topological graph and generating a configuration instruction corresponding to the target topological node; And the transmission module is used for sending the configuration instruction to the back-end service so as to trigger the back-end service to configure the resource node corresponding to the target topology node according to the configuration instruction.
Description
Method and device for issuing network instruction based on visual topology Technical Field The present application relates to the field of network technologies, and in particular, to a method and an apparatus for issuing a network instruction based on a visual topology. Background With the wide application of cloud computing technology, a cloud management platform (Cloud Management Platform, CMP) has become an important tool for enterprises to perform resource operation, maintenance and management. In the platform, service personnel often need to perform operations such as configuration instruction parameters, instruction issuing and the like on various resources (such as routers, switches, firewalls, servers and the like) so as to realize the deployment, adjustment and maintenance of the resources. At present, a common cloud management platform adopts a management interface based on a resource list on the function of issuing instructions. In the interface, service personnel firstly need to search or screen the resource list according to the resource type, then locate and select target resources in the search result, and finally call the back-end interface to issue instructions by configuring the page filling instruction parameters. However, in the scheme of issuing the instruction, the topological relation between the resources cannot be displayed through the list, so that service personnel cannot intuitively understand the complete path and the influence range of the instruction issuing, and the understanding cost and the error risk of the operation are increased. Therefore, a technical solution capable of issuing network instructions based on a visualization topology is needed. Disclosure of Invention The application provides a method and a device for issuing a network instruction based on a visual topology, which can intuitively present a topological graph showing the hierarchy and connection relation between resources, so that a user can realize the issuing of the network instruction based on the visual topological graph. In a first aspect, a method for issuing a network instruction based on a visual topology is provided, including: acquiring attribute information of each resource node in a first network scene, and connecting the resource nodes with each other; generating a visual topological graph according to attribute information of each resource node and the connection relation between the resource nodes and the predefined hierarchical relation rule of the resource node types, wherein the visual topological graph comprises topological nodes representing the resource nodes and connecting lines representing the connection relation between the resource nodes; responding to configuration operation of a user on a target topological node in the visual topological graph, and generating a configuration instruction corresponding to the target topological node; and sending a configuration instruction to the back-end service to trigger the back-end service to configure the resource node corresponding to the target topology node according to the configuration instruction. In one possible design, the attribute information includes resource node types, and the generating of the visualized topological graph by combining a predefined hierarchical relationship rule of the resource node types according to the attribute information of each resource node and the connection relationship between the resource nodes includes: generating a node relation tree representing a logic structure among the resource nodes according to the resource node types of the resource nodes, the connection relation among the resource nodes and the hierarchical relation rule of the predefined resource node types; Determining the position of each topological node in the visual interface according to the node relation tree; And displaying each topological node in the visual interface according to the position of each topological node, and displaying the connection line between the topological nodes based on the connection relation of each node in the node relation tree so as to generate a visual topological graph. In one possible design, determining a location of each topology node in a visualization interface from a node relationship tree includes: Dividing the node relationship tree into one or more logical tiles, wherein each logical tile includes nodes on paths from a selected leaf node to ancestor nodes of a first owned sibling node of the selected leaf node, and child nodes of each target ancestor node of the selected leaf node other than the selected leaf node, the target ancestor node being ancestor nodes of the first owned sibling node of the selected leaf node, the same level of nodes within the same logical tile forming a node group, the different logical tiles comprising nodes different; Determining a node group with the largest number of nodes in each logic slice as a reference node group; determining whether each logic slice is exp