AntvG6-based liquid flow direction topological graph generation method and device
Through the liquid flow direction topology diagram generation method based on AntvG6, the problem that the position distribution relationship between CDU and cabinet in the prior art is difficult to accurately reflect. The generated topology diagram can accurately reflect the position relationship between nodes, improving operation and maintenance efficiency and reliability .
Patent Information
- Application Number
- CN202411365126.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The existing liquid flow direction topology diagrams describe the liquid flow between the refrigerant exchange unit (CDU) and the cabinet, which cannot accurately reflect the position distribution relationship between the CDU and the cabinet, resulting in difficulty in positioning abnormalities or potential problems.
Using the liquid flow direction topology diagram generation method based on AntvG6, by obtaining multiple node arrays, determine the coordinate information of each node under the specified coordinate system, and generate a topology diagram based on the connection attributes and connection attributes of the nodes to ensure the nodes between the nodes in the graph. The positional relationship accurately reflects the distribution relationship between the CDU and the cabinet.
The generated liquid flow direction topology can accurately reflect the position distribution relationship between the CDU and the cabinet, help position and solve potential problems, and improve the system's operation and maintenance efficiency and reliability.
Smart Images

Figure CN119201637A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of operation and maintenance technology, and in particular to a method and device for generating a liquid flow topology map based on AntvG6. Background Art
[0002] In some applications, such as server cooling applications, the flow of liquid between the Cooling Distribution Unit (CDU) and the cabinet is often described based on a liquid flow topology map. However, the current liquid flow topology map is relatively simple and cannot accurately reflect the location distribution relationship between the CDU and the cabinet, which makes it difficult to locate abnormalities or potential problems. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a method and device for generating a liquid flow topology map based on AntvG6, so that the generated liquid flow topology map can accurately reflect the topology map of the position distribution relationship between the CDU and the cabinet.
[0004] The embodiment of the present application provides a method for generating a liquid flow topology map based on AntvG6, and the method is applied to AntvG6; the method includes:
[0005] A plurality of node arrays are obtained; any node array includes at least one node; any node in any node array is a sensor, a primary side device, a CDU, or a cabinet;
[0006] Determine the coordinate information of each node in the specified node array in the specified coordinate system; the specified node array is one of multiple node arrays, the upper left corner of the area where the specified node in the specified node array is located is the origin of the specified coordinate system, and the area is the minimum area that completely accommodates the specified node;
[0007] Based on the coordinate information of each node in the specified node array in the specified coordinate system, determine the coordinate information of each node in other node arrays except the specified node array in the specified coordinate system;
[0008] A liquid flow topology map based on AntvG6 is generated according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node; the connection attribute information configured for any node is used to indicate whether the node is connected to other nodes, and the connection position information of the node when the node is connected to other nodes; the connection position information of the node is another coordinate information of the area where the node is located and is different from the coordinate information of the node; the line attribute information of any node refers to whether the line between the node and other nodes is a straight line or a broken line, and the coordinate information of the inflection point when it is a broken line.
[0009] The embodiment of the present application also provides a liquid flow topology map generating device based on AntvG6, and the device is applied to AntvG6; the device includes:
[0010] An acquisition module is used to obtain multiple node arrays; any node array includes at least one node; any node in any node array is a sensor, a primary side device, a CDU, or a cabinet;
[0011] The first determination module is used to determine the coordinate information of each node in the specified node array in the specified coordinate system; the specified node array is one of the multiple node arrays, the upper left corner of the area where the specified node in the specified node array is located is the origin of the specified coordinate system, and the area is the minimum area that completely accommodates the specified node;
[0012] A second determination module is used to determine the coordinate information of each node in other node arrays except the specified node array in the specified coordinate system based on the coordinate information of each node in the specified node array in the specified coordinate system;
[0013] A generation module is used to generate a liquid flow topology map based on AntvG6 according to the coordinate information of each node in a specified coordinate system, the connection attribute information of each node, and the line attribute information of each node; the connection attribute information configured for any node is used to indicate whether the node is connected to other nodes, and the connection position information of the node when the node is connected to other nodes; the connection position information of the node is another coordinate information of the area where the node is located and is different from the coordinate information of the node; the line attribute information of any node refers to whether the connection between the node and other nodes is a straight line or a broken line, and the coordinate information of the inflection point when it is a broken line.
[0014] An embodiment of the present application also provides an electronic device, including: a processor and a computer-readable storage medium, wherein computer program instructions are stored in the computer-readable storage medium, and when the computer program instructions are executed by the processor, the processor executes the steps of the above method.
[0015] An embodiment of the present application also provides a computer-readable storage medium, which stores computer program instructions. When the computer program instructions are executed, the steps of the above method can be implemented.
[0016] It can be seen from the above technical solutions that in this embodiment, by obtaining multiple node arrays, the coordinate information of each node in the specified node array in the specified coordinate system is determined, and based on the coordinate information of each node in the specified node array in the specified coordinate system, the coordinate information of each node in other node arrays other than the specified node array in the specified coordinate system is determined, and according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node, a liquid flow topology map based on AntvG6 is generated. Since the liquid flow topology map is generated based on the coordinate information of each node, this implies the positional relationship between each node. Based on the positional relationship between each node, the positional distribution relationship between the CDU and the cabinet can be obtained, that is, the generated liquid flow topology map can accurately reflect the positional distribution relationship between the CDU and the cabinet. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of a process for a method provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a process for determining coordinate information of each node in a specified node array in a specified coordinate system provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a process for determining coordinate information of each node in other node arrays in a specified coordinate system provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of a process for generating a liquid flow topology map based on AntvG6 provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of a liquid flow topology diagram provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of the device provided in the embodiment of the present application;
[0023] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0025] See also Figure 1 , Figure 1 The following is a flow chart of the method provided in the embodiment of the present application. As an embodiment, the method can be executed by AntvG6. Figure 1 As shown, the process may include the following steps:
[0026] S101, obtain multiple node arrays; any node array includes at least one node; any node in any node array is one of a sensor, a primary side device, a CDU, or a cabinet.
[0027] In this embodiment, multiple node data are obtained from multiple groups of operation data, which are obtained by grouping the operation data of each node. The operation data of each node is obtained in the following manner: AntvG6 communicates with each node (such as primary side equipment, sensors, CDU and cabinet) through the ModBus protocol to receive the operation data of each node. As an embodiment, the grouping is performed in the order required by the liquid flow topology diagram.
[0028] S102, determining the coordinate information of each node in the specified node array in the specified coordinate system; the specified node array is one of multiple node arrays, the upper left corner of the area where the specified node in the specified node array is located is the origin of the specified coordinate system, and the area is the minimum area that completely accommodates the specified node.
[0029] From the above description, it can be seen that multiple groups of operating data are grouped according to the order required by the liquid flow topology map, which makes each node array sorted according to the order required by the liquid flow topology map, that is, each node array of the node array sequence is arranged in the order required by the liquid flow topology map.
[0030] In this embodiment, as an embodiment, the designated node array is the first node array in the above node array sequence. The designated node is the primary side device in the first node array. That is, the upper left corner of the primary side device is the origin of the designated coordinate system.
[0031] In this embodiment, the specific implementation method of determining the coordinate information of each node in the specified node array in the specified coordinate system will be described later and will not be repeated here.
[0032] S103, based on the coordinate information of each node in the designated node array in the designated coordinate system, determine the coordinate information of each node in other node arrays except the designated node array in the designated coordinate system.
[0033] In this embodiment, the specific implementation of step S103 will also be described later and will not be repeated here.
[0034] S104, generates a liquid flow topology map based on AntvG6 according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node; the connection attribute information configured for any node is used to indicate whether the node is connected to other nodes, and the connection position information of the node when the node is connected to other nodes; the connection position information of the node is another coordinate information of the area where the node is located and is different from the coordinate information of the node; the line attribute information of any node refers to whether the line between the node and other nodes is a straight line or a broken line, and the coordinate information of the inflection point when it is a broken line.
[0035] In this embodiment, the specific implementation of step S104 will also be described later and will not be repeated here.
[0036] So far, completed Figure 1 The process shown.
[0037] pass Figure 1 It can be seen from the process shown that in this embodiment, by obtaining multiple node arrays, the coordinate information of each node in the specified node array in the specified coordinate system is determined, and based on the coordinate information of each node in the specified node array in the specified coordinate system, the coordinate information of each node in other node arrays other than the specified node array in the specified coordinate system is determined, and according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node, a liquid flow topology map based on AntvG6 is generated. Since the liquid flow topology map is generated based on the coordinate information of each node, it implicitly includes the positional relationship between each node. According to the positional relationship between each node, the positional distribution relationship between the CDU and the cabinet can be obtained, that is, the generated liquid flow topology map can accurately reflect the positional distribution relationship between the CDU and the cabinet.
[0038] The following is a detailed description of the coordinate information of each node in the specified node array in the specified coordinate system:
[0039] See also Figure 2 , Figure 2 A schematic diagram of a process for determining the coordinate information of each node in a specified node array in a specified coordinate system provided in an embodiment of the present application.
[0040] In this embodiment, any node in any node array has a corresponding node identifier. The node identifier is represented by the node type and the identifier of the node group. Here, the node type is divided according to the primary side device, CDU, cabinet, and sensors connected to different positions of the CDU. For ease of expression, each node type is represented by a corresponding node type identifier. For example, there are 7 types of node types, the primary side device is recorded as node0, sensor 1 is recorded as node1, sensor 2 is recorded as node2, sensor 3 is recorded as node3, sensor 4 is recorded as node4, CDU is recorded as CDU, and cabinet is recorded as rack.
[0041] It should be noted that sensor 1, sensor 2, sensor 3, and sensor 4 are different node types because their connection positions when connected to the primary side device and CDU are different.
[0042] For example, if the node type of the node is a primary device (node0) and belongs to the first node array, it is recorded as node0-1.
[0043] In this embodiment, each node in the specified node array belongs to a different node type.
[0044] like Figure 2 As shown, the process may include the following steps:
[0045] S201, obtaining the size of the region where each node in the specified node array is located.
[0046] In this embodiment, the area where any node is located is the size of the device corresponding to the node. For example, if the node type of the node is a primary side device, the size of the area where the node is located is the size corresponding to the primary side device. The sizes of the primary side device, CDU, cabinet, and sensors connected to different locations of the CDU are preset in advance.
[0047] S202, determining the coordinate information of each node in a specified coordinate system according to the size of the area where each node is located.
[0048] As an embodiment, the specific implementation method of the above step S202 is: for each node in the specified node array, according to the node type indicated by the node label of the node, obtain the size of the area where the node associated with the node type is located, and perform an operation matching the node type on the size of the area where the associated node is located to obtain the coordinate information of the node in the specified coordinate system.
[0049] In this embodiment, the nodes associated with each node type and the operations matched with the node types will be described in detail below in the form of specific embodiments, and will not be described in detail here.
[0050] In this embodiment, the coordinate information of each node in the specified node array in the specified coordinate system is obtained in the above manner, which provides a solid foundation for the subsequent generation of the liquid flow topology diagram to imply the positional relationship between each node.
[0051] The above is a detailed description of the method of determining the coordinate information of each node in the specified node array in the specified coordinate system.
[0052] The following is a detailed description of the above determination of the coordinate information of each node in the other node arrays in the specified coordinate system:
[0053] See also Figure 3 , Figure 3 A schematic diagram of a process for determining the coordinate information of each node in other node arrays in a specified coordinate system provided in an embodiment of the present application.
[0054] In this embodiment, the node identifier of any node is also represented by the number position of the node in the node group to which it belongs; the number position of any node indicates the order of the node under the node type to which it belongs.
[0055] For example, if the node type of a node is a primary device (node0), the node belongs to the first node array and is the first primary device in the grouped node, recorded as node0-1-1. For another example, if the node type of a node is a CDU (CDU), the node belongs to the third node array and is the second CDU in the grouped node, recorded as CDU-3-2.
[0056] like Figure 3 As shown, the process may include the following steps:
[0057] S301, traverse the node array sequence starting from the next node array of the specified node array, and use the traversed node array as the current node array; the node arrays of the node array sequence are arranged in the order required by the liquid flow topology diagram; the first node array in the node array sequence is the specified node array.
[0058] S302, traverse each node in the current node array according to a set order, and use the traversed node as the current node.
[0059] In this embodiment, the setting order is set according to actual operation requirements, and the embodiment of the present application is not specifically limited.
[0060] S303, determining the reference node corresponding to the current node according to the node type indicated by the node identifier of the current node and the position of the indicated current node in the current node array, and obtaining the coordinate information of the reference node in the specified coordinate system.
[0061] In this embodiment, as an embodiment, if the node type of the current node is not the first specified node type (for example, the first specified node type is rack), the last traversed node belonging to the same node type as the current node is determined as the reference node of the current node.
[0062] If the node type of the current node is the first specified node type, then when the current node is determined to be the first node of the first specified node type in the current node array based on the number position of the current node in the current node array, the last node of the second specified node type (for example, the second specified node type is CDU, CDU) in the previous node array of the current node array is determined as the reference node of the current node.
[0063] When the current node is determined to be a non-first node of the first specified node type in the current node array according to the number position of the current node in the current node array, the last traversed node of the first specified node type is determined as a reference node.
[0064] That is to say, if the node type of the current node is not rank, the coordinate information of the last traversed rank node is calculated according to the node type corresponding to the current node to obtain the coordinate information of the current node. The last traversed rank node is the coordinate information of the rank node in the first node array.
[0065] If the node type of the current node is rank and it is the first rank node in the current node array, the coordinate information of the last CDU node in the previous node array of the current node array is calculated to obtain the coordinate information of the current node.
[0066] If the node type of the current node is rank, and it is not the first rank node in the current node array, the coordinate information of the previous rank node in the current node array is calculated to obtain the coordinate information of the current node.
[0067] S304, determining the coordinate information of the current node in the specified coordinate system according to the coordinate information of the reference node in the specified coordinate system.
[0068] The specific implementation of step S304 will also be described in detail later in the form of a specific embodiment, and will not be described in detail here.
[0069] In this embodiment, based on the first node under each node type, the coordinate information of each node in each node array other than the specified node array in the specified coordinate system is determined in the above manner. In this way, the node position information can be accurately determined, and the topology map generated based on these node positions includes the position information, which can reflect the distribution relationship between the CDU and the cabinet.
[0070] The above is a detailed description of the above-mentioned determination of the coordinate information of each node in each node array other than the specified node array in the specified coordinate system.
[0071] The following is a detailed description of the liquid flow topology diagram generated based on AntvG6:
[0072] See also Figure 4 , Figure 4 A schematic diagram of the process of generating a liquid flow topology map based on AntvG6 provided in an embodiment of the present application.
[0073] like Figure 4 As shown, the process may include the following steps:
[0074] S401, for the first node, if it is determined that the connection between the node and the second node is a straight line based on the connection attribute information of the first node, then the first node and the second node are connected according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node, and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node; the first node is different from the second node.
[0075] In this embodiment, the connection attribute information of any node is pre-configured according to the connection requirements of the liquid flow topology diagram, and the connection position information of each node can be configured according to a priori values. Configuring the connection attribute information of each node can also be called configuring the anchorPoints attribute of each node.
[0076] In this embodiment, the connection attribute information of any node indicates whether the connection between the node and other nodes is a straight line or a broken line, which is pre-configured. However, the coordinate information of the inflection point when determining the discount does need to be determined in real time. The specific method of obtaining the inflection point position will be explained later and will not be repeated here.
[0077] S402, if it is determined that the connection between the first node and the second node is a broken line based on the connection attribute information of the first node, then the coordinate information of the inflection point of the broken line in the specified coordinate system is determined based on the coordinate information of each node in the specified coordinate system; and according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node, the coordinate information of the inflection point in the specified coordinate system, and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node, the first node, the inflection point, and the second node are connected.
[0078] In this embodiment, there are many specific implementation methods for determining the coordinate information of the inflection point of the polyline in the specified coordinate system according to the coordinate information of each node in the specified coordinate system. For example, as an embodiment, if it is determined that the first node and the second node belong to the specified node array, the coordinate information of the inflection point in the specified coordinate system is obtained. In other words, if the specified node array is the first node array, the coordinate information of the inflection point between the first node and the second node in the node array is manually set, and the coordinate position of the inflection point is manually set according to the inflection point requirements required by the liquid flow topology diagram.
[0079] If it is determined that the first node and the second node do not belong to the specified node array, then obtain the first reference node in the specified node array that belongs to the same category as the first node, and the second reference node in the specified node array that belongs to the same category as the second node, and determine the coordinate information of the inflection point in the specified coordinate system based on the obtained coordinate information of the inflection point between the first reference node and the second reference node in the specified coordinate system.
[0080] That is, if the specified node array is not the first node array, the coordinate information of the inflection point between the first node and the second node in the node array is calculated based on the coordinate information of the inflection point between the first node and the second node in the first node array.
[0081] The specific implementation of the above steps S401 and S402 will also be described in detail in the following text in the form of specific embodiments, and will not be repeated here.
[0082] S403, generating a liquid flow topology diagram according to the connection relationship between each node.
[0083] In this embodiment, since the position information of the inflection points on the broken line corresponding to the first group of node arrays is set based on the requirements of the liquid flow topology map, the position information of the inflection points on the broken lines corresponding to other node arrays is set based on the position information of the above-mentioned hanging points. This makes it possible for the coordinate information of each inflection point obtained in the specified coordinate system to also meet the requirements of the liquid flow topology map, that is, to meet the requirements of the actual operation project.
[0084] In order to explain the method provided by the present application in more detail, the scheme provided by the present application is described in more detail below in the form of specific embodiments.
[0085] In this embodiment, Figure 5 The final liquid flow topology diagram is shown in Figure 1. That is, AntvG6 runs its own preset script to process the multiple sets of data provided in the following steps to obtain the following Figure 5 The liquid flow topology is shown.
[0086] The process includes the following steps:
[0087] 1. Get multiple node arrays.
[0088] Any node in any node array has a corresponding node identifier, which is characterized by the node type, the identifier of the node group, and the number position of the node in the node group to which it belongs.
[0089] For the first node array, the node identifier of the primary device node is node0-1-1, the node identifier of the sensor 1 node is node1-1-1, the node identifier of the sensor 2 node is node2-1-1, the node identifier of the sensor 3 node is node3-1-1, the node identifier of the sensor 4 node is node4-1-1, the node identifier of the CDU node is CDU-1-1, and the node identifier of the cabinet node is rack-1-1.
[0090] 2. Calculate the coordinates of each node corresponding to the first node array in the specified coordinate system.
[0091] The primary side device is a rectangle, and the coordinate system is specified with the upper left corner of the secondary device on one side as the origin, the width of the primary side device is the horizontal coordinate direction, and the height of the primary side device is the vertical coordinate direction.
[0092] Get the size of the area where each node in the first node array is located, and determine the coordinate information of each node in the specified coordinate system based on the size of the area where each node is located.
[0093] Specifically, there are 7 node types in the first node array, that is, each node in the first node array belongs to a different node type, and each node is ranked first in the node type to which it belongs in the node group.
[0094] It is known that the size of the area where these 7 nodes are located (that is, the set size of these 7 devices) is:
[0095] CDU height CDUHeight: number = 120;
[0096] CDU width CDUWidth: number = 207;
[0097] RackHeight:number=180;
[0098] RackWidth:number=215;
[0099] Primary side device width node0Width:number=50;
[0100] Primary side device height node0Height:number=300
[0101] Sensor 1 width node1Width: number = 20;
[0102] Sensor 1 height node1 Height: number = 30
[0103] Therefore, the coordinates of each node corresponding to the first node array in the specified coordinate system are as follows:
[0104] (1) The x coordinate of node0-1-1 is node0Width / 2, and the y coordinate is node0Height / 2
[0105] (2) The y coordinates of node1-1-1 and node3-1-1 are the same: rackHeight+CDUHeight / 4
[0106] (3) The x coordinates of node1-1-1 and node2-1-1 are the same: node0Width+rackWidth / 2
[0107] (4) The y coordinates of node2-1-1 and node4-1-1 are the same: rackHeight+CDUHeight / 4*3
[0108] (5) The x coordinates of node3-1-1 and node4-1-1 are the same:
[0109] node0Width+rackWidth+CDUWidth+rackWidth / 2
[0110] (6) x coordinate of CDU-1-1: node0Width+rackWidth+CDUWidth / 2;
[0111] The y coordinate of CDU-1-1: rackHeight+CDUHeight / 2
[0112] (7) The x coordinate of rack-1-1:
[0113] node0Width+rackWidth+CDUWidth+rackWidth+rackWidth / 2;
[0114] The y coordinate of rack-1-1: rackHeight / 2
[0115] 3. Determine the coordinate information of each node in each node array except the first node array in the specified coordinate system.
[0116] Specifically, the node array sequence is traversed starting from the second node array, the traversed node array is used as the current node array, each node in the current node array is traversed in a set order, and the traversed node is used as the current node.
[0117] If the node type of the current node is not rank, the calculation is performed according to the node type corresponding to the current node as shown in (1)-(6):
[0118] (1) The x coordinate of node0-1-1: node0Width / 2
[0119] The x coordinate of node0-2-1 is: the x coordinate of node0-1-1 + 0, and so on.
[0120] The x coordinate of node0-3-1 is: the x coordinate of node0-2-1 + 0
[0121] The y coordinate of node0-1-1 is node0Height / 2.
[0122] The y coordinate of node0-2-1: the y coordinate of node0-1-1 + node0Height;
[0123] The y coordinate of node0-3-1: the y coordinate of node0-2-1 + node0Height.
[0124] (2) The x coordinate of node1-1-1: node0Width+rackWidth / 2
[0125] The x-coordinate of node1-2-1: the x-coordinate of node1-1-1 + 0, and so on.
[0126] The x coordinate of node0-3-1: the x coordinate of node1-2-1 + 0
[0127] Y coordinate of node1-1-1: rackHeight+CDUHeight / 4
[0128] y coordinate of node1-2-1: y coordinate of node1-1-1 + rackHeight + CDUHeight
[0129] y coordinate of node1-3-1: y coordinate of node1-2-1 + rackHeight + CDUHeight
[0130] (3) The x coordinate of node2-1-1: node0Width+rackWidth / 2
[0131] Node2-2-1's x-coordinate: node2-1-1's x-coordinate + 0, and so on.
[0132] Node2-3-1's x coordinate: node2-2-1's x coordinate + 0
[0133] Node2-1-1's y coordinate: rackHeight+CDUHeight / 4*3
[0134] Node2-2-1's y coordinate: node2-1-1's y coordinate + rackHeight + CDUHeight
[0135] Node2-3-1's y coordinate: node2-2-1's y coordinate + rackHeight + CDUHeight
[0136] (4) The x coordinate of node3-1-1: node0Width+rackWidth+CDUWidth+rackWidth / 2 The x coordinate of node3-2-1: the x coordinate of node3-1-1+0, and so on.
[0137] Node3-3-1's x coordinate: node3-2-1's x coordinate + 0
[0138] Node3-1-1's y coordinate: rackHeight+CDUHeight / 4
[0139] Node3-2-1's y coordinate: node3-1-1's y coordinate + rackHeight + CDUHeight
[0140] Node3-3-1's y coordinate: node3-2-1's y coordinate + rackHeight + CDUHeight
[0141] (5) The x coordinate of node4-1-1: node0Width+rackWidth+CDUWidth+rackWidth / 2 The x coordinate of node4-2-1: the x coordinate of node4-1-1+0, and so on.
[0142] Node4-3-1's x coordinate: node4-2-1's x coordinate + 0
[0143] Node4-1-1's y coordinate: rackHeight+CDUHeight / 34
[0144] Node4-2-1's y coordinate: node4-1-1's y coordinate + rackHeight + CDUHeight
[0145] Node4-3-1's y coordinate: node4-2-1's y coordinate + rackHeight + CDUHeight
[0146] (6) x coordinate of CDU-1-1: node0Width+rackWidth+CDUWidth / 2;
[0147] The x-coordinate of CDU-2-1: the x-coordinate of CDU-1-1 + 0
[0148] The x-coordinate of CDU-3-1: the x-coordinate of CDU-2-1 + 0
[0149] The y coordinate of CDU-1-1: rackHeight+CDUHeight / 2
[0150] The y coordinate of CDU-2-1: the y coordinate of CDU-1-1 + rackHeight + CDUHeight
[0151] The y coordinate of CDU-3-1: the y coordinate of CDU-2-1 + rackHeight + CDUHeight
[0152] If the node type of the current node is rank and it is the first rank node in the current node array, the calculation is performed as shown in (7) below:
[0153] (7) The x coordinate of rack-1-1:
[0154] node0Width+rackWidth+CDUWidth+rackWidth+rackWidth / 2;
[0155] The x-coordinate of rack-2-1: the x-coordinate of rack-1-1 + 0
[0156] The y coordinate of rack-1-1: rackHeight / 2
[0157] The y coordinate of rack-2-1: the y coordinate of CDU-1-1 + 1 / 2 rackHeight + 1 / 2 CDUHeight
[0158] If the node type of the current node is rank and it is not the first rank node in the current node array, the calculation is performed as shown in (8) below:
[0159] (8) The x-coordinate of rack-3-1: the x-coordinate of rack-1-1 + 0
[0160] The x coordinate of rack-3-2: the x coordinate of rack-3-1 + 1.5 rackWidth
[0161] The x coordinate of rack-3-3: the x coordinate of rack-3-2 + 1.5 rackWidth
[0162] The x-coordinate of rack-3-4: the x-coordinate of rack-3-3 + 1.5 rackWidth
[0163] The y coordinate of rack-3-2: the y coordinate of rack-3-1 + 0
[0164] The y coordinate of rack-3-3: the y coordinate of rack-3-2 + 0
[0165] The y coordinate of rack-3-4: the y coordinate of rack-3-3 + 0
[0166] The coordinates of each node are determined in the above manner.
[0167] 4. Generate a liquid flow topology diagram based on the coordinates of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node.
[0168] (1) Obtain the connection attribute information of each node.
[0169] The connection attribute information of each node is configured according to a priori values, that is, the anchorPoints attribute of each node is configured according to a priori values.
[0170] For example, configuring the anchorPoints attribute of each node is to set whether the node is connected to other nodes, and the position of the connectable point in the area where the node is located when the node is connected to other nodes. For example, the anchorPoints attribute of node1 is [0, 0.26], which means that when node1 is a rectangle, the ratio of the length between the point in the upper right corner of the primary device and the connectable point to the height of the primary device is 0.26, and so on, the anchorPoints attribute of each node is set.
[0171] (2) Obtain the connection attribute information of each node.
[0172] Specifically, the connection between each node and other nodes is pre-configured as a straight line or a broken line. For example, in the first node array, the connection between node0 and node1, node0 and node2, node1 and CDU, node2 and CDU, CDU and node3, CDU and node4 is a straight line. The connection between node3 and rack, node4 and rack is a broken line.
[0173] Then, the coordinates of each inflection point are calculated as follows:
[0174] 1) In the first node array:
[0175] The inflection point between node3 and rack is:
[0176] The x-coordinate of the inflection point 1-1 is:
[0177] node0Width+rackWidth+CDUWidth+rackWidth+0.15rackWidth; the y coordinate of the turning point 1-1 is: the y coordinate of node3-1-1;
[0178] The x-coordinate of inflection point 1-2 is:
[0179] node0Width+rackWidth+CDUWidth+rackWidth+0.85rackWidth; the y coordinate of inflection point 1-2 is: the y coordinate of node4-1-1;
[0180] 2) In the second node array:
[0181] The x coordinate of inflection point 2-1 is: the x coordinate of inflection point 1-1 The y coordinate of inflection point 2-1 is: the y coordinate of inflection point 1-1 + rackWidth + CDUWidth The x coordinate of inflection point 2-2 is: the x coordinate of inflection point 1-2 The y coordinate of inflection point 2-2 is: the y coordinate of inflection point 2-1 + rackWidth + CDUWidth
[0182] 3) In the third node array:
[0183] The x coordinate of inflection point 3-1 is: the x coordinate of inflection point 2-1 The y coordinate of inflection point 3-1 is: the y coordinate of inflection point 2-1 + rackWidth + CDUWidth The x coordinate of inflection point 3-2 is: the x coordinate of inflection point 2-2 The y coordinate of inflection point 3-2 is: the y coordinate of inflection point 2-1 + rackWidth + CDUWidth The x coordinate of inflection point 3-3 is: the x coordinate of inflection point 3-1 + 1.5 rackWidth
[0184] The y coordinate of inflection point 3-3 is: the y coordinate of inflection point 3-1 The x coordinate of inflection point 3-4 is: the x coordinate of inflection point 3-2 + 1.5 rackWidth
[0185] The y coordinate of inflection point 3-4 is: the y coordinate of inflection point 3-2 The x coordinate of inflection point 3-5 is: the x coordinate of inflection point 3-3 + 1.5 rackWidth
[0186] The y coordinate of inflection point 3-5 is: the y coordinate of inflection point 3-3 The x coordinate of inflection point 3-6 is: the x coordinate of inflection point 3-4 + 1.5 rackWidth
[0187] The y coordinate of inflection point 3-6 is: the y coordinate of inflection point 3-4 The x coordinate of inflection point 3-7 is: the x coordinate of inflection point 3-5 + 1.5 rackWidth
[0188] The y coordinate of inflection point 3-7 is: the y coordinate of inflection point 3-5 The x coordinate of inflection point 3-8 is: the x coordinate of inflection point 3-6 + 1.5 rackWidth
[0189] The y coordinate of inflection point 3-8 is: the y coordinate of inflection point 3-6
[0190] And so on, the coordinate information of each inflection point is calculated.
[0191] (3) For the first node, if the connection between the node and the second node is determined to be a straight line based on the connection attribute information of the first node, the first node and the second node are connected based on the connection position information of the node connected to the second node indicated by the connection attribute information of the first node and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node.
[0192] If the connection between the first node and the second node is determined to be a broken line based on the connection attribute information of the first node, the coordinate information of the inflection point of the broken line in the specified coordinate system is determined based on the coordinate information of each node in the specified coordinate system; and the first node, the inflection point, and the second node are connected based on the connection position information of the node connected to the second node indicated by the connection attribute information of the first node, the coordinate information of the inflection point in the specified coordinate system, and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node.
[0193] 8. Generate a liquid flow topology diagram based on the connection relationship between each node.
[0194] The method provided in the embodiment of the present application is described above. The device provided in the embodiment of the present application is described below:
[0195] See also Figure 6 , Figure 6 This is a diagram of the device structure provided in the embodiment of the present application. Figure 6 As shown, the device applies AntvG6, and the device includes: an obtaining module 601, a first determining module 602, a second determining module 603 and a generating module 604.
[0196] The acquisition module 601 is used to obtain multiple node arrays; any node array includes at least one node; any node in any node array is a sensor, a primary side device, a CDU, or a cabinet;
[0197] The first determination module 602 is used to determine the coordinate information of each node in the specified node array in the specified coordinate system; the specified node array is one of the multiple node arrays, the upper left corner of the area where the specified node in the specified node array is located is the origin of the specified coordinate system, and the area is the minimum area that completely accommodates the specified node;
[0198] A second determination module 603 is used to determine the coordinate information of each node in other node arrays except the specified node array in the specified coordinate system based on the coordinate information of each node in the specified node array in the specified coordinate system;
[0199] Generation module 604 is used to generate a liquid flow topology map based on AntvG6 according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node; the connection attribute information configured for any node is used to indicate whether the node is connected to other nodes, and the connection position information of the node when the node is connected to other nodes; the connection position information of the node is another coordinate information of the area where the node is located and is different from the coordinate information of the node; the line attribute information of any node refers to whether the connection between the node and other nodes is a straight line or a broken line, and the coordinate information of the inflection point when it is a broken line.
[0200] As an embodiment, any node in any node array has a corresponding node identifier; the node identifier is represented by a node type and an identifier of a node group; each node in the specified node array belongs to a different node type;
[0201] Wherein, determining the coordinate information of each node in the specified node array in the specified coordinate system includes:
[0202] Get the size of the area where each node in the specified node array is located;
[0203] According to the size of the area where each node is located, the coordinate information of each node in the specified coordinate system is determined.
[0204] As an embodiment, the node identification of any node is also represented by the number position of the node in the node group to which it belongs; the number position of any node indicates the order of the node under the node type to which it belongs;
[0205] Wherein, based on the coordinate information of each node in the specified node array in the specified coordinate system, determining the coordinate information of each node in other node arrays except the specified node array in the specified coordinate system includes:
[0206] The node array sequence is traversed from the next node array of the specified node array, and the traversed node array is used as the current node array; the node arrays of the node array sequence are arranged in the order required by the liquid flow topology diagram; the first node array in the node array sequence is the specified node array;
[0207] Traverse each node in the current node array in the set order, and use the traversed node as the current node;
[0208] According to the node type indicated by the node identifier of the current node and the position of the indicated current node in the current node array, determine the reference node corresponding to the current node, and obtain the coordinate information of the reference node in the specified coordinate system;
[0209] The coordinate information of the current node in the specified coordinate system is determined based on the coordinate information of the reference node in the specified coordinate system.
[0210] As an embodiment, the reference node corresponding to the current node is obtained by the following steps:
[0211] If the node type of the current node is not the first specified node type, the last traversed node of the same node type as the current node is determined as the reference node of the current node;
[0212] If the node type of the current node is the first specified node type, then:
[0213] When the current node is determined to be the first node of the first specified node type in the current node array according to the number position of the current node in the current node array, the last node of the second specified node type in the previous node array of the current node array is determined as the reference node of the current node;
[0214] When the current node is determined to be a non-first node of the first specified node type in the current node array according to the number position of the current node in the current node array, the last traversed node of the first specified node type is determined as a reference node.
[0215] As an embodiment, generating a liquid flow topology map based on AntvG6 according to the coordinate information of each node in a specified coordinate system, the connection attribute information of each node, and the line attribute information of each node includes:
[0216] For a first node, if it is determined according to the connection attribute information of the first node that the connection between the node and the second node is a straight line, the first node and the second node are connected according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node; the first node is different from the second node;
[0217] If it is determined that the connection between the first node and the second node is a broken line according to the connection attribute information of the first node, the coordinate information of the inflection point of the broken line in the specified coordinate system is determined according to the coordinate information of each node in the specified coordinate system; and according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node, the coordinate information of the inflection point in the specified coordinate system, and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node, the first node, the inflection point, and the second node are connected;
[0218] Based on the connection relationship between each node, a liquid flow topology diagram is generated.
[0219] As an embodiment, determining the coordinate information of the inflection point of the polyline in the specified coordinate system according to the coordinate information of each node in the specified coordinate system includes:
[0220] If it is determined that the first node and the second node belong to the specified node array, the coordinate information of the inflection point in the specified coordinate system is obtained;
[0221] If it is determined that the first node and the second node do not belong to the specified node array, then obtain the first reference node in the specified node array that belongs to the same category as the first node, and the second reference node in the specified node array that belongs to the same category as the second node, and determine the coordinate information of the inflection point in the specified coordinate system based on the obtained coordinate information of the inflection point between the first reference node and the second reference node in the specified coordinate system.
[0222] So far, completed Figure 6 Structural description of the device shown.
[0223] See also Figure 7 , Figure 7 This is a structural diagram of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0224] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.
[0225] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0226] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for generating a liquid flow topology map based on AntvG6, characterized in that: The method is applied to AntvG6; the method comprises: A plurality of node arrays are obtained; any node array includes at least one node; any node in any node array is a sensor, a primary side device, a CDU, or a cabinet; Determine the coordinate information of each node in the specified node array in the specified coordinate system; the specified node array is one of the multiple node arrays, the upper left corner of the area where the specified node in the specified node array is located is the origin of the specified coordinate system, and the area is the minimum area that completely accommodates the specified node; Based on the coordinate information of each node in the specified node array in the specified coordinate system, determine the coordinate information of each node in other node arrays except the specified node array in the specified coordinate system; A liquid flow topology map based on AntvG6 is generated according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node; the connection attribute information configured for any node is used to indicate whether the node is connected to other nodes, and the connection position information of the node when the node is connected to other nodes; the connection position information of the node is another coordinate information of the area where the node is located and different from the coordinate information of the node; the line attribute information of any node refers to whether the line between the node and other nodes is a straight line or a broken line, and the coordinate information of the inflection point when it is a broken line.
2. The method according to claim 1, characterized in that Any node in any node array has a corresponding node identifier; the node identifier is represented by a node type and an identifier of the node group; each node in the specified node array belongs to a different node type; The step of determining the coordinate information of each node in the specified node array in the specified coordinate system includes: Obtain the size of the area where each node in the specified node array is located; The coordinate information of each node in a specified coordinate system is determined according to the size of the area where each node is located.
3. The method according to claim 2, characterized in that The node identification of any node is also represented by the number position of the node in the node group to which it belongs; the number position of any node indicates the order of the node under the node type to which it belongs; Wherein, based on the coordinate information of each node in the specified node array in the specified coordinate system, determining the coordinate information of each node in other node arrays except the specified node array in the specified coordinate system includes: Starting from the next node array of the designated node array, the node array sequence is traversed, and the traversed node array is used as the current node array; the node arrays of the node array sequence are arranged in the order required by the liquid flow topology diagram; the first node array in the node array sequence is the designated node array; Traverse each node in the current node array according to a set order, and use the traversed node as the current node; Determine the reference node corresponding to the current node according to the node type indicated by the node identifier of the current node and the position of the indicated current node in the current node array, and obtain the coordinate information of the reference node in the specified coordinate system; The coordinate information of the current node in the specified coordinate system is determined according to the coordinate information of the reference node in the specified coordinate system.
4. The method according to claim 3, characterized in that The reference node corresponding to the current node is obtained by the following steps: If the node type of the current node is not the first specified node type, determining the last traversed node of the same node type as the current node as a reference node of the current node; If the node type of the current node is the first specified node type, then: When it is determined that the current node is the first node of the first specified node type in the current node array according to the number position of the current node in the current node array, the last node of the second specified node type in the previous node array of the current node array is determined as the reference node of the current node; When it is determined that the current node is not the first node of the first specified node type in the current node array based on the number position of the current node in the current node array, the last traversed node of the first specified node type is determined as the reference node.
5. The method according to claim 1, characterized in that The generating of the liquid flow topology diagram based on AntvG6 according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node includes: For a first node, if it is determined that the connection between the node and a second node is a straight line according to the connection attribute information of the first node, the first node and the second node are connected according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node; the first node is different from the second node; If it is determined that the connection between the node and the second node is a broken line according to the connection attribute information of the first node, the coordinate information of the inflection point of the broken line in the specified coordinate system is determined according to the coordinate information of each node in the specified coordinate system; and according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node, the coordinate information of the inflection point in the specified coordinate system, and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node, the first node, the inflection point, and the second node are connected; A liquid flow topology diagram is generated based on the connection relationship between the nodes.
6. The method according to claim 5, characterized in that Determining the coordinate information of the inflection point of the polyline in the specified coordinate system according to the coordinate information of each node in the specified coordinate system includes: If it is determined that the first node and the second node belong to the specified node array, obtaining coordinate information of the inflection point in the specified coordinate system; If it is determined that the first node and the second node do not belong to the specified node array, then obtain a first reference node in the specified node array that belongs to the same category as the first node, and a second reference node in the specified node array that belongs to the same category as the second node, and determine the coordinate information of the inflection point in the specified coordinate system based on the obtained coordinate information of the inflection point between the first reference node and the second reference node in the specified coordinate system.
7. A liquid flow topology map generating device based on AntvG6, characterized in that: The device is applied to AntvG6; The device includes: An acquisition module is used to obtain multiple node arrays; any node array includes at least one node; any node in any node array is a sensor, a primary side device, a CDU, or a cabinet; A first determination module is used to determine the coordinate information of each node in a specified node array in a specified coordinate system; the specified node array is one of the multiple node arrays, the upper left corner of the area where the specified node in the specified node array is located is the origin of the specified coordinate system, and the area is the minimum area that completely accommodates the specified node; A second determination module is used to determine the coordinate information of each node in each node array other than the specified node array in the specified coordinate system based on the coordinate information of each node in the specified node array in the specified coordinate system; A generation module is used to generate a liquid flow topology map based on AntvG6 according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node; the connection attribute information configured for any node is used to indicate whether the node is connected to other nodes, and the connection position information of the node when the node is connected to other nodes; the connection position information of the node is another coordinate information of the area where the node is located and different from the coordinate information of the node; the line attribute information of any node refers to whether the connection between the node and other nodes is a straight line or a broken line, and the coordinate information of the inflection point when it is a broken line.
8. The device according to claim 7, characterized in that Any node in any node array has a corresponding node identifier; the node identifier is represented by a node type and an identifier of the node group; each node in the specified node array belongs to a different node type; The step of determining the coordinate information of each node in the specified node array in the specified coordinate system includes: Obtain the size of the area where each node in the specified node array is located; Determine the coordinate information of each node in a specified coordinate system according to the size of the area where each node is located; and / or, The node identification of any node is also represented by the number position of the node in the node group to which it belongs; the number position of any node indicates the order of the node under the node type to which it belongs; Wherein, based on the coordinate information of each node in the specified node array in the specified coordinate system, determining the coordinate information of each node in other node arrays except the specified node array in the specified coordinate system includes: Starting from the next node array of the designated node array, the node array sequence is traversed, and the traversed node array is used as the current node array; the node arrays of the node array sequence are arranged in the order required by the liquid flow topology diagram; the first node array in the node array sequence is the designated node array; Traverse each node in the current node array according to a set order, and use the traversed node as the current node; Determine the reference node corresponding to the current node according to the node type indicated by the node identifier of the current node and the position of the indicated current node in the current node array, and obtain the coordinate information of the reference node in the specified coordinate system; Determine the coordinate information of the current node in the specified coordinate system according to the coordinate information of the reference node in the specified coordinate system; and / or, The reference node corresponding to the current node is obtained by the following steps: If the node type of the current node is not the first specified node type, determining the last traversed node of the same node type as the current node as a reference node of the current node; If the node type of the current node is the first specified node type, then: When it is determined that the current node is the first node of the first specified node type in the current node array according to the number position of the current node in the current node array, the last node of the second specified node type in the previous node array of the current node array is determined as the reference node of the current node; When it is determined that the current node is not the first node of the first specified node type in the current node array according to the number position of the current node in the current node array, the last traversed node of the first specified node type is determined as the reference node; and / or, The generating of the liquid flow topology diagram based on AntvG6 according to the coordinate information of each node in the specified coordinate system, the connection attribute information of each node, and the line attribute information of each node includes: For a first node, if it is determined that the connection between the node and a second node is a straight line according to the connection attribute information of the first node, the first node and the second node are connected according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node; the first node is different from the second node; If it is determined that the connection between the node and the second node is a broken line according to the connection attribute information of the first node, the coordinate information of the inflection point of the broken line in the specified coordinate system is determined according to the coordinate information of each node in the specified coordinate system; and according to the connection position information of the node connected to the second node indicated by the connection attribute information of the first node, the coordinate information of the inflection point in the specified coordinate system, and the connection position information of the node connected to the first node indicated by the connection attribute information of the second node, the first node, the inflection point, and the second node are connected; Generate a liquid flow topology diagram according to the connection relationship between the nodes; and / or, Determining the coordinate information of the inflection point of the polyline in the specified coordinate system according to the coordinate information of each node in the specified coordinate system includes: If it is determined that the first node and the second node belong to the specified node array, obtaining coordinate information of the inflection point in the specified coordinate system; If it is determined that the first node and the second node do not belong to the specified node array, then obtain a first reference node in the specified node array that belongs to the same category as the first node, and a second reference node in the specified node array that belongs to the same category as the second node, and determine the coordinate information of the inflection point in the specified coordinate system based on the obtained coordinate information of the inflection point between the first reference node and the second reference node in the specified coordinate system.
9. An electronic device, characterized in that: The electronic device includes: Processor; and A computer-readable storage medium, wherein computer program instructions are stored in the computer-readable storage medium, and when the computer program instructions are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, enable the processor to perform the steps of any one of the methods of claims 1 to 6.
Citation Information
Patent Citations
A method for generating flowcharts for high-level procedural language source programs
CN106508009B
Sub-network topology presentation method, device and equipment
CN113452557A
G6-based cross-level multi-superior node link obstacle avoidance topology
CN117056627A
Automatic layout method and device of physical architecture view, equipment and storage medium
CN117573911A
Network Topology Generation Method and Related Apparatus
US20240137279A1
Cited By
Business process topological graph construction method, electronic equipment and readable storage medium
CN121326693A
