A storage topology map creation method, apparatus, device and medium

By calculating the average position and sequence number of storage nodes and reordering them, the problem of numerous intersection points in the bipartite topology graph is solved, resulting in a clear topology layout and efficient front-end rendering.

CN117349481BActive Publication Date: 2026-05-19JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN INSPUR DATA TECH CO LTD
Filing Date
2023-10-13
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, bipartite topology graphs in storage management software suffer from numerous intersections and chaotic layouts due to many-to-many relationships, which affects visual effects and front-end rendering efficiency.

Method used

By obtaining the initial bipartite topology of the target storage system, the combination of storage nodes is determined, and the average position and sequence number of the nodes are calculated. The storage nodes are then reordered to reduce intersections and achieve a clear layout.

Benefits of technology

The topology layout has been simplified, the number of intersections has been reduced, and the clarity of the layout and the efficiency of front-end rendering have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117349481B_ABST
    Figure CN117349481B_ABST
Patent Text Reader

Abstract

The application discloses a storage topology graph creation method and device, equipment and medium, comprising: acquiring an initial bipartite topology graph of a target storage system; determining a combination of second part storage nodes connected with each first part storage node, and determining a combination of first part storage nodes connected with each second part storage node; taking the average position of the second initial positions of all second part storage nodes in the combination of second part storage nodes as the first target position of the corresponding connected first part storage node; taking the average position of the first initial positions of all first part storage nodes in the combination of first part storage nodes as the second target position of the corresponding connected second part storage node; and reordering the first part storage nodes based on the first target position and reordering the second part storage nodes based on the second target position according to the same position front and back ordering sequence, to obtain a target bipartite topology graph. The topology graph layout can be simply and conveniently completed, and the topology graph layout is clear.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for creating storage topology graphs. Background Technology

[0002] Currently, a network topology diagram refers to a network structure diagram composed of network node devices and communication media. Network topology defines the connection methods of various computers, printers, network devices, and other devices; that is, it describes the layout of cables and network devices and the paths used for data transmission. Network topology includes physical topology and logical topology. Physical topology refers to the layout of various devices and transmission media in the physical structure. Common physical topologies include bus, star, ring, tree, and mesh topologies.

[0003] In existing technologies, topology diagrams are widely used in various fields, one of which is storage. For example, in storage management software, topology diagrams are frequently used to illustrate the logical topological relationships between storage clusters, pools, volumes, hard drives, virtual machines, VCenter (software for building private cloud infrastructure), and Datastore (data storage). It's worth noting that one application scenario involves identifying the topological relationship between virtual machines and their hard drives. Since this relationship is many-to-many, a bipartite topology diagram can be used, with one part representing virtual machines and the other representing their hard drives.

[0004] However, since the relationship between the two parts in a bipartite topology graph is many-to-many, without any layout processing, the edges connecting the nodes of the two parts have many intersections, resulting in messy connections and poor visual appeal and usability. Moreover, in actual production environments, there are larger amounts of data. The larger the data volume, the more intersections there are, and the messier the connections become, causing a chaotic topology graph layout. In addition, complex layout algorithms can affect the rendering efficiency of the topology graph on the front-end HTML (Hypertext Markup Language) page.

[0005] In summary, how to easily complete the layout of the topology graph and make the layout clear is an urgent problem to be solved. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for creating storage topology graphs, which can easily complete the layout of topology graphs and make the layout clear. The specific solution is as follows:

[0007] In a first aspect, this application discloses a method for creating a storage topology graph, including:

[0008] Obtain the initial bipartite topology graph corresponding to the target storage system;

[0009] Determine the combination of second-part storage nodes connected to each first-part storage node, and determine the combination of first-part storage nodes connected to each second-part storage node;

[0010] The average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination is taken as the first target position of the corresponding connected first part storage node.

[0011] The average position corresponding to the first initial position of all the first part of the storage node combination is taken as the second target position of the corresponding connected second part of the storage node.

[0012] Based on the order of the same position, the first part of the storage nodes is reordered based on the first target position, and the second part of the storage nodes is reordered based on the second target position to obtain the target bipartite topology map corresponding to the target storage system.

[0013] Optionally, the step of reordering the first part of the storage nodes based on the first target position according to the sequential order of the same position, and reordering the second part of the storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system includes:

[0014] Based on the first target position, the first part of the storage nodes are reordered according to the order of their positions from front to back. During the reordering process, the first part of the storage nodes with the same first target position are sorted according to the order of their positions from front to back or from back to front, based on the first initial position.

[0015] Based on the second target position, the second part of the storage nodes are reordered according to the order of their positions from front to back. During the reordering process, the second part of the storage nodes with the same second target position are sorted according to the order of their positions from front to back or from back to front, based on the second initial position, so as to obtain the target bipartite topology map corresponding to the target storage system.

[0016] Optionally, the step of reordering the first part of the storage nodes based on the first target position according to the sequential order of the same position, and reordering the second part of the storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system includes:

[0017] Based on the first target position, the first part of the storage nodes are reordered according to the order of their positions from back to front. During the reordering process, the first part of the storage nodes with the same first target position are sorted according to the order of their positions from front to back or from back to front, based on the first initial position.

[0018] Based on the first target position, the first part of the storage nodes are reordered according to the order of their positions from back to front. During the reordering process, the first part of the storage nodes with the same first target position are sorted according to the order of their positions from front to back or from back to front, based on the first initial position, so as to obtain the target bipartite topology map corresponding to the target storage system.

[0019] Optionally, obtaining the initial bipartite topology map corresponding to the target storage system includes:

[0020] Obtain the initial bipartite topology map corresponding to the target storage system, and set the initial storage node sequence number based on the front and rear positions of the storage nodes as the first part of the storage nodes and the second part of the storage nodes in the initial bipartite topology map, respectively.

[0021] Optionally, the step of using the average position corresponding to the second initial position of all the second part of the storage nodes in the second part of the storage node combination as the first target position of the corresponding connected first part of the storage node; and using the average position corresponding to the first initial position of all the first part of the storage nodes in the first part of the storage node combination as the second target position of the corresponding connected second part of the storage node includes:

[0022] The average of the initial storage node indices of all the second part storage nodes in the second part storage node combination is used as the first target index of the corresponding connected first part storage node.

[0023] The average value of the initial storage node sequence numbers of all the first part storage nodes in the first part storage node combination is used as the second target sequence number of the corresponding connected second part storage node.

[0024] Accordingly, the step of reordering the first part of the storage nodes based on the first target position according to the sequential order of the same position, and reordering the second part of the storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system includes:

[0025] Based on the same sequence number, the first part of the storage nodes are reordered according to the first target sequence number, and the second part of the storage nodes are reordered according to the second target sequence number to obtain the target bipartite topology map corresponding to the target storage system.

[0026] Optionally, the step of reordering the first part of the storage nodes based on the first target sequence number and reordering the second part of the storage nodes based on the second target sequence number to obtain the target bipartite topology map corresponding to the target storage system includes:

[0027] The first part of the storage nodes are reordered based on the first target sequence number according to the sequence number from largest to smallest. In the reordering process, the first part of the storage nodes with the same first target sequence number are sorted based on the initial storage node sequence number according to the sequence number from largest to smallest or from smallest to largest.

[0028] The second part of the storage nodes are reordered based on the second target sequence number in descending order of sequence number. During the reordering process, the second part of the storage nodes with the same second target sequence number are sorted based on the initial storage node sequence number in descending or ascending order of sequence number to obtain the target bipartite topology map corresponding to the target storage system.

[0029] Optionally, the step of reordering the first part of the storage nodes based on the first target sequence number and reordering the second part of the storage nodes based on the second target sequence number to obtain the target bipartite topology map corresponding to the target storage system includes:

[0030] The first part of the storage nodes are reordered based on the first target sequence number according to the sequence number in ascending order. In the reordering process, the first part of the storage nodes with the same first target sequence number are sorted based on the initial storage node sequence number according to the sequence number in descending order or in ascending order.

[0031] Based on the second target sequence number, the second part of the storage nodes are reordered according to the sequence number in ascending order. During the reordering process, the second part of the storage nodes with the same second target sequence number are sorted according to the sequence number in descending order or in ascending order, based on the initial storage node sequence number, so as to obtain the target bipartite topology map corresponding to the target storage system.

[0032] Secondly, this application discloses a storage topology graph creation apparatus, comprising:

[0033] The topology graph acquisition module is used to acquire the target bipartite topology graph corresponding to the target storage system;

[0034] The node combination determination module is used to determine the combination of second-part storage nodes connected to each first-part storage node, and to determine the combination of first-part storage nodes connected to each second-part storage node.

[0035] The first position determination module is used to take the average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination as the first target position of the corresponding connected first part storage node.

[0036] The second position determination module is used to take the average position corresponding to the first initial position of all the first part of the storage node combination as the second target position of the corresponding connected second part of the storage node.

[0037] The sorting module is used to reorder the first part of the storage nodes based on the first target position according to the sorting order of the same position, and regroup the second part of the storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system.

[0038] Thirdly, this application discloses an electronic device, including:

[0039] Memory, used to store computer programs;

[0040] A processor is configured to execute the computer program to implement the aforementioned disclosed method for creating a storage topology graph.

[0041] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned storage topology graph creation method.

[0042] As can be seen, this application obtains an initial bipartite topology map corresponding to the target storage system; determines a combination of second-part storage nodes connected to each first-part storage node, and determines a combination of first-part storage nodes connected to each second-part storage node; takes the average position corresponding to the second initial position of all second-part storage nodes in the second-part storage node combination as the first target position of the corresponding connected first-part storage node; takes the average position corresponding to the first initial position of all first-part storage nodes in the first-part storage node combination as the second target position of the corresponding connected second-part storage node; and reorders the first-part storage nodes based on the first target position and the second-part storage nodes based on the second target position according to the order of the same position, to obtain the target bipartite topology map corresponding to the target storage system. Therefore, this application uses the average position corresponding to the second initial position of all second-part storage nodes in the second-part storage node combination as the first target position of the corresponding connected first-part storage node, and the average position corresponding to the first initial position of all first-part storage nodes in the first-part storage node combination as the second target position of the corresponding connected second-part storage node, and then reorders them based on the first and second target positions, resulting in fewer intersection points and a clearer layout in the final target bipartite topology map. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0044] Figure 1 This is a flowchart of a storage topology graph creation method disclosed in this application;

[0045] Figure 2 This is a schematic diagram of an initial bipartite topology graph structure disclosed in this application;

[0046] Figure 3 This is a schematic diagram of a target bipartite topology graph structure disclosed in this application;

[0047] Figure 4 This application discloses a flowchart of a specific method for creating a storage topology graph.

[0048] Figure 5 This is a schematic diagram of a storage topology graph creation device disclosed in this application;

[0049] Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] In existing technologies, topology diagrams are widely used in various fields, one of which is storage. For example, in storage management software, topology diagrams are frequently used to illustrate the logical topological relationships between storage clusters, pools, volumes, hard drives, virtual machines, VCenter, and Datastore. It's worth noting that one application scenario involves identifying the topological relationship between virtual machines and their hard drives. Since this relationship is many-to-many, a bipartite topology diagram can be used, with one part representing virtual machines and the other representing their hard drives.

[0052] However, since the relationship between the two parts in a bipartite topology graph is many-to-many, without any layout processing, the edges connecting the nodes of the two parts have many intersections, resulting in messy connections and poor visual appeal and usability. Moreover, in actual production environments, there are much larger amounts of data. The larger the data volume, the more intersections there are, and the messier the connections become, causing a chaotic topology graph layout. In addition, complex layout algorithms can affect the rendering efficiency of the topology graph on the front-end HTML page.

[0053] Therefore, this application proposes a storage topology graph creation scheme that can easily complete the topology graph layout and make the topology graph layout clear.

[0054] This application discloses a method for creating a storage topology graph. See also... Figure 1 As shown, the method includes:

[0055] Step S11: Obtain the initial bipartite topology graph corresponding to the target storage system.

[0056] In this embodiment, the initial bipartite topology graph has two parts of nodes. There are no two lines between nodes in the same part, but there are lines between nodes in different parts. In the current initial bipartite topology graph, the node distribution is irregular, which may cause chaotic connections between the two parts of nodes and numerous intersections. See details... Figure 2 The diagram shown is a schematic of an initial bipartite topological graph structure.

[0057] It should be pointed out that, Figure 2In the diagram, A, B, C, D, E, and F are the node identifiers for all nodes in the first part; a, b, c, and d are the node identifiers for all nodes in the second part.

[0058] Step S12: Determine the combination of second-part storage nodes connected to each first-part storage node, and determine the combination of first-part storage nodes connected to each second-part storage node.

[0059] In this embodiment, a second part of the storage structure connected to each first part of the storage node is determined to form a second part of the storage node combination, and a first part of the storage node connected to each second part of the storage node is determined to form a first part of the storage node combination.

[0060] Step S13: Take the average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination as the first target position of the corresponding connected first part storage node.

[0061] Step S14: Take the average position corresponding to the first initial position of all the first part of the storage nodes in the first part of the storage node combination as the second target position of the corresponding connected second part of the storage node.

[0062] Step S15: Based on the order of the same position, reorder the first part of the storage nodes according to the first target position, and reorder the second part of the storage nodes according to the second target position to obtain the target bipartite topology map corresponding to the target storage system.

[0063] In this embodiment, based on a general topology graph data architecture, there are two parts of nodes: part1 represents the first part of storage nodes, and part2 represents the second part of nodes. Based on the calculated average center of nodes in the other part that are connected to any node in any part, the calculated average centers of all nodes in the same part are sorted, such that node A in 'part1' is aligned to the average center of all nodes in 'part2' connected to A, node a in 'part2' is aligned to the average center of all nodes in 'part1' connected to a, and so on for other nodes.

[0064] See Figure 2 The nodes connected to A are a, b, and d; the nodes connected to B are a, b, and d; the nodes connected to C are a, c, and d; the node connected to D is c; the nodes connected to E are a and b; and the node connected to F is d.

[0065] In this embodiment, after determining the first target location and the second target location, the order of the locations from front to back can be used as the first sorting order, or the order of the locations from back to front can be used as the second sorting order. It should be noted that the two parts of storage nodes need to have the same sorting order. Furthermore, as long as the two parts have the same sorting order, regardless of whether it is the first or second sorting order, if there are first parts of storage nodes with the same first target location, they can be sorted according to either the first or second sorting order. Similarly, if there are second parts of storage nodes with the same second target location, they can be sorted according to either the first or second sorting order. The sorting order of the first parts of storage nodes with the same first target location and the second parts of storage nodes with the same second target location can be the same or different.

[0066] Specifically, the step of reordering the first part of storage nodes based on the first target position and reordering the second part of storage nodes based on the second target position according to the order of the same position to obtain the target bipartite topology map corresponding to the target storage system includes: reordering the first part of storage nodes based on the first target position according to the order of the positions from front to back, and in the reordering process, sorting the first part of storage nodes with the same first target position according to the order of the positions from front to back or from back to front based on the first initial position; reordering the second part of storage nodes based on the second target position according to the order of the positions from front to back, and in the reordering process, sorting the second part of storage nodes with the same second target position according to the order of the positions from front to back or from back to front based on the second initial position to obtain the target bipartite topology map corresponding to the target storage system.

[0067] Specifically, the step of reordering the first part of storage nodes based on the first target position and reordering the second part of storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system includes: reordering the first part of storage nodes based on the first target position according to the position from back to front, and in the reordering process, sorting the first part of storage nodes with the same first target position based on the first initial position according to the position from front to back or from back to front; reordering the first part of storage nodes based on the first target position according to the position from back to front, and in the reordering process, sorting the first part of storage nodes with the same first target position based on the first initial position according to the position from front to back or from back to front, to obtain the target bipartite topology map corresponding to the target storage system.

[0068] See details Figure 3 The diagram shown is a schematic of a target bipartite topology graph structure. Compared with the initial bipartite topology graph, the target bipartite graph shows fewer intersections, clearer connections, and a more organized structure.

[0069] In this embodiment, only the average value needs to be calculated. The method is simple, involves few calculations, and is fast, and will not affect the rendering efficiency of the topology map on the front-end HTML page.

[0070] In this embodiment, the specific location can be represented by taking one node as the origin coordinate and determining the coordinates of other nodes based on the origin coordinate, and then determining the position of each node in turn. Other methods can also be used, which will not be described in detail here.

[0071] As can be seen, this application obtains an initial bipartite topology map corresponding to the target storage system; determines a combination of second-part storage nodes connected to each first-part storage node, and determines a combination of first-part storage nodes connected to each second-part storage node; takes the average position corresponding to the second initial position of all second-part storage nodes in the second-part storage node combination as the first target position of the corresponding connected first-part storage node; takes the average position corresponding to the first initial position of all first-part storage nodes in the first-part storage node combination as the second target position of the corresponding connected second-part storage node; and reorders the first-part storage nodes based on the first target position according to the order of the same position, and reorders the second-part storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system. Therefore, this application uses the average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination as the first target position of the corresponding connected first part storage node, and uses the average position corresponding to the first initial position of all the first part storage nodes in the first part storage node combination as the second target position of the corresponding connected second part storage node. Then, the nodes are reordered based on the first target position and the second target position, so that the final target bipartite topology graph has fewer intersection points and a clear and orderly layout. In addition, the algorithm is simple to calculate the average position directly. In summary, this application can easily complete the topology graph layout and make the topology graph layout clear.

[0072] This application discloses a specific method for creating a storage topology graph. Compared to the previous embodiment, this embodiment further explains and optimizes the technical solution. See also... Figure 4 As shown, it specifically includes:

[0073] Step S21: Obtain the initial bipartite topology map corresponding to the target storage system, and set the initial storage node sequence number based on the storage nodes in the first part and the second part of the initial bipartite topology map, respectively, where the storage nodes are located before and after the nodes.

[0074] In this embodiment, initial storage node numbers are set for the first part of the storage nodes and the second part of the storage nodes. Alternatively, the numbers can be set randomly. As long as the numbers are not changed after being set, they will not affect the subsequent calculation process.

[0075] In this embodiment, the first part of the storage nodes and the second part of the storage nodes may be related or unrelated. For example, if the first part of the storage nodes are numbered 1, 2, 3 and 4 and the second part of the storage nodes are numbered 5, 6 and 7, this is related. If the first part of the storage nodes are numbered 1, 2, 3 and 4 and the second part of the storage nodes are numbered 1, 2 and 3, this is unrelated.

[0076] It should be noted that the code for sorting the two groups of nodes separately is shown below:

[0077]

[0078]

[0079] In this table, `part1` represents the first part of the storage nodes, `part2` represents the second part of the storage nodes, `id` represents the assigned sequence number, `label` represents the node identifier (or tag), `cluster` represents the part to which the node belongs (or the tag field), `edges` represents the table connecting the nodes in the topology graph, `source` is the unique ID of the starting node, and `target` is the unique ID of the ending node. The node sequences for A, B, C, D, E, and F are 0, 1, 2, 3, 4, 5, and 6, respectively, and the node sequences for a, b, c, and d are 6, 7, 8, and 9, respectively. The code below `edges` then describes the connection relationships between different nodes; for example, `source:'0', target:'6'` indicates that A and a are connected.

[0080] It should be noted that if the first part of the storage nodes and the second part of the storage nodes have the same sequence number, then it is necessary to indicate which part the node belongs to. For example, if the sequence number of A is 0 and the sequence number of a is also 0, then it is necessary to indicate that the sequence number of A is 0 of part1 and the sequence number of a is 0 of part2.

[0081] Step S22: Determine the combination of second-part storage nodes connected to each first-part storage node, and determine the combination of first-part storage nodes connected to each second-part storage node.

[0082] Step S23: Take the average value of the initial storage node sequence numbers of all the second part storage nodes in the second part storage node combination as the first target sequence number of the corresponding connected first part storage node.

[0083] Step S24: Take the average value of the initial storage node sequence numbers of all the first part storage nodes in the first part storage node combination as the second target sequence number of the corresponding connected second part storage node.

[0084] In this embodiment, nodes in part1 are represented by 'o', and nodes in part2 are represented by 'h'; it is necessary to find the set of nodes belonging to part2 that are connected to 'o'. o , addition and set o The sequence number of all nodes (initial storage node sequence number o.index) is divided by the set. o The number of nodes within the range is used to obtain the new index of o (the first target index o.index′), as described in the first formula; additionally, it is necessary to find the set of nodes belonging to part1 that are connected to h. h , addition and set h The sequence number of all nodes (initial storage node sequence number h.index) is divided by the set. h The number of nodes within the range is used to obtain a new index h (the second target index h.index′), as shown in the second formula; o can be A, B, C, D, E, and F, and h can be a, b, c, and d. index represents the index.

[0085] The first formula is: The second formula is |set o | indicates set o The number of nodes in |set h | indicates set h The number of nodes in the array.

[0086] Step S25: Based on the same sequence number, reorder the first part of the storage nodes according to the first target sequence number, and reorder the second part of the storage nodes according to the second target sequence number to obtain the target bipartite topology map corresponding to the target storage system.

[0087] In this embodiment, after determining the first target sequence number and the second target sequence number, the sequence number order from front to back can be used as the third sorting order, or the position order from back to front can be used as the fourth sorting order. It should be noted that the two parts of storage nodes need to have the same sorting order. Furthermore, as long as the two parts have the same sorting order, regardless of whether it is the third or fourth sorting order, if there are first-part storage nodes with the same first target sequence number, they can be sorted according to either the third or fourth sorting order. Similarly, if there are second-part storage nodes with the same second target sequence number, they can be sorted according to either the third or fourth sorting order. The sorting order of the first-part storage nodes with the same first target sequence number and the second-part storage nodes with the same second target sequence number can be the same or different.

[0088] Specifically, the step of reordering the first part of storage nodes based on the first target sequence number and reordering the second part of storage nodes based on the second target sequence number to obtain the target bipartite topology map corresponding to the target storage system includes: reordering the first part of storage nodes based on the first target sequence number in descending order of sequence number, and during the reordering process, sorting the first part of storage nodes with the same first target sequence number based on the initial storage node sequence number in descending order of sequence number or in ascending order of sequence number; reordering the second part of storage nodes based on the second target sequence number in descending order of sequence number, and during the reordering process, sorting the second part of storage nodes with the same second target sequence number based on the initial storage node sequence number in descending order of sequence number or in ascending order of sequence number, to obtain the target bipartite topology map corresponding to the target storage system.

[0089] Specifically, the step of reordering the first part of the storage nodes based on the first target sequence number and reordering the second part of the storage nodes based on the second target sequence number to obtain the target bipartite topology map corresponding to the target storage system includes: reordering the first part of the storage nodes based on the first target sequence number in ascending order of sequence number, and during the reordering process, sorting the first part of the storage nodes with the same first target sequence number based on the initial storage node sequence number in either descending or ascending order of sequence number; and reordering the second part of the storage nodes based on the second target sequence number in ascending order of sequence number, and during the reordering process, sorting the second part of the storage nodes with the same second target sequence number based on the initial storage node sequence number in either descending or ascending order of sequence number to obtain the target bipartite topology map corresponding to the target storage system.

[0090] In this embodiment, the sequence number is directly set for calculation, and the average value is directly calculated. The algorithm is simple and will not affect the rendering efficiency of the topology map on the front-end HTML page.

[0091] It should be noted that some of the core code for the above steps is shown below:

[0092]

[0093]

[0094]

[0095]

[0096] It should be noted that after the storage topology graph creation method of this application is implemented, the intersections between the edges of the nodes are significantly reduced.

[0097] As can be seen, this application obtains an initial bipartite topology map corresponding to the target storage system, sets initial storage node indices based on the preceding and following positions of the storage nodes being the first and second part storage nodes of the initial bipartite topology map, respectively; determines the combination of second part storage nodes connected to each first part storage node, and determines the combination of first part storage nodes connected to each second part storage node; takes the average of the initial storage node indices of all second part storage nodes in the second part storage node combination as the first target indices of the corresponding connected first part storage nodes; takes the average of the initial storage node indices of all first part storage nodes in the first part storage node combination as the second target indices of the corresponding connected second part storage nodes; and reorders the first part storage nodes based on the first target indices and the second part storage nodes based on the second target indices according to the same indices, to obtain the target bipartite topology map corresponding to the target storage system. Therefore, this application simplifies the calculation process by using sequence numbers instead of positions. Furthermore, the average of the initial storage node sequence numbers of all second-part storage nodes in the second-part storage node combination is used as the first target sequence number of the corresponding connected first-part storage node, and the average of the initial storage node sequence numbers of all first-part storage nodes in the first-part storage node combination is used as the second target sequence number of the corresponding connected second-part storage node. Then, the nodes are reordered based on the first and second target sequence numbers, resulting in fewer intersection points in the target bipartite topology graph and a clear and organized layout. Additionally, the algorithm is very simple, using sequence numbers and directly calculating the average value. In summary, this application can easily complete the topology graph layout, resulting in a clear topology graph layout.

[0098] Accordingly, this application also discloses a storage topology graph creation apparatus, see [link to relevant documentation]. Figure 5 As shown, the device includes:

[0099] Topology acquisition module 11 is used to acquire the target bipartite topology map corresponding to the target storage system;

[0100] The node combination determination module 12 is used to determine the combination of second part storage nodes connected to each first part storage node, and to determine the combination of first part storage nodes connected to each second part storage node.

[0101] The first position determination module 13 is used to take the average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination as the first target position of the corresponding connected first part storage node.

[0102] The second position determination module 14 is used to take the average position corresponding to the first initial position of all the first part of the storage node combination as the second target position of the corresponding connected second part of the storage node.

[0103] The sorting module 15 is used to reorder the first part of the storage nodes based on the first target position according to the sorting order of the same position, and regroup the second part of the storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system.

[0104] The more specific working process of each of the above modules can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0105] As can be seen, this application uses the average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination as the first target position of the corresponding connected first part storage node, and uses the average position corresponding to the first initial position of all the first part storage nodes in the first part storage node combination as the second target position of the corresponding connected second part storage node. Then, the nodes are reordered based on the first target position and the second target position, so that the final target bipartite topology graph has fewer intersection points and a clear and orderly layout. In addition, the algorithm is simple by directly calculating the average position. In summary, this application can easily complete the topology graph layout and make the topology graph layout clear.

[0106] Furthermore, embodiments of this application also provide an electronic device. Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0107] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the storage topology map creation method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0108] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0109] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. The computer programs 221 may include, in addition to computer programs capable of performing the storage topology map creation method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, computer programs capable of performing other specific tasks.

[0110] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned storage topology graph creation method.

[0111] The specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0112] The various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts between the various embodiments, refer to each other. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to in the method section.

[0113] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0114] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0115] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0116] The above provides a detailed description of a storage topology map creation method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for creating a storage topology graph, characterized in that, include: Obtain the initial bipartite topology graph corresponding to the target storage system; Determine the combination of second-part storage nodes connected to each first-part storage node, and determine the combination of first-part storage nodes connected to each second-part storage node; The average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination is taken as the first target position of the corresponding connected first part storage node. The average position corresponding to the first initial position of all the first part of the storage node combination is taken as the second target position of the corresponding connected second part of the storage node. Based on the order of the same position, the first part of the storage nodes is reordered based on the first target position, and the second part of the storage nodes is reordered based on the second target position to obtain the target bipartite topology map corresponding to the target storage system; The process of obtaining the initial bipartite topology graph corresponding to the target storage system includes: Obtain the initial bipartite topology map corresponding to the target storage system, and set the initial storage node sequence number based on the storage nodes in the first part and the second part of the initial bipartite topology map, respectively, where the storage nodes are located before and after the nodes. The step of using the average position corresponding to the second initial position of all the second part of the storage nodes in the second part of the storage node combination as the first target position of the corresponding connected first part of the storage node; and using the average position corresponding to the first initial position of all the first part of the storage nodes in the first part of the storage node combination as the second target position of the corresponding connected second part of the storage node, includes: The average value of the initial storage node numbers of all the second part storage nodes in the second part storage node combination is used as the first target number of the corresponding connected first part storage node; the average value of the initial storage node numbers of all the first part storage nodes in the first part storage node combination is used as the second target number of the corresponding connected second part storage node. Accordingly, the step of reordering the first part of the storage nodes based on the first target position according to the sequential order of the same position, and reordering the second part of the storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system includes: Based on the same sequence number, the first part of the storage nodes are reordered according to the first target sequence number, and the second part of the storage nodes are reordered according to the second target sequence number to obtain the target bipartite topology map corresponding to the target storage system.

2. The storage topology graph creation method according to claim 1, characterized in that, The step of reordering the first part of the storage nodes based on the first target position and reordering the second part of the storage nodes based on the second target position, according to the sequential order of the same position, to obtain the target bipartite topology map corresponding to the target storage system, includes: Based on the first target position, the first part of the storage nodes are reordered according to the order of their positions from front to back. During the reordering process, the first part of the storage nodes with the same first target position are sorted according to the order of their positions from front to back or from back to front, based on the first initial position. Based on the second target position, the second part of the storage nodes are reordered according to the order of their positions from front to back. During the reordering process, the second part of the storage nodes with the same second target position are sorted according to the order of their positions from front to back or from back to front, based on the second initial position, so as to obtain the target bipartite topology map corresponding to the target storage system.

3. The storage topology graph creation method according to claim 1, characterized in that, The step of reordering the first part of the storage nodes based on the first target position and reordering the second part of the storage nodes based on the second target position, according to the sequential order of the same position, to obtain the target bipartite topology map corresponding to the target storage system, includes: Based on the first target position, the first part of the storage nodes are reordered according to the order of their positions from back to front. During the reordering process, the first part of the storage nodes with the same first target position are sorted according to the order of their positions from front to back or from back to front, based on the first initial position. Based on the first target position, the first part of the storage nodes are reordered according to the order of their positions from back to front. During the reordering process, the first part of the storage nodes with the same first target position are sorted according to the order of their positions from front to back or from back to front, based on the first initial position, so as to obtain the target bipartite topology map corresponding to the target storage system.

4. The storage topology graph creation method according to claim 1, characterized in that, The step of reordering the first part of the storage nodes based on the first target sequence number and reordering the second part of the storage nodes based on the second target sequence number, according to the same sequence number, to obtain the target bipartite topology map corresponding to the target storage system, includes: The first part of the storage nodes are reordered based on the first target sequence number according to the sequence number from largest to smallest. In the reordering process, the first part of the storage nodes with the same first target sequence number are sorted based on the initial storage node sequence number according to the sequence number from largest to smallest or from smallest to largest. The second part of the storage nodes are reordered based on the second target sequence number in descending order of sequence number. During the reordering process, the second part of the storage nodes with the same second target sequence number are sorted based on the initial storage node sequence number in descending or ascending order of sequence number to obtain the target bipartite topology map corresponding to the target storage system.

5. The storage topology graph creation method according to claim 1, characterized in that, The step of reordering the first part of the storage nodes based on the first target sequence number and reordering the second part of the storage nodes based on the second target sequence number, according to the same sequence number, to obtain the target bipartite topology map corresponding to the target storage system, includes: The first part of the storage nodes are reordered based on the first target sequence number according to the sequence number in ascending order. In the reordering process, the first part of the storage nodes with the same first target sequence number are sorted based on the initial storage node sequence number according to the sequence number in descending order or in ascending order. Based on the second target sequence number, the second part of the storage nodes are reordered according to the sequence number in ascending order. During the reordering process, the second part of the storage nodes with the same second target sequence number are sorted according to the sequence number in descending order or in ascending order, based on the initial storage node sequence number, so as to obtain the target bipartite topology map corresponding to the target storage system.

6. A storage topology map creation apparatus, characterized in that, The steps for implementing the storage topology graph creation method as described in claim 1 include: The topology graph acquisition module is used to acquire the target bipartite topology graph corresponding to the target storage system; The node combination determination module is used to determine the combination of second-part storage nodes connected to each first-part storage node, and to determine the combination of first-part storage nodes connected to each second-part storage node. The first position determination module is used to take the average position corresponding to the second initial position of all the second part storage nodes in the second part storage node combination as the first target position of the corresponding connected first part storage node. The second position determination module is used to take the average position corresponding to the first initial position of all the first part of the storage node combination as the second target position of the corresponding connected second part of the storage node. The sorting module is used to reorder the first part of the storage nodes based on the first target position according to the sorting order of the same position, and regroup the second part of the storage nodes based on the second target position to obtain the target bipartite topology map corresponding to the target storage system.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the storage topology graph creation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the storage topology graph creation method as described in any one of claims 1 to 5.