Network topology multi-dimensional information display method, device, equipment and storage medium
By using elves to display multi-dimensional information of network topology in three-dimensional space and fixed the position of the display icon in the texture map, the problem of node information not corresponding to viewing angle switching is solved, and the stability of information display is improved.
Patent Information
- Application Number
- CN202111492138.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-12-08
AI Technical Summary
When displaying network topology in three-dimensional space, viewing angle switching causes node information to not correspond to nodes, causing confusion in the display of multi-dimensional information.
By using elves as the presentation subject to display multi-dimensional information, elves are placed in the three-dimensional space to display node information and include display icons in the texture map to ensure that the position of the display icon is fixed and consistent with the node position.
The correspondence between node information and nodes after viewing angle switching is ensured, the stability of multi-dimensional information display is improved, and information occlusion and chaos are avoided.
Smart Images

Figure CN114140556B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer processing technology, and in particular to a method, device, equipment and storage medium for displaying multi-dimensional information of network topology. Background Art
[0002] With the continuous development of network technology, the scale and complexity of the Internet have increased dramatically, and the information content it carries is also increasing. Therefore, it is also necessary for network topology to present more comprehensive topological information so that the presented topological information can be used to conduct a more comprehensive analysis of the network topology. The traditional method of displaying multi-dimensional information of network topology is based on a two-dimensional plane, and the node information is arranged around the node. However, when there are a large number of nodes in the topology and more topological information needs to be displayed, the two-dimensional plane will have problems such as node congestion and information occlusion.
[0003] To address this problem, a vertical dimension is currently added to the two-dimensional plane to obtain a three-dimensional space. By displaying the network topology in three-dimensional space, the above two-dimensional plane problems can be solved. However, when the perspective of the network topology displayed in the three-dimensional space needs to be switched, the relative position of the node information and the node will change during the perspective switching process, resulting in the problem that the node information does not correspond to the node, thus causing confusion in the display of multi-dimensional information of the network topology. Summary of the invention
[0004] Based on the problem that the perspective switching of the network topology in the existing three-dimensional space leads to the mismatch between node information and nodes, the embodiments of the present invention provide a method, device, equipment and storage medium for displaying multi-dimensional information of network topology, which can ensure the correspondence between node information and nodes during the perspective switching process, and improve the stability of multi-dimensional information display.
[0005] In a first aspect, an embodiment of the present invention provides a method for displaying multi-dimensional information of a network topology, including:
[0006] In response to the multi-dimensional information display instruction, determine the information dimension required to be displayed for each node in the network topology;
[0007] For each node, execute:
[0008] Get a number of sprites equal to the number of information dimensions that the node needs to display, and place each sprite at the coordinate position of the node;
[0009] Determine the state of the node in each dimension and obtain the material of the corresponding state; wherein the texture map used to load the material contains a display icon of the corresponding state, and the display icon is located at a set relative position to the center of the texture map, and the set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen;
[0010] The obtained materials are assigned one by one to each sprite placed at the coordinate position of the node, so that the sprite can be used to display the information of the corresponding dimension.
[0011] Preferably, before obtaining the material corresponding to the state, the method further includes: constructing a material library for dimensions corresponding to a fixed range of states in advance, wherein the material library stores materials corresponding to different states under corresponding dimensions;
[0012] The method of obtaining the material of the corresponding state includes: determining whether the state of the current dimension corresponds to a fixed range, and if so, obtaining the material of the corresponding state of the current dimension from the material library; otherwise, using the state of the current dimension as a display icon, generating a corresponding texture map, and loading the texture map to form the material of the corresponding state.
[0013] Preferably, after the texture map is loaded to form a material of a corresponding state, the method further comprises:
[0014] Determine if there is currently an unused state corresponding to a non-fixed range of materials. If so, delete the material.
[0015] Preferably, it also includes:
[0016] In response to the node layer display instruction, determine the target node attribute corresponding to the node layer to be displayed;
[0017] Determine a presentation subject for displaying the node layer according to the target node attribute;
[0018] Determine the attribute value of each node in the network topology corresponding to the attribute of the target node, and determine the material corresponding to the attribute value;
[0019] The node layer of each node is displayed according to the material of the corresponding attribute value and the determined presentation subject.
[0020] Preferably, determining a presentation subject for displaying a node layer according to the target node attribute includes:
[0021] Determine whether the target node attribute is a variable attribute;
[0022] If the target node attribute is a variable attribute, determining that the presentation subject is a sprite;
[0023] If the target node attribute is an immutable attribute, it is determined that the presentation subject is a particle system.
[0024] Preferably, displaying the node layer of each node according to the material of the corresponding attribute value and the determined presentation subject includes:
[0025] When the determined presentation subject is a particle system, the nodes with the same attribute value are combined into a particle system, and the material corresponding to the same attribute value is assigned to the corresponding particle system; the particle system corresponding to each attribute value is moved into the three-dimensional space to display the node layer of the corresponding node;
[0026] When the determined presentation subject is a sprite, the sprite corresponding to each node is obtained, and the sprite is moved to the coordinate position of the corresponding node in the three-dimensional space, and the material of the corresponding attribute value is assigned to the sprite of the corresponding node to display the node layer of the corresponding node.
[0027] Preferably, it also includes:
[0028] In response to the node layer switching instruction, determining a presentation subject of the node attribute after the switching and a presentation subject of the node attribute before the switching;
[0029] If the presentation subject of the node attribute after switching and the presentation subject of the node attribute before switching are both sprites, then determine the attribute value of each node corresponding to the node attribute after switching, determine the material of the corresponding attribute value, and assign the material of the corresponding attribute value to the sprite of the corresponding node.
[0030] In a second aspect, an embodiment of the present invention further provides a network topology multi-dimensional information display device, including:
[0031] A dimension determination unit, configured to determine, in response to the multi-dimensional information display instruction, the information dimension required to be displayed by each node in the network topology;
[0032] The dimension information display unit is used to execute, for each node, the following steps: obtaining a number of sprites equal to the number of information dimensions that need to be displayed at the node, and placing each sprite at the coordinate position of the node; determining the state of the node in each dimension, and obtaining the material of the corresponding state; wherein the texture map used to load the material contains a display icon of the corresponding state, and the display icon is located at a set relative position to the center of the texture map, and the set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen; assigning the obtained materials one by one to each sprite placed at the coordinate position of the node, so as to use the sprite to display the information of the corresponding dimension.
[0033] In a third aspect, an embodiment of the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.
[0034] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.
[0035] The embodiments of the present invention provide a method, device, equipment and storage medium for displaying multi-dimensional information of a network topology. A sprite is used as a presentation subject for displaying multi-dimensional information, so that after the perspective of the network topology is switched, the displayed multi-dimensional information can always face the screen. The texture map loaded to form a material needs to contain a display icon corresponding to the information to be displayed, and the display icon is the display information. By setting the display icon at a set relative position to the center of the texture map, after the texture map is loaded to form a material and the material is assigned to the sprite, since the position of the sprite is the same as the position of the node, the relative position of the display icon when displayed by the sprite and the node position is also the set relative position. In this way, even if the perspective of the network topology is switched, since the position of the sprite is the same as the position of the node and the position of the display icon on the texture map is fixed, the display icon and the node remain relatively still, thereby improving the stability of the display of multi-dimensional information. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 This is a flow chart of a method for displaying multi-dimensional information of network topology provided by an embodiment of the present invention;
[0038] Figure 2 This is a schematic diagram of node display content provided by an embodiment of the present invention;
[0039] Figure 3 is a schematic diagram of a cut image provided by an embodiment of the present invention;
[0040] Figure 4 This is a flow chart of a node layer display method provided by an embodiment of the present invention;
[0041] Figure 5is a hardware architecture diagram of a computing device provided by an embodiment of the present invention;
[0042] Figure 6 It is a structural diagram of a network topology multi-dimensional information display device provided by an embodiment of the present invention;
[0043] Figure 7 It is a structural diagram of another network topology multi-dimensional information display device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0045] As mentioned above, by displaying the network topology in three-dimensional space, the problems of node crowding and information occlusion in the two-dimensional plane can be solved. However, when the network topology displayed in the three-dimensional space needs to be rotated, the visual effect between the node information and the nodes will deviate during the rotation process, resulting in the problem that the node information does not correspond to the node. In the topological display effect of the three-dimensional space, after the network topology is rotated and translated, the nodes and node information displayed in the network topology will be displayed from different angles according to the change of the perspective, similar to the shooting scene in real life, the camera shoots objects from different angles, and the final effect presented in the photo is different. Therefore, for the displayed nodes and node information, when the perspective changes, the visual effect between the nodes and the node information will deviate. For a large number of nodes and a large amount of node information in the network topology, it is difficult to distinguish which node information corresponds to which node, resulting in confusion in the multi-dimensional information display of the network topology.
[0046] Based on the problem of displaying multi-dimensional information of network topology in the above three-dimensional space, if it is necessary to ensure that when the perspective of the network topology is switched, the nodes and node information can always face the screen, and the relative positions of the nodes and node information in the two-dimensional plane facing the screen can be kept consistent, then the correspondence between the nodes and node information can be guaranteed during the perspective switching process. In view of these features, you can consider using sprites to display nodes and node information.
[0047] The specific implementation of the above concept is described below.
[0048] Please refer to Figure 1The embodiment of the present invention provides a method for displaying multi-dimensional information of network topology, the method comprising:
[0049] Step 100, in response to the multi-dimensional information display instruction, determining the information dimension required to be displayed for each node in the network topology;
[0050] Step 102, for each node, execute: obtain a number of sprites equal to the number of information dimensions that need to be displayed at the node, and place each sprite at the coordinate position of the node; determine the state of the node in each dimension, and obtain the material of the corresponding state; wherein the texture map used to load the material contains a display icon of the corresponding state, and the display icon is located at a set relative position to the center of the texture map, and the set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen; assign the obtained materials one by one to each sprite placed at the coordinate position of the node, so as to use the sprite to display the information of the corresponding dimension.
[0051] In an embodiment of the present invention, a sprite is used as a presentation subject for displaying multi-dimensional information, so that the displayed multi-dimensional information of the network topology can always face the screen after the perspective is switched; the texture map loaded to form the material needs to contain a display icon corresponding to the information to be displayed, and the display icon is the display information, and by setting the display icon at a set relative position to the center of the texture map, after the texture map is loaded to form the material and the material is assigned to the sprite, since the position of the sprite is the same as the position of the node, the relative position of the display icon when displayed by the sprite and the node position is also the set relative position; in this way, even if the perspective of the network topology is switched, since the position of the sprite is the same as the position of the node, and the position of the display icon on the texture map is fixed, the display icon and the node remain relatively still, so the visual effect will not change, so that the display icon and the node maintain the original corresponding relationship, thereby improving the stability of the multi-dimensional information display.
[0052] Described below Figure 1 How the various steps are performed.
[0053] In the description Figure 1 Before describing the execution methods of the various steps shown, the network topology in this embodiment is described.
[0054] The display content in the network topology may include: node layer and node information. Among them, the node layer refers to the display layer used to characterize the node. The node layer can display different layers according to different node attributes, and each display only displays one node attribute. For example, the node attribute can be device type, security level, operating system, etc.; while the node information refers to the information displayed in multiple dimensions around the node. The number of dimensions of the information displayed at the same time can be set according to the specific situation. For example, the following dimensions of information can be displayed around a node: IP address, alarm information, firewall status, etc.
[0055] First, for step 100, in response to the multi-dimensional information display instruction, the information dimension required to be displayed by each node in the network topology is determined.
[0056] When the network topology is initially started, the default display content can be set, such as only displaying the node layer in the network topology, or displaying the node layer in the network topology and information of several dimensions.
[0057] The multi-dimensional information display instruction may carry the information dimensions required to be displayed. Since different nodes correspond to different device types, the information dimensions required to be displayed by different nodes may be different. Therefore, it is necessary to determine the information dimensions required to be displayed by each node in the network topology.
[0058] Then, for step 102, for each node, the following steps S1-S3 are performed:
[0059] S1. Obtain a number of sprites equal to the number of information dimensions that the node needs to display, and place each sprite at the coordinate position of the node.
[0060] For example, if the number of dimensions of information that the node needs to display is three, then three sprites need to be obtained for the node, and one sprite is required to display each dimension of information. The three sprites obtained are placed at the coordinate position of the node.
[0061] Among them, node attributes, node information, node coordinate positions, etc. can all be obtained through network topology data.
[0062] In this embodiment, the network topology data structure may be in json format. Exemplarily, the network topology data may include the following contents (the covered contents are partial contents):
[0063] nodes:{
[0064] Node unique identifier: [
[0065] Node name,
[0066] Device type (router, switch, host, server, etc.),
[0067] [X value, Y value, Z value] (node three-dimensional coordinate position) ]
[0069] }
[0070] lines:
[0071] Line segment unique identifier: [
[0072] A unique identifier of a node.
[0073] Another node unique identifier
[0074] ](Indicates that these two nodes are connected)
[0075] }
[0076] or
[0077] Device Type: [
[0078] [Node unique identifier, X value, Y value, Z value, [connected node list] ]
[0080] S2. Determine the state of the node in each dimension and obtain the material of the corresponding state; wherein the texture map used to load the material contains a display icon of the corresponding state, and the display icon is located at a set relative position to the center of the texture map, and the set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen.
[0081] For example, for the information dimension of firewall, its status can be open or closed. Therefore, in each dimension, different states have different materials.
[0082] Among them, each dimension information is displayed around the node layer. When the number of dimensions is large, in order to ensure that each dimension information is not blocked during display, the corresponding display position can be set in advance for different dimension information.
[0083] In one embodiment of the present invention, corresponding cut-pictures can be generated in advance for different states of each dimension, and then texture maps corresponding to the cut-pictures are generated. The cut-pictures contain display icons of corresponding states, such as when the firewall state is on, the display icon is green and bright, and when the firewall state is off, the display icon is gray and dark. Therefore, two cut-pictures need to be generated for the firewall dimension, and the display icon is located at a set relative position to the center of the cut-picture. The set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen. After the texture map corresponding to the cut-picture is generated in this way, it can be ensured that the texture map is consistent with the display content of the cut-picture.
[0084] For example, see Figure 2 , Figure 2 The number 0 is the node layer, and the numbers 1-10 are the 10 dimensions of node information displayed around the node. For the 9th dimension, the information of this dimension is on the upper right side of the node. Therefore, when generating a cut map for different states of this dimension, the display icon needs to be located on the upper right side of the node center. For the corresponding cut map, please refer to Figure 3 .
[0085] Preferably, the dimensions of the information displayed around the same node are cut in equal sizes. When the cut sizes are equal, before the perspective is switched, in the two-dimensional plane facing the screen, the relative positions of the different dimensions of information displayed on the same node are what they are. After the perspective is switched, the positional relationship between the two does not change in the visual effect, and it can be seen that the display icons between different dimensions are relatively static. Therefore, no matter how the perspective is switched, there will be no occlusion or overlap between the information on different dimensions.
[0086] In one embodiment of the present invention, before obtaining the material corresponding to the state in this step, the following step may be performed: pre-building a material library for the dimension corresponding to the state in a fixed range, wherein the material library stores materials corresponding to different states under the corresponding dimension. For example, the fixed range corresponding to the firewall state includes two states: open and closed, and the fixed range corresponding to the security level state may include level one, level two, level three, etc.
[0087] Then this step obtains the material of the corresponding state, including: determining whether the state of the current dimension corresponds to a fixed range, if so, obtaining the material of the corresponding state of the current dimension from the material library; otherwise, using the state of the current dimension as a display icon, generating a corresponding texture map, and loading the texture map to form the material of the corresponding state.
[0088] By pre-building a material library, when you need to obtain the material of the corresponding state, you can directly obtain it from the material library without re-creating it, which can improve the display speed of information in each dimension.
[0089] Since there is a special dimension in each dimensional information, such as Figure 2 The information of the first dimension is the IP address. Since each node has a different state in the dimension of the IP address, the state of the IP address is the IP of the node. It can be seen that the IP address has no fixed range. If the cut graph of each IP address is generated by exhaustive method and the corresponding material is stored, a large amount of storage space will be occupied, and most of the materials cannot be used, resulting in a waste of resources. For example, a certain dimension is the person in charge. When the state of this dimension is different, the person in charge is different. It can be seen that it is impossible to use exhaustive method to generate the cut graph of each person in charge.
[0090] Therefore, for the dimension that does not correspond to a fixed range, the state can be used as a display icon to generate the corresponding texture map during the display process, and then loaded to form the material of the corresponding state. Since the cut map of the state cannot be generated in advance during the display process, the state can be directly generated as a texture map, and then loaded to form the material, which can increase the speed of material loading.
[0091] S3. Assign the acquired materials one by one to each sprite placed at the coordinate position of the node, so as to use the sprite to display the information of the corresponding dimension.
[0092] Since each sprite is located at the coordinate position of the node, the material corresponding to each dimension can be assigned to each sprite one by one to display the corresponding dimension information.
[0093] In one embodiment of the present invention, when a node has many information dimensions and there is insufficient space around the node, the dimension information can be replaced. For example, the display icon of the first dimension and the display icon of the second dimension are located at the same position. If the display icon of the first dimension needs to be displayed, the display icon of the second dimension is hidden, and vice versa.
[0094] When different nodes display information of the same dimension, if the states corresponding to the same dimension are the same, the sprites on the different nodes can use the same material, thus avoiding the waste of resources of duplicate materials.
[0095] In one embodiment of the present invention, when it is necessary to switch the displayed information dimension, it is only necessary to change the material of the sprite of the changed dimension. For example, a node currently displays 5 dimensions, and it is necessary to switch, that is, switch the 4th dimension to the 6th dimension, and hide the 5th dimension. Then, the material of the 6th dimension can be assigned to the sprite 4, and the sprite corresponding to the 5th dimension can be moved out of the 3D space, thus completing the switching of the information dimension.
[0096] Preferably, after the sprite is removed, it can be stored in the sprite library, so that the next time the sprite is needed, it does not need to be recreated, and the sprite in the sprite library can be used to change the material for display.
[0097] Furthermore, since materials with non-fixed ranges of states can hardly be shared, in one embodiment of the present invention, it is also possible to determine whether there are currently unused materials with non-fixed ranges of states corresponding to them. If so, the materials are deleted, thereby releasing the resources occupied by such materials.
[0098] The above completes the display method of the multi-dimensional information of the node. After the network topology is started, the node layer used to characterize the node needs to be displayed. Therefore, the display method of the node layer is further explained below.
[0099] According to the above description, when the network topology is initially started, the default display content can be set, such as only displaying the node layer in the network topology, or displaying the node layer in the network topology and information of several dimensions. Among them, the node layer can be displayed according to the node attributes set by default. Considering that the node attribute of the device type is deterministic and not easy to change, and other node attributes such as operating system and security level will change with the network environment, device conditions, etc., other attributes can be obtained synchronously when the user performs related operations to ensure real-time performance. Therefore, it is preferred that the node layer displays the device type by default. It can be seen that in one embodiment of the present invention, when the topology editing software is started, the node layer display process can also be included. Please refer to Figure 4 , a flowchart of the method is displayed for the node layer, specifically:
[0100] Step 400, in response to the node layer display instruction, determine the target node attribute corresponding to the node layer to be displayed.
[0101] Based on the above introduction, we can know that the node layer refers to the display layer used to represent the node, and the node layer can display different layers according to different node attributes, and each display only displays one node attribute. Among them, the node attributes of the node can include n (n is an integer not less than 1), and the target node attribute can be any one of the n node attributes, such as any one of the device type, security level and operating system.
[0102] Step 402: Determine a presentation subject for displaying the node layer according to the target node attribute.
[0103] In the topology display effect, the network topology can be rotated and translated to change the display perspective. During the perspective conversion process, not only can the entire topology structure be observed from a macro perspective, but the node layer used to represent the nodes must also be displayed clearly. Therefore, the node layer must always face the screen.
[0104] Based on this problem, in one embodiment of the present invention, a sprite in a three-dimensional object can be used as a presentation subject for displaying a node layer. Since a sprite is a plane that always faces the screen, the node layer can always face the screen during the perspective conversion process.
[0105] When using sprites as the presentation subject for displaying node layers, each node in the network topology needs to use a sprite. Therefore, if the network topology includes m (m is a positive integer) nodes, m sprites are needed to display the node layers of the corresponding nodes respectively. The position of the sprite is the coordinate position of the corresponding node in three-dimensional space.
[0106] Preferably, in one embodiment of the present invention, in order to save performance, different presentation subjects can be used for different node attributes in this step 402. Specifically, it is determined whether the target node attribute is a variable attribute; if the target node attribute is a variable attribute, the presentation subject is determined to be a sprite; if the target node attribute is an immutable attribute, the presentation subject is determined to be a particle system.
[0107] Whether a node attribute is a variable attribute can be determined based on whether the attribute will change. For example, when the node attribute is the device type, the device type can include host, server, switch, router, etc. It can be seen that the device type is determined based on hardware. Therefore, once the device type of a device is determined, it will not change. In this case, when the node attribute is the device type, the node attribute is an immutable attribute. For another example, when the node attribute is the operating system, the operating system can include Linux, Windows 9, Windows 10, Mac, etc. It can be seen that the operating system is determined based on software. Therefore, once the operating system of a device is determined, it will usually be replaced with other operating systems according to needs. In this case, when the node attribute is the operating system, the node attribute is a variable attribute.
[0108] If the target node attribute is an immutable attribute, the particle system can be used as the presentation subject for the nodes with the same attribute value as the corresponding target node attribute in the network topology. Among them, the particle system is composed of several nodes as a particle, which has the characteristics of group and unity. Therefore, using the particle system to present the node layer for immutable attributes can reduce the amount of calculation, save performance, and increase the display speed of the node layer.
[0109] If the target node attribute is a variable attribute, such as the operating system, it may change at any time. If the particle system is used as the presentation subject, when the operating system of a node changes, the particle system needs to be adjusted, which requires a lot of calculation. Therefore, for variable attributes, sprites are used as the presentation subject.
[0110] Step 404, determining the attribute value of each node in the network topology corresponding to the target node attribute, and determining the material corresponding to the attribute value.
[0111] For the same node attribute, when its attribute value is different, the material used is also different. The material is used to characterize the appearance of the node layer. For example, when the device type is a host and a server, different appearances can be used to distinguish them.
[0112] Among them, the attribute value of each node in the network topology corresponding to the target node attribute can be determined according to the network topology data.
[0113] Among them, materials with different attribute values can be formed based on the texture map corresponding to the attribute value. Among them, the display content of the node layer is located at the center of the texture map. In this way, when displaying, it can be ensured that the node layer is located at the coordinate position of the corresponding node.
[0114] Preferably, for the same attribute value of the same node attribute, a material can be generated, without generating a material for each node, which can reduce the space occupancy of the material, reduce computing performance, and increase the speed of material generation.
[0115] More preferably, these materials can be saved after being generated, so that when the network topology switches node properties, the corresponding materials can be quickly obtained, further improving the display speed.
[0116] Step 406 , displaying the node layer of each node according to the material of the corresponding attribute value and the determined presentation subject.
[0117] The following describes step 406 when the presentation subject is a sprite and a particle system respectively.
[0118] 1. The subject presented is a sprite.
[0119] When the presentation subject is a sprite, this step 406 may include: obtaining the sprite corresponding to each node, and moving the sprite to the coordinate position of the corresponding node in the three-dimensional space, assigning the material of the corresponding attribute value to the sprite of the corresponding node to display the node layer of the corresponding node.
[0120] Among them, a sprite library can be built in advance. When the network topology needs to be displayed, the sprite can be directly obtained from the sprite library without having to recreate it when receiving the display instruction, which saves a lot of time and improves the display speed.
[0121] 2. The main body presented is a particle system.
[0122] When the presentation subject is a particle system, this step 406 may include: combining nodes with the same attribute values into a particle system, and assigning materials corresponding to the same attribute values to the corresponding particle systems; moving the particle systems corresponding to each attribute value into three-dimensional space to display the node layer of the corresponding node.
[0123] In this step, the attribute values can be grouped first, and the same attribute values can be grouped into one group, and a particle system can be generated for each group. Among them, when the nodes with the same attribute values are combined into a particle system, it can specifically include: for a group, the nodes with the same attribute values in the group are respectively created as points of the particle system, and these points are stored in a geometric body, and the position in the geometric body is the same as the position of the corresponding node of the point in the three-dimensional space, so that a particle system can be obtained, and the material corresponding to the attribute value is assigned to the particle system, so that each point in the particle system is the same node layer. The particle systems corresponding to each attribute value are all moved into the three-dimensional space. Since the position of each point in the particle system is the same as the position of the corresponding node in the three-dimensional space, these particle systems can accurately display each node layer at the corresponding node position.
[0124] In one embodiment of the present invention, the node layer that has been displayed may also be switched, specifically, including: in response to the node layer switching instruction, determining the presentation subject of the node attribute after the switching and the presentation subject of the node attribute before the switching;
[0125] Different presentation subjects can be used based on different node attributes. Presentation subjects can include sprites and particle systems. Therefore, there are four situations in which the presentation subject of the node attribute after switching and the presentation subject of the node attribute before switching are different:
[0126] Case 1: The presentation subject of the node attribute after switching and the presentation subject of the node attribute before switching are both sprites;
[0127] Case 2: The presentation subject of the node attribute after switching and the presentation subject of the node attribute before switching are both sprites;
[0128] Case 3: After the switch, the presentation subject of the node attributes is the sprite, and before the switch, the presentation subject of the node attributes is the particle system;
[0129] Case 4: After the switch, the presentation subject of the node attributes is the particle system, and before the switch, the presentation subject of the node attributes is the sprite.
[0130] The switching process of the node layer is described below for the above four situations respectively.
[0131] In case one, if the presentation subject of the node attribute after switching and the presentation subject of the node attribute before switching are both sprites, the attribute value of each node corresponding to the node attribute after switching is determined, and the material of the corresponding attribute value is determined, and the material of the corresponding attribute value is assigned to the sprite of the corresponding node.
[0132] Since the sprites are used as the main body for presentation before and after the switch, there is no need to move the sprites out of the three-dimensional space. You can achieve fast switching by simply changing the material assigned to the sprites. And sharing the same set of sprites can further save performance.
[0133] In the second case, even if the particle system is used as the presentation subject before and after the switch, all nodes in the same particle system have different attribute values after the node attribute changes. Therefore, the material cannot be changed directly, but the current particle system needs to be moved out of the three-dimensional space, and then the particle system after the node attribute is switched needs to be moved into the three-dimensional space. For example, when the node attribute is the device type, both node A and node B are hosts, so the combined particle system is the particle system corresponding to the attribute value host. When the node attribute is switched to other node attributes, the attribute values of node A and node B are different. It can be seen that node A and node B belong to different particle systems.
[0134] In case 3 and case 4, since the presentation subject before and after the switch has changed, it is necessary to move the presentation subject before the switch out and move the presentation subject after the switch in, so as to realize the switching of the node layer.
[0135] The above completes the description of the node layer display method.
[0136] like Figure 5 , Figure 6 As shown, an embodiment of the present invention provides a device for displaying multi-dimensional information of network topology. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 5 As shown, it is a hardware architecture diagram of a computing device where a network topology multi-dimensional information display device provided by an embodiment of the present invention is located, except Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown in the figure, the computing device in which the device is located in the embodiment may also generally include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 6 As shown, as a device in a logical sense, the CPU of the computing device in which it is located reads the corresponding computer program in the non-volatile memory into the memory and runs it. This embodiment provides a network topology multi-dimensional information display device, including:
[0137] A dimension determination unit 601 is used to determine the information dimension required to be displayed for each node in the network topology in response to the multi-dimensional information display instruction;
[0138] The dimension information processing and display unit 602 is used to execute, for each node, the following steps: obtaining a number of sprites equal to the number of information dimensions that need to be displayed at the node, and placing each sprite at the coordinate position of the node; determining the state of the node in each dimension, and obtaining the material of the corresponding state; wherein the texture map used to load the material contains a display icon of the corresponding state, and the display icon is located at a set relative position to the center of the texture map, and the set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen; assigning the obtained materials one by one to each sprite placed at the coordinate position of the node, so as to use the sprite to display the information of the corresponding dimension.
[0139] In one embodiment of the present invention, the dimension information processing and display unit 602 is further used to construct a material library in advance for dimensions corresponding to a fixed range of states, and the material library stores materials corresponding to different states under the corresponding dimensions;
[0140] When obtaining the material of the corresponding state, the dimensional information processing and display unit 602 is specifically used to determine whether the state of the current dimension corresponds to a fixed range. If so, the material of the corresponding state of the current dimension is obtained from the material library; otherwise, the state of the current dimension is used as a display icon, a corresponding texture map is generated, and the texture map is loaded to form the material of the corresponding state.
[0141] In one embodiment of the present invention, the dimension information processing and display unit 602 is further used to determine whether there is currently an unused state corresponding to a non-fixed range of materials, and if so, delete the material.
[0142] In one embodiment of the present invention, please refer to Figure 7 The network topology multi-dimensional information display device may also include:
[0143] The node layer processing and display unit 603 is used to respond to the node layer display instruction, determine the target node attribute corresponding to the node layer to be displayed; determine the presentation subject for displaying the node layer according to the target node attribute; determine the attribute value of each node in the network topology corresponding to the target node attribute, and determine the material of the corresponding attribute value; display the node layer of each node according to the material of the corresponding attribute value and the determined presentation subject.
[0144] In one embodiment of the present invention, when the node layer processing and display unit 603 determines the presentation subject for displaying the node layer according to the target node attribute, it is specifically used to determine whether the target node attribute is a variable attribute; if the target node attribute is a variable attribute, the presentation subject is determined to be a sprite; if the target node attribute is an immutable attribute, the presentation subject is determined to be a particle system.
[0145] In one embodiment of the present invention, when the node layer processing and display unit 603 displays the node layer of each node according to the material of the corresponding attribute value and the determined presentation subject, it is specifically used to: when the determined presentation subject is a particle system, combine nodes with the same attribute values into a particle system, and assign the material corresponding to the same attribute value to the corresponding particle system; move the particle systems corresponding to each attribute value into a three-dimensional space to display the node layer of the corresponding node; when the determined presentation subject is a sprite, obtain the sprite corresponding to each node, move the sprite to the coordinate position of the corresponding node in the three-dimensional space, and assign the material of the corresponding attribute value to the sprite of the corresponding node to display the node layer of the corresponding node.
[0146] In one embodiment of the present invention, the node layer processing and display unit 603 is also used to respond to the node layer switching instruction to determine the presentation subject of the node attributes after the switching and the presentation subject of the node attributes before the switching; if the presentation subject of the node attributes after the switching and the presentation subject of the node attributes before the switching are both sprites, then determine the attribute value of each node corresponding to the node attribute after the switching, and determine the material of the corresponding attribute value, and assign the material of the corresponding attribute value to the sprite of the corresponding node.
[0147] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a network topology multi-dimensional information display device. In other embodiments of the present invention, a network topology multi-dimensional information display device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0148] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.
[0149] An embodiment of the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a method for displaying multi-dimensional information of a network topology in any embodiment of the present invention is implemented.
[0150] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a method for displaying multi-dimensional information of a network topology in any embodiment of the present invention.
[0151] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.
[0152] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0153] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.
[0154] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0155] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0156] Each embodiment of the present invention has at least the following beneficial effects:
[0157] 1. In one embodiment of the present invention, a sprite is used as a presentation subject for displaying multi-dimensional information, so that after the perspective of the network topology is switched, the displayed multi-dimensional information can always face the screen; the texture map loaded to form the material needs to contain a display icon corresponding to the information to be displayed, and the display icon is the display information, and by setting the display icon at a set relative position to the center of the texture map, after the texture map is loaded to form the material and the material is assigned to the sprite, since the position of the sprite is the same as the position of the node, the relative position of the display icon when displayed by the sprite and the node position is also the set relative position; in this way, even if the perspective of the network topology is switched, since the position of the sprite is the same as the position of the node and the position of the display icon on the texture map is fixed, the display icon and the node remain relatively still, thereby improving the stability of the display of the multi-dimensional information.
[0158] 2. In one embodiment of the present invention, by making the cut-picture sizes of the dimensional information displayed around the same node equal, before the perspective is switched, the relative positions of the different dimensional information displayed on the same node in the two-dimensional plane facing the screen will not change after the perspective is switched. It can be seen that the display icons between different dimensions are relatively static. Therefore, no matter how the perspective is switched, there will be no occlusion or overlap between the information on different dimensions.
[0159] 3. In one embodiment of the present invention, for dimensions whose states correspond to non-fixed ranges, since their materials can hardly be shared, materials for this type of dimensional states can be generated during the display process, and when the materials for the states corresponding to non-fixed ranges are not used, the materials for the states corresponding to non-fixed ranges can be deleted to release the occupied resources.
[0160] 4. In one embodiment of the present invention, a sprite is used as the presentation subject for variable attributes, and a particle system is used as the presentation subject for immutable attributes, thereby reducing the amount of calculation, saving performance, and increasing the display speed of the node layer.
[0161] 5. In one embodiment of the present invention, when the node layer is switched, if the presentation subjects used before and after the switch are both sprites, there is no need to move the sprites out. It is only necessary to assign the sprites the materials corresponding to the node attributes after the switch. By sharing the sprites, not only can performance be saved, but also the switching speed can be improved.
[0162] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.
[0163] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for displaying multi-dimensional information of network topology, characterized in that: include: In response to the multi-dimensional information display instruction, determine the information dimension required to be displayed for each node in the network topology; For each node, execute: Get a number of sprites equal to the number of information dimensions that the node needs to display, and place each sprite at the coordinate position of the node; Determine the state of the node in each dimension and obtain the material of the corresponding state; wherein the texture map used to load the material contains a display icon of the corresponding state, and the display icon is located at a set relative position to the center of the texture map, and the set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen; The obtained materials are assigned one by one to each sprite placed at the coordinate position of the node, so that the sprite can be used to display the information of the corresponding dimension.
2. The method according to claim 1, characterized in that: Before obtaining the material corresponding to the state, the method further includes: constructing a material library for dimensions corresponding to a fixed range of states in advance, wherein the material library stores materials corresponding to different states under the corresponding dimensions; The method of obtaining the material of the corresponding state includes: determining whether the state of the current dimension corresponds to a fixed range, and if so, obtaining the material of the corresponding state of the current dimension from the material library; otherwise, using the state of the current dimension as a display icon, generating a corresponding texture map, and loading the texture map to form the material of the corresponding state.
3. The method according to claim 2, characterized in that After the texture map is loaded to form a material of a corresponding state, the method further includes: Determine if there is currently an unused state corresponding to a non-fixed range of materials. If so, delete the material.
4. The method according to any one of claims 1 to 3, characterized in that: Also includes: In response to the node layer display instruction, determine the target node attribute corresponding to the node layer to be displayed; Determine a presentation subject for displaying the node layer according to the target node attribute; Determine the attribute value of each node in the network topology corresponding to the attribute of the target node, and determine the material corresponding to the attribute value; The node layer of each node is displayed according to the material of the corresponding attribute value and the determined presentation subject.
5. The method according to claim 4, characterized in that The determining, according to the target node attribute, a presentation subject for displaying the node layer comprises: Determine whether the target node attribute is a variable attribute; If the target node attribute is a variable attribute, determining that the presentation subject is a sprite; If the target node attribute is an immutable attribute, it is determined that the presentation subject is a particle system.
6. The method according to claim 5, characterized in that The displaying of the node layer of each node according to the material of the corresponding attribute value and the determined presentation subject includes: When the determined presentation subject is a particle system, the nodes with the same attribute value are combined into a particle system, and the material corresponding to the same attribute value is assigned to the corresponding particle system; the particle system corresponding to each attribute value is moved into the three-dimensional space to display the node layer of the corresponding node; When the determined presentation subject is a sprite, obtain the sprite corresponding to each node, move the sprite to the coordinate position of the corresponding node in the three-dimensional space, assign the material of the corresponding attribute value to the sprite of the corresponding node to display the node layer of the corresponding node.
7. The method according to claim 6, characterized in that Also includes: In response to the node layer switching instruction, determining a presentation subject of the node attribute after the switching and a presentation subject of the node attribute before the switching; If the presentation subject of the node attribute after switching and the presentation subject of the node attribute before switching are both sprites, then determine the attribute value of each node corresponding to the node attribute after switching, determine the material of the corresponding attribute value, and assign the material of the corresponding attribute value to the sprite of the corresponding node.
8. A network topology multi-dimensional information display device, characterized in that: include: A dimension determination unit, configured to determine, in response to the multi-dimensional information display instruction, the information dimension required to be displayed by each node in the network topology; The dimension information display unit is used to execute, for each node, the following steps: obtaining a number of sprites equal to the number of information dimensions that need to be displayed at the node, and placing each sprite at the coordinate position of the node; determining the state of the node in each dimension, and obtaining the material of the corresponding state; wherein the texture map used to load the material contains a display icon of the corresponding state, and the display icon is located at a set relative position to the center of the texture map, and the set relative position is the relative display position of the information of the dimension and the node in the two-dimensional plane facing the screen; assigning the obtained materials one by one to each sprite placed at the coordinate position of the node, so as to use the sprite to display the information of the corresponding dimension.
9. A computing device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Equipment information processing method and device, terminal equipment and storage medium
CN108737179A
Complex network link prediction method and device, electronic equipment and medium
CN112700056A