Network topology map obtaining method, device, computer equipment and readable storage medium

By obtaining the connection attributes and self-attributes of the device, combined with the hierarchical clustering and grouping method, layout information is generated, which solves the problem of poor flexibility of network topology diagrams in the existing technology and achieves more intuitive network structure display and management.

CN118473948BActive Publication Date: 2024-09-10E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410930440.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-10
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

The existing technology has poor flexibility in obtaining network topology diagrams, relies only on the connection attributes of devices, lacks diversity, and is difficult to meet the intuitive display and management needs of complex networks.

Method used

By obtaining the connection attributes and self-attributes of the device, combined with the hierarchical clustering grouping method, layout information is generated, and then the target network topology map is obtained, improving the flexibility and diversity of the topology map.

Benefits of technology

It achieves improved flexibility and diversity when obtaining network topology diagrams, and can more intuitively display and manage complex network structures to meet the various needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118473948B
    Figure CN118473948B
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and readable storage medium for obtaining a network topology map. The method comprises: respectively obtaining the attributes of each device in the target network; the attributes include connection attributes and self attributes; hierarchically clustering and grouping each of the devices based on the connection attributes and the self attributes to obtain layout information; obtaining an initial network topology map of the target network, and laying out the initial network topology map based on the layout information to obtain a target network topology map. The use of this method can significantly improve the flexibility of obtaining a target network topology map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network application technology, and in particular to a method, device, computer equipment and readable storage medium for obtaining a network topology map. Background Art

[0002] With the development of network application technology, network topology has become more and more complex. In order to intuitively display the network topology and facilitate the management of various devices that make up the network, the network topology diagram was introduced.

[0003] In traditional technologies, the target network topology is obtained through the connection properties (or dependencies) of the devices, such as the hierarchical layout algorithm (Dagre) and the force-directed layout algorithm.

[0004] However, currently, when obtaining a target network topology map through the connection properties of a device, the flexibility of obtaining the target network topology map is poor due to the single implementation condition. Summary of the invention

[0005] Based on this, it is necessary to provide a network topology map obtaining method, apparatus, computer equipment and readable storage medium that can improve the flexibility in obtaining the target network topology map in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for obtaining a network topology map, comprising:

[0007] Respectively obtain the properties of each device in the target network; the properties include connection properties and self properties;

[0008] Perform hierarchical clustering and grouping of each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0009] An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

[0010] In one embodiment, the step of performing hierarchical clustering and grouping of the devices based on the connection attributes and the self attributes to obtain layout information includes:

[0011] Acquire a first attribute value corresponding to the connection attribute and a second attribute value corresponding to the self attribute of each of the devices;

[0012] Hierarchical clustering and grouping are performed on each of the devices based on the first attribute value and the second attribute value to obtain layout information.

[0013] In one embodiment, performing hierarchical clustering and grouping of each of the devices based on the first attribute value and the second attribute value to obtain layout information includes:

[0014] Determining each of the devices as a different class;

[0015] Determine whether the end condition is met based on the current class;

[0016] If the current class does not meet the termination condition, then respectively calculating the attribute value distance between every two classes in the current class based on the first attribute value and the second attribute value;

[0017] Merge the two classes corresponding to the minimum distance in the attribute value distance into a new class;

[0018] Determine the level information, node information and grouping relationship corresponding to the new class, and return to the step of determining whether the end condition is met based on the current class;

[0019] If the current class meets the termination condition, all the level information, node information and grouping relationships obtained before the termination are used as layout information.

[0020] In one embodiment, the obtaining of the first attribute value corresponding to the connection attribute and the second attribute value corresponding to the self attribute of each of the devices includes:

[0021] For either device:

[0022] Initialize the attribute values, attribute steps, and attribute value ranges corresponding to the connection attribute and the self attribute respectively;

[0023] For any property:

[0024] Determine a group contribution corresponding to any one of the attributes, and adjust the attribute step and the attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range;

[0025] scaling the attribute value based on the adjusted attribute value range; a maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value;

[0026] The attribute value corresponding to the scaled connection attribute is used as the first attribute value, and the attribute value corresponding to the scaled self attribute is used as the second attribute value.

[0027] In one embodiment, the group contribution is characterized by importance; and adjusting the attribute step size and the attribute value range based on the group contribution includes:

[0028] In response to the importance assignment instruction, assigning importance to the connection attribute and the self attribute;

[0029] The attribute step size and the attribute value range are adjusted based on the corresponding importance.

[0030] In one embodiment, the method further comprises:

[0031] After obtaining the target network topology:

[0032] In response to the importance change instruction, a target network topology map of the target network is re-obtained based on the changed importance.

[0033] In one embodiment, the method further comprises:

[0034] For any of these new classes:

[0035] Count the number of members corresponding to each attribute;

[0036] In response to the information display instruction, the number of members is displayed differently based on the attributes.

[0037] In a second aspect, the present application also provides a device for obtaining a network topology map, including:

[0038] An acquisition module, used to respectively acquire the attributes of each device in the target network; the attributes include connection attributes and self attributes;

[0039] A grouping module, used for performing hierarchical clustering grouping on each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0040] The layout module is used to obtain an initial network topology map of the target network, and to layout the initial network topology map based on the layout information to obtain a target network topology map.

[0041] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0042] Respectively obtain the properties of each device in the target network; the properties include connection properties and self properties;

[0043] Perform hierarchical clustering and grouping of each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0044] An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

[0045] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0046] Acquire the properties of each device in the target network respectively; the properties include connection properties and self properties;

[0047] Performing hierarchical clustering and grouping of each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0048] An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

[0049] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0050] Acquire the properties of each device in the target network respectively; the properties include connection properties and self properties;

[0051] Performing hierarchical clustering and grouping of each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0052] An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

[0053] In the above-mentioned network topology acquisition method, device, computer equipment and readable storage medium, when obtaining the target network topology, not only the connection attributes of the device are used, but also the self-attributes of the device are used. On this basis, the connection attributes and self-attributes are combined to group each device to obtain layout information, and thus obtain the target network topology. It can be understood that compared with obtaining the target network topology only through connection attributes, the participation of multiple attributes makes the implementation conditions more diverse, and on the basis of the participation of multiple attributes, the present application proposes to group each device, thereby obtaining layout information and obtaining the target network topology, which significantly improves the flexibility of obtaining the target network topology. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A schematic diagram of a flow chart of a method for obtaining a network topology map in one embodiment;

[0056] Figure 2A schematic diagram of a process of obtaining a target network topology map from an initial network topology map layout in one embodiment;

[0057] Figure 3 A structural block diagram of a device for obtaining a network topology map in an embodiment;

[0058] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of this application clearer, some terms involved in the embodiments of this application are explained below:

[0060] Device: An entity connected to a network cluster, including but not limited to core switches, access switches, firewalls, physical machines, and virtual machines.

[0061] Connection attributes: The upstream and downstream connection relationships between devices obtained based on the direction of network traffic between devices.

[0062] Self-attribute: Each device has its own attribute, which is not affected by other devices. The attributes between different devices can be the same, not completely the same, or completely different. Self-attributes include but are not limited to: the project to which the device belongs, the physical area where the device is located, the virtual partition information where the device is located, the device type, whether it is a backup, whether it is a core business chain, the device load pressure level, and the connection chain level to which the device belongs. For example, there are device 1, device 2, and device 3, among which device 1 belongs to project A, the device type is an access switch and is a backup, device 2 belongs to project B, the device type is an access switch and is a backup, and device 3 belongs to project C, the device type is a core switch and belongs to the core business chain.

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0064] In one embodiment, Figure 1 As shown, a method for obtaining a network topology map is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0065] Step 102, respectively obtain the attributes of each device in the target network; the attributes include connection attributes and self attributes.

[0066] The target network includes but is not limited to an enterprise network, a telecommunication network, and an internal network. Generally, the network topology diagram corresponding to the target network has a tree topology structure. Therefore, the embodiment of the present application is directed to a tree topology structure, which is a multi-layer structure, like a tree, with a narrow upper layer and a wide lower layer, that is, fewer nodes in the upper layer and more nodes in the lower layer.

[0067] Step 104 , hierarchical clustering and grouping of each device based on the connection attribute and the self attribute to obtain layout information.

[0068] Among them, hierarchical clustering grouping can be split and understood, that is, hierarchical and clustering grouping. Hierarchical refers to the level of each device in the network topology diagram; clustering grouping refers to clustering the devices to form groups. Layout information is used to layout the network topology diagram, that is, to determine the positions of each node, edge and each node in the network topology diagram, which is determined by the layout algorithm.

[0069] For example, since the network topology has certain levels and the nodes between the levels have corresponding connections, hierarchical clustering can be understood as determining the level and grouping relationship of each device in the network topology (i.e., the connection between nodes). In the hierarchical clustering process, each device is divided into different levels, that is, each device constitutes different nodes at different levels in the network topology.

[0070] Exemplarily, the attributes used in hierarchical clustering grouping include at least two types, for example, the attributes include connection attributes and the item to which the device belongs in the self-attribute.

[0071] For the hierarchical clustering process, the process will generate layout information corresponding to nodes and edges in the network topology diagram. For example, if there are device 1, device 2, and device 3, after clustering, device 1 and device 2 are clustered into class 1, and device 3 is separately classified as class 2, that is, device 1 and device 2 are divided into one group, and device 3 is divided into another group. Then class 1 and class 2 are clustered into class 3. For the network topology diagram, device 1 and device 2 are nodes of one layer, class 2 and class 1 are nodes of the layer above the layer where device 1 and device 2 are located, and class 3 is the node of the top layer; the edges are the grouping relationship between device 1 and device 2 and class 1, and the grouping relationship between class 2 and class 1 and class 3.

[0072] Exemplarily, hierarchical clustering grouping can be implemented by an Agglomerative algorithm, and the order of hierarchical decomposition of the Agglomerative algorithm is from bottom to top, which is an agglomerative hierarchical clustering algorithm.

[0073] Step 106, obtaining an initial network topology map of the target network, and laying out the initial network topology map based on the layout information to obtain a target network topology map.

[0074] The initial network topology diagram is a network topology diagram obtained after modeling the devices based on the connection attributes and self-attributes of the devices. The initial network topology diagram has nodes corresponding to each device, but no hierarchical clustering grouping is performed.

[0075] Exemplarily, layout refers to arranging each node in the initial network topology diagram and the new nodes subsequently determined by hierarchical clustering grouping on the canvas through layout information. The target network topology diagram thus obtained enables each device to have a determined grouping relationship, position and hierarchy on the canvas. During layout, the Dagre algorithm can be used.

[0076] like Figure 2 As shown, an exemplary schematic diagram of the process of obtaining a target network topology map from an initial network topology map layout is provided. Among them, 201 is the initial network topology map, and 202 is the target network topology map. Class 1 is obtained by hierarchical clustering grouping of device 1 and device 2. Similarly, class 5 is obtained from class 1 and class 4, and class 6 is obtained from class 5 and class 3. Among them, class 3 corresponds to device 3 and is a class that only includes device 3. Similarly, class 4 corresponds to device 4 and is a class that only includes device 4.

[0077] In the above-mentioned network topology acquisition method, when obtaining the target network topology, not only the connection attributes of the device are used, but also the self-attributes of the device are used. On this basis, the connection attributes and self-attributes are combined to hierarchically cluster and group each device to obtain layout information, and thereby obtain the target network topology. It can be understood that compared to obtaining the target network topology only through connection attributes, the participation of multiple attributes makes the implementation conditions more diverse, and on the basis of the participation of multiple attributes, the present application proposes to hierarchically cluster and group each device, thereby obtaining layout information and obtaining the target network topology, which significantly improves the flexibility of obtaining the target network topology.

[0078] In one embodiment, for the above step 104, each device may be hierarchically clustered and grouped according to the number of each attribute, thereby obtaining layout information. The number may be the number when the attribute information is stored in the database.

[0079] In another embodiment, for the above step 104, a first attribute value corresponding to the connection attribute of each device and a second attribute value corresponding to the self attribute may be obtained; hierarchical clustering and grouping of each device is performed based on the first attribute value and the second attribute value to obtain layout information.

[0080] The attribute value is a value determined according to certain rules, and the value can be different for different attributes or even the same attribute of different devices. The rule can be set as needed, for example, different values ​​can be randomly assigned to different attributes and different contents of the same attribute (such as project A and project B).

[0081] It can be understood from the above that clustering grouping is to determine whether devices can be classified into the same category by attributes, and its core is that the more common attributes there are between different devices, the more likely they are to be classified into the same category.

[0082] It should be noted that different devices with the same attributes may also have significant differences. For example, there are devices 1, 2, and 3, among which device 1 has three self-attributes, namely "device belongs to the project", "whether it is a backup", and "whether it is a core business chain". For the attribute "device belongs to the project", it is specifically project A, for the attribute "whether it is a backup", it is specifically yes, and for the attribute "whether it is a core business chain", it is specifically yes; device 2 has three self-attributes, namely "device belongs to the project", "whether it is a backup", and "whether it is a core business chain". For the attribute "device belongs to the project", it is specifically project B, for the attribute "whether it is a backup", it is specifically no, and for the attribute "whether it is a core business chain", it is specifically no; device 3 has three self-attributes, namely "device belongs to the project", "device type", and "device load pressure level". For the attribute "device belongs to the project", it is specifically project A, for the attribute "device type", it is specifically an access switch, and for the attribute "device load pressure level", it is specifically level 2.

[0083] Among them, there are three common attributes between device 1 and device 2, and only one common attribute between device 2 and device 3 and between device 1 and device 3. However, for the attribute "device belongs to project" between device 1 and device 3, both are project A, while the "device belongs to project", "whether it is backup" and "whether it is core business chain" between device 1 and device 2 are all different. Therefore, even though device 1 and device 2 have more common attributes than device 1 and device 3, the latter are more likely to be classified into one category.

[0084] The step of obtaining layout information by hierarchically clustering and grouping each device based on a first attribute value and a second attribute value specifically includes: determining each device as a different class; determining whether an end condition is met based on a current class; if the current class does not meet the end condition, calculating the attribute value distance between each two classes in the current class based on the first attribute value and the second attribute value; merging the two classes corresponding to the minimum distance in the attribute value distance into a new class; determining the hierarchical information, node information and grouping relationship corresponding to the new class, and returning to the step of determining whether the end condition is met based on the current class; if the current class meets the end condition, using all the hierarchical information, node information and grouping relationship obtained before the end as layout information.

[0085] The end condition refers to whether the current number of classes is less than or equal to a preset number, and the preset number can be set as needed, such as 1 or 2.

[0086] Among them, the attribute value distance It can be calculated by the following formula:

[0087] (one)

[0088] in, , ,……, , , ,……, is the attribute value, i For the i Devices, j For the j Devices, i ≠j , i and j They are all positive integers and the maximum value is the number of devices when the attributes of each device are obtained from the target network; wherein the number of square terms in the calculation formula is the same as the total number of different attributes in the devices.

[0089] For example, there are device 1 and device 2, where device 1 has three self-attributes, namely, the project to which the device belongs, whether it is a backup, and whether it is a core business chain. For the attribute "the project to which the device belongs", specifically, it is project A, the attribute value is 10, for the attribute "whether it is a backup", specifically, it is yes, the attribute value is 1, and for the attribute "whether it is a core business chain", specifically, it is yes, the attribute value is 5; device 2 has three self-attributes, namely, the project to which the device belongs, whether it is a backup, and the device type. For the attribute "the project to which the device belongs", specifically, it is project B, the attribute value is 20, for the attribute "whether it is a backup", specifically, it is no, the attribute value is 2, and for the attribute "device type", specifically, it is an access switch, the attribute value is 8.

[0090] When calculating the attribute value distance, the number of square terms in the calculation formula is 4, corresponding to the project to which the device belongs, whether it is a backup, whether it is a core business chain, and the device type. It can be calculated by the following formula:

[0091] (two)

[0092] The result of the above calculation is .

[0093] Exemplarily, after the attribute value distance is calculated, the attribute value distance may be stored in a distance matrix, and when determining the minimum distance, the distance matrix may be traversed to obtain the minimum distance.

[0094] It can be understood that the steps of "determining whether the end condition is met based on the current class; if the current class does not meet the end condition, respectively calculating the attribute value distance between each two classes in the current class based on the first attribute value and the second attribute value; merging the two classes corresponding to the minimum distance in the attribute value distance into a new class; determining the hierarchical information, node information and grouping relationship corresponding to the new class" are the loop body, and the loop is exited only when the loop end condition is met. When the loop end condition is not met, the step of determining whether the end condition is met based on the current class is returned, and the loop body is continued to be executed.

[0095] For this loop body, the current class is the class obtained at the end of the previous loop, which includes the classes that have not been merged and the new classes generated after the merger. For the first time entering the loop body, the current class is all the classes corresponding to each device. That is, each loop will merge the two classes corresponding to the minimum distance into a new class, and the new class will participate in the next loop. Among them, when the new class participates in the next loop, the attribute of the new class is an aggregate attribute, and the attribute value of the new class is the aggregate attribute value. The aggregate attribute refers to all the attributes of the two classes used to merge the new class, and the aggregate attribute value refers to the central value of each aggregate attribute. If there are classes 1 and 2, merge to get class 3, where the attributes of class 1 include "equipment belongs to the project" and "whether it is a backup", and the attribute values ​​are 2 and 4 respectively, and the attributes of class 2 include "equipment belongs to the project" and "whether it is a core business chain", and the attribute values ​​are 4 and 4 respectively. Then the aggregate attributes of class 3 include "equipment belongs to the project" and "whether it is a backup", and the attributes of class 2 include "equipment belongs to the project", "whether it is a core business chain" and "whether it is a backup", and the attribute values ​​are 3, 2 and 2 respectively.

[0096] After each cycle, hierarchical information, node information and grouping relationships are generated. The hierarchical information means that the current class belongs to one layer, and the new class belongs to the upper layer of the current class. The node information is the information of the new class and the unmerged class, such as the class name. The grouping relationship is the association relationship between the new class and the two classes merged into the new class, which is reflected in the network topology diagram as the connection between the new class and the two classes merged into the new class.

[0097] In an exemplary embodiment, the user may be more concerned about one of the attributes, such as the project to which the device belongs. In response to this demand, the target network topology map in this embodiment can be laid out around the attribute that the user is more concerned about, thereby further improving the flexibility of obtaining the target network topology map. This can be achieved in the following ways:

[0098] The steps of obtaining the first attribute value corresponding to the connection attribute of each device and the second attribute value corresponding to the self attribute include: for any device: initializing the attribute value, attribute step and attribute value range corresponding to the connection attribute and the self attribute respectively; for any attribute: determining the group contribution corresponding to any attribute, and adjusting the attribute step and attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range; scaling the attribute value based on the adjusted attribute value range; the maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value; taking the attribute value corresponding to the scaled connection attribute as the first attribute value, and taking the attribute value corresponding to the scaled self attribute as the second attribute value.

[0099] The attribute step refers to the difference between the attribute values ​​of different contents of the same attribute. The attribute value of each attribute is taken within the attribute value range corresponding to the attribute. For example, if the attribute value range of the attribute "device belongs to the project" is 0~10 and the attribute step is 1, then when the content is project A, the attribute value can be 1, when the content is project B, the attribute value can be 2, and so on.

[0100] During initialization, the attribute values ​​of each attribute can be the same; the attribute step of each attribute is set according to the group contribution, is positively correlated with the group contribution, and the minimum step is 1, and the maximum step is not limited; the attribute value range of each attribute is the same.

[0101] Among them, the group contribution is used to adjust the attribute step and the attribute value range, and the attribute value is adjusted based on this, so as to amplify the attribute value of the attribute with a large group contribution, and the degree of amplification depends on the size of the group contribution. For example, there are attributes "project to which the device belongs", "physical area where the device is located", "virtual partition information where the device is located" and "device type", and the group contributions are 1, 2, 3 and 4 respectively, then the corresponding attribute values ​​can be amplified by 1 times, 5 times, 10 times and 20 times respectively. Then, the attribute value distance is adjusted by the attribute value that has been changed by amplification, so that the attribute value distance is more affected by the attribute with a large group contribution. Among them, the scaling factor of the attribute step is the same as the scaling factor of the attribute value range, and the scaling factor of the attribute value can be the same as the scaling factor of the attribute value range.

[0102] For example, there are device 1, device 2, and device 3. Device 1, device 2, and device 3 all have the attributes "device belongs to project" and "device type". The initial attribute values ​​are 1, 1, 2, 2, and 4, 2 respectively. The attribute value range is 0 to 10. The distance between device 1 and device 2 is , the distance between device 2 and device 3 is 2, and the distance between device 1 and device 3 is , therefore, the distance between device 1 and device 2 is minimum.

[0103] If the group contribution corresponding to the "project to which the equipment belongs" is smaller than the group contribution corresponding to the "equipment type", then the magnification factor of the attribute value range corresponding to the "project to which the equipment belongs" is smaller than the magnification factor of the attribute value range corresponding to the "equipment type", or the attribute value range corresponding to the "equipment type" is magnified, but the attribute value range corresponding to the "project to which the equipment belongs" is not magnified. Assuming that the attribute value range corresponding to the "project to which the equipment belongs" is magnified by 2 times and the attribute value range corresponding to the "equipment type" is magnified by 10 times, then based on the initial attribute values, the amplified attribute values ​​of equipment 1, equipment 2, and equipment 3 can be 2, 10, 4, 20, and 8, 20, respectively. Then the distance between equipment 1 and equipment 2 is , the distance between device 2 and device 3 is 4, and the distance between device 1 and device 3 is , therefore, the distance between device 2 and device 3 is the smallest.

[0104] Similarly, for narrowing down the attribute value, the greater the group contribution, the larger the attribute value range after narrowing down, so the attribute value after narrowing down is larger; correspondingly, if the group contribution is smaller, the attribute value range after narrowing down is smaller, and the attribute value after narrowing down is smaller.

[0105] It can be seen that after scaling the attribute value range and the attribute step based on the group contribution, scaling the attribute value based on the attribute value range can affect the size of the attribute value distance, thereby affecting the minimum distance.

[0106] It should be noted that the more attributes involved in the attribute value distance calculation, the greater the impact. The above-mentioned operation of scaling the attribute value can significantly change the impact of the attribute that the user is more concerned about on the minimum distance, thereby changing the impact on the clustering grouping process, and then changing the structure of the target network topology map obtained by the layout.

[0107] In some embodiments, the above grouping contribution can be characterized by weights. For example, if there are device 1 and device 2, and both device 1 and device 2 include the attributes "device project" and "device type", and the grouping contribution of "device project" is greater than the grouping contribution of "device type", then the weight corresponding to "device project" can be 0.6, and the weight corresponding to "device type" can be 0.4.

[0108] In some embodiments, the above group contribution can also be characterized by importance. In this embodiment, the step of adjusting the attribute step and attribute value range based on the group contribution includes: responding to the importance assignment instruction, assigning importance to the connection attribute and the self attribute; and adjusting the attribute step and attribute value range based on the corresponding importance.

[0109] The importance allocation instruction may be input by the user, that is, the user may input the importance allocation instruction according to actual needs, so that the importance corresponding to each attribute is allocated according to the importance allocation instruction.

[0110] Accordingly, the target network topology is laid out according to the assigned importance. It should be noted that, in order to facilitate the user to use the target network topology, the class name of the new class in the above text can be related to the attribute with the highest importance. For example, if "the project to which the device belongs" has the highest importance, the class name of the new class can be "Project A", that is, the node information is "Project A", and the information displayed by the node corresponding to the new class in the target network topology can be "Project A".

[0111] In an exemplary embodiment, after obtaining the target network topology map, it is also supported to change the importance, that is, if the user wants to know the performance of a certain type of attribute that he is concerned about in the target network topology map, he can change the importance by inputting an importance change instruction to make the importance of the attribute that he is concerned about the highest. Afterwards, in response to the importance change instruction, the target network topology map of the target network is re-obtained based on the changed importance.

[0112] It can be understood that when the user is concerned about multiple attributes, or the content displayed by the current target network topology map is not what the user is concerned about, the target network topology map can be easily changed to obtain the expected target network topology map.

[0113] In addition, the current layout algorithm of the network topology diagram, the network topology diagram obtained by the layout, displays the connection attributes and node information, such as the Dagre algorithm and the force-directed layout algorithm. For users, the amount of information that can be obtained is relatively small. In some embodiments, in order to enable users to obtain more information when using the network topology diagram, thereby facilitating their use, for any of the above new classes, the number of members corresponding to each attribute is counted; in response to the information display instruction, the number of members is displayed differently based on each attribute.

[0114] The information display instruction is input by the user.

[0115] Through this display, users can quickly and clearly understand how many members each attribute has for the new class. For example, the new class includes the attributes "device belongs to project" and "device type", where the number of members of "device belongs to project" is 2 and the number of members of "device type" is 1.

[0116] It can be understood that by automatically counting the number of members corresponding to each attribute, it is no longer necessary to manually click on each device in the target network topology diagram one by one and then summarize each attribute.

[0117] In addition, the force-directed layout algorithm only uses the forces between nodes for dynamic balance, making the position of the nodes uncontrollable. For the network topology, it is impossible to locate the associated nodes according to the flow of traffic, making the display of the device's connection properties less intuitive. At the same time, it can only display the device's connection properties, and there is no associated management for the self-properties. At the same time, the network topology diagram drawn by the force-directed layout algorithm will tend to the center of the canvas as a whole, that is, it cannot achieve a tree-like topology structure like the Dagre algorithm, which smooths out the differences in the self-properties between devices, resulting in the inability to intuitively and effectively observe the route of network traffic between devices.

[0118] In some embodiments, an expansion level switching function is provided to facilitate users to switch between multiple expansion levels, so that they can more intuitively see the device information (device name) and device grouping information (class name) contained in each level.

[0119] In some embodiments, an aggregated attribute display function is provided to help users quickly locate an aggregated category of a certain attribute and view the devices or new categories included in the aggregated category.

[0120] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0121] Based on the same inventive concept, the embodiment of the present application also provides a network topology map acquisition device for implementing the network topology map acquisition method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more network topology map acquisition device embodiments provided below can refer to the limitations of the network topology map acquisition method above, and will not be repeated here.

[0122] In an exemplary embodiment, Figure 3 As shown, a network topology map obtaining device is provided, including: an obtaining module 301, a grouping module 302 and a layout module 303, wherein:

[0123] The acquisition module 301 is used to respectively acquire the attributes of each device in the target network; the attributes include connection attributes and self attributes;

[0124] A grouping module 302, configured to perform hierarchical clustering grouping on each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0125] The layout module 303 is used to obtain an initial network topology map of the target network, and to layout the initial network topology map based on the layout information to obtain a target network topology map.

[0126] In an exemplary embodiment, the grouping module 302 includes:

[0127] an acquiring unit, configured to acquire a first attribute value corresponding to the connection attribute and a second attribute value corresponding to the self attribute of each of the devices;

[0128] A grouping unit is used to perform hierarchical clustering grouping on each of the devices based on the first attribute value and the second attribute value to obtain layout information.

[0129] In an exemplary embodiment, the grouping unit is specifically used to:

[0130] Determining each of the devices as a different class;

[0131] Determine whether the end condition is met based on the current class;

[0132] If the current class does not meet the termination condition, then respectively calculating the attribute value distance between every two classes in the current class based on the first attribute value and the second attribute value;

[0133] Merge the two classes corresponding to the minimum distance in the attribute value distance into a new class;

[0134] Determine the level information, node information and grouping relationship corresponding to the new class, and return to the step of determining whether the end condition is met based on the current class;

[0135] If the current class meets the termination condition, all the level information, node information and grouping relationships obtained before the termination are used as layout information.

[0136] In an exemplary embodiment, the acquisition unit is specifically configured to:

[0137] For either device:

[0138] Initialize the attribute values, attribute steps, and attribute value ranges corresponding to the connection attribute and the self attribute respectively;

[0139] For any property:

[0140] Determine a group contribution corresponding to any one of the attributes, and adjust the attribute step and the attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range;

[0141] scaling the attribute value based on the adjusted attribute value range; a maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value;

[0142] The attribute value corresponding to the scaled connection attribute is used as the first attribute value, and the attribute value corresponding to the scaled self attribute is used as the second attribute value.

[0143] In an exemplary embodiment, the group contribution is characterized by importance; and the acquisition unit is specifically configured to:

[0144] In response to the importance assignment instruction, assigning importance to the connection attribute and the self attribute;

[0145] The attribute step size and the attribute value range are adjusted based on the corresponding importance.

[0146] In an exemplary embodiment, the network topology map obtaining device further includes:

[0147] The re-obtaining module is used to, after obtaining the target network topology map, respond to the importance change instruction and re-obtain the target network topology map of the target network based on the changed importance.

[0148] In an exemplary embodiment, the network topology map obtaining device further includes:

[0149] For any of these new classes:

[0150] Statistics module, used to count the number of members corresponding to each attribute;

[0151] The display module is used to respond to the information display instruction and display the number of members based on various attributes.

[0152] Each module in the above network topology map obtaining device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0153] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 4As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for obtaining a network topology map is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0154] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0155] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0156] Respectively obtain the properties of each device in the target network; the properties include connection properties and self properties;

[0157] Perform hierarchical clustering and grouping of each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0158] An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

[0159] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a first attribute value corresponding to the connection attribute of each device and a second attribute value corresponding to the self attribute; hierarchically clustering and grouping each device based on the first attribute value and the second attribute value to obtain layout information.

[0160] In one embodiment, when the processor executes the computer program, the following steps are also implemented: each of the devices is determined as a different class; based on the current class, it is determined whether the end condition is met; if the current class does not meet the end condition, the attribute value distance between each two classes in the current class is calculated based on the first attribute value and the second attribute value; the two classes corresponding to the minimum distance in the attribute value distance are merged into a new class; the hierarchical information, node information and grouping relationship corresponding to the new class are determined, and the step of determining whether the end condition is met based on the current class is returned; if the current class meets the end condition, all the hierarchical information, node information and grouping relationship obtained before the end are used as layout information.

[0161] In one embodiment, the processor also implements the following steps when executing the computer program: for any device: initialize the attribute value, attribute step and attribute value range corresponding to the connection attribute and the self attribute respectively; for any attribute: determine the group contribution corresponding to the any attribute, and adjust the attribute step and the attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range; scale the attribute value based on the adjusted attribute value range; the maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value; use the attribute value corresponding to the scaled connection attribute as the first attribute value, and use the attribute value corresponding to the scaled self attribute as the second attribute value.

[0162] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the group contribution is characterized by importance; in response to the importance assignment instruction, the connection attribute and the self-attribute are assigned importance; based on the corresponding importance, the attribute step size and the attribute value range are adjusted.

[0163] In one embodiment, when the processor executes the computer program, the following steps are further implemented: after obtaining the target network topology map: in response to the importance change instruction, re-obtain the target network topology map of the target network based on the changed importance.

[0164] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for any of the new classes: counting the number of members corresponding to each attribute; and in response to the information display instruction, displaying the number of members differently based on each attribute.

[0165] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0166] Respectively obtain the properties of each device in the target network; the properties include connection properties and self properties;

[0167] Perform hierarchical clustering and grouping of each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0168] An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

[0169] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a first attribute value corresponding to the connection attribute of each device and a second attribute value corresponding to the self attribute; hierarchically clustering and grouping each device based on the first attribute value and the second attribute value to obtain layout information.

[0170] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: each of the devices is determined as a different class; based on the current class, whether the end condition is met is determined; if the current class does not meet the end condition, the attribute value distance between each two classes in the current class is calculated based on the first attribute value and the second attribute value; the two classes corresponding to the minimum distance in the attribute value distance are merged into a new class; the hierarchical information, node information and grouping relationship corresponding to the new class are determined, and the step of determining whether the end condition is met based on the current class is returned; if the current class meets the end condition, all the hierarchical information, node information and grouping relationship obtained before the end are used as layout information.

[0171] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for any device: initialize the attribute value, attribute step and attribute value range corresponding to the connection attribute and the self-attribute respectively; for any attribute: determine the group contribution corresponding to the any attribute, and adjust the attribute step and the attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range; scale the attribute value based on the adjusted attribute value range; the maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value; use the attribute value corresponding to the scaled connection attribute as the first attribute value, and use the attribute value corresponding to the scaled self-attribute as the second attribute value.

[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: the group contribution is characterized by importance; in response to an importance assignment instruction, importance is assigned to the connection attribute and the self-attribute; and the attribute step size and the attribute value range are adjusted based on the corresponding importance.

[0173] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: after obtaining the target network topology map: in response to the importance change instruction, re-obtain the target network topology map of the target network based on the changed importance.

[0174] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for any of the new classes: counting the number of members corresponding to each attribute; and in response to the information display instruction, displaying the number of members differently based on each attribute.

[0175] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0176] Respectively obtain the properties of each device in the target network; the properties include connection properties and self properties;

[0177] Perform hierarchical clustering and grouping of each of the devices based on the connection attributes and the self attributes to obtain layout information;

[0178] An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

[0179] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a first attribute value corresponding to the connection attribute of each device and a second attribute value corresponding to the self attribute; hierarchically clustering and grouping each device based on the first attribute value and the second attribute value to obtain layout information.

[0180] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: each of the devices is determined as a different class; based on the current class, whether the end condition is met is determined; if the current class does not meet the end condition, the attribute value distance between each two classes in the current class is calculated based on the first attribute value and the second attribute value; the two classes corresponding to the minimum distance in the attribute value distance are merged into a new class; the hierarchical information, node information and grouping relationship corresponding to the new class are determined, and the step of determining whether the end condition is met based on the current class is returned; if the current class meets the end condition, all the hierarchical information, node information and grouping relationship obtained before the end are used as layout information.

[0181] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for any device: initialize the attribute value, attribute step and attribute value range corresponding to the connection attribute and the self-attribute respectively; for any attribute: determine the group contribution corresponding to the any attribute, and adjust the attribute step and the attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range; scale the attribute value based on the adjusted attribute value range; the maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value; use the attribute value corresponding to the scaled connection attribute as the first attribute value, and use the attribute value corresponding to the scaled self-attribute as the second attribute value.

[0182] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: the group contribution is characterized by importance; in response to an importance assignment instruction, importance is assigned to the connection attribute and the self-attribute; and the attribute step size and the attribute value range are adjusted based on the corresponding importance.

[0183] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: after obtaining the target network topology map: in response to the importance change instruction, re-obtain the target network topology map of the target network based on the changed importance.

[0184] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for any of the new classes: counting the number of members corresponding to each attribute; and in response to the information display instruction, displaying the number of members differently based on each attribute.

[0185] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for obtaining a network topology map, characterized in that: The method comprises: Respectively obtain the properties of each device in the target network; the properties include connection properties and self properties; For either device: Initialize the attribute values, attribute steps, and attribute value ranges corresponding to the connection attribute and the self attribute respectively; For any property: Determine a group contribution corresponding to any one of the attributes, and adjust the attribute step and the attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range; scaling the attribute value based on the adjusted attribute value range; a maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value; The attribute value corresponding to the scaled connection attribute is used as the first attribute value, and the attribute value corresponding to the scaled self attribute is used as the second attribute value; Perform hierarchical clustering and grouping of each of the devices based on the first attribute value and the second attribute value to obtain layout information; An initial network topology map of the target network is obtained, and the initial network topology map is laid out based on the layout information to obtain a target network topology map.

2. The method according to claim 1, characterized in that The step of performing hierarchical clustering and grouping of the devices based on the first attribute value and the second attribute value to obtain layout information includes: Determining each of the devices as a different class; Determine whether the end condition is met based on the current class; If the current class does not meet the termination condition, then respectively calculating the attribute value distance between every two classes in the current class based on the first attribute value and the second attribute value; Merge the two classes corresponding to the minimum distance in the attribute value distance into a new class; Determine the level information, node information and grouping relationship corresponding to the new class, and return to the step of determining whether the end condition is met based on the current class; If the current class meets the termination condition, all the level information, node information and grouping relationships obtained before the termination are used as layout information.

3. The method according to claim 1, characterized in that The group contribution is characterized by an importance degree; and the adjusting the attribute step size and the attribute value range based on the group contribution includes: In response to the importance assignment instruction, assigning importance to the connection attribute and the self attribute; The attribute step size and the attribute value range are adjusted based on the corresponding importance.

4. The method according to claim 3, characterized in that The method further comprises: After obtaining the target network topology: In response to the importance change instruction, a target network topology map of the target network is re-obtained based on the changed importance.

5. The method according to claim 2, characterized in that: The method further comprises: For any of these new classes: Count the number of members corresponding to each attribute; In response to the information display instruction, the number of members is displayed differently based on the attributes.

6. A device for obtaining a network topology map, characterized in that: The device comprises: An acquisition module, used to respectively acquire the attributes of each device in the target network; the attributes include connection attributes and self attributes; A grouping module, the grouping module comprising an acquisition unit and a grouping unit; The acquisition unit is specifically used for: For either device: Initialize the attribute values, attribute steps, and attribute value ranges corresponding to the connection attribute and the self attribute respectively; For any property: Determine a group contribution corresponding to any one of the attributes, and adjust the attribute step and the attribute value range based on the group contribution; the group contribution is positively correlated with the attribute step and the attribute value range; scaling the attribute value based on the adjusted attribute value range; a maximum value of the adjusted attribute value range is positively correlated with the scaled attribute value; The attribute value corresponding to the scaled connection attribute is used as the first attribute value, and the attribute value corresponding to the scaled self attribute is used as the second attribute value; The grouping unit is used to perform hierarchical clustering and grouping on each of the devices based on the first attribute value and the second attribute value to obtain layout information; The layout module is used to obtain an initial network topology map of the target network, and to layout the initial network topology map based on the layout information to obtain a target network topology map.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.