[go: up one dir, main page]

CN111030863B - A method, device, device and storage medium for determining node topology information - Google Patents

A method, device, device and storage medium for determining node topology information Download PDF

Info

Publication number
CN111030863B
CN111030863B CN201911286000.1A CN201911286000A CN111030863B CN 111030863 B CN111030863 B CN 111030863B CN 201911286000 A CN201911286000 A CN 201911286000A CN 111030863 B CN111030863 B CN 111030863B
Authority
CN
China
Prior art keywords
interconnection
information
port
network
ports
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911286000.1A
Other languages
Chinese (zh)
Other versions
CN111030863A (en
Inventor
王勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911286000.1A priority Critical patent/CN111030863B/en
Publication of CN111030863A publication Critical patent/CN111030863A/en
Application granted granted Critical
Publication of CN111030863B publication Critical patent/CN111030863B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a node topology information determination method based on a storage network, which comprises the following steps: acquiring interconnection information among FC ports of nodes in a storage network; determining independent sub-networks of the storage network according to the interconnection information; and aggregating and replacing FC ports belonging to the same node in the independent sub-networks by utilizing the corresponding relation between each node and the FC ports to obtain actual topology information. Therefore, in the scheme, the independent sub-networks of the storage network can be automatically analyzed according to the interconnection information of the FC ports, and the actual topology information can be obtained according to the corresponding relation between each node and the FC ports. The invention also discloses a node topology information determination device, equipment and a computer readable storage medium based on the storage network, and the technical effects can be realized.

Description

一种节点拓扑信息确定方法、装置、设备及存储介质A method, device, device and storage medium for determining node topology information

技术领域technical field

本发明涉及存储系统技术领域,更具体地说,涉及一种基于存储网络的节点拓扑信息确定方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of storage systems, and more particularly, to a method, apparatus, device and computer-readable storage medium for determining node topology information based on a storage network.

背景技术Background technique

目前在FC(光纤通道,Fibre Channel)网络中,可以在存储端直接获取到FC网络中FC端口之间的互联信息,但是通过这些互联信息,只能知道FC端口之间的互联,无法直观的得到网络中基于节点的互联信息。如果想要得到节点层次的信息,只能根据端口间的互联信息进行人工分析,或者通过实际排查网络来确定。但是,如果网络节点数量多,网络复杂,通过人工分析会产生很大的工作量,并且也容易产生疏漏。Currently, in the FC (Fibre Channel) network, the interconnection information between the FC ports in the FC network can be directly obtained on the storage end. Get the node-based interconnection information in the network. If you want to get the information at the node level, you can only do manual analysis based on the interconnection information between ports, or determine by actually checking the network. However, if the number of network nodes is large and the network is complex, manual analysis will result in a lot of workload, and omissions are also likely to occur.

因此,如何根据FC端口的互联信息确定存储节点的拓扑信息,是本领域技术人员需要解决的问题。Therefore, how to determine the topology information of the storage node according to the interconnection information of the FC ports is a problem to be solved by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种基于存储网络的节点拓扑信息确定方法、装置、设备及计算机可读存储介质,以根据FC端口的互联信息快速确定存储节点的拓扑信息。The purpose of the present invention is to provide a method, apparatus, device and computer-readable storage medium for determining node topology information based on a storage network, so as to quickly determine the topology information of a storage node according to the interconnection information of FC ports.

为实现上述目的,本发明提供一种基于存储网络的节点拓扑信息确定方法,包括:To achieve the above purpose, the present invention provides a method for determining node topology information based on a storage network, including:

获取存储网络中各节点的各FC端口之间的互联信息;Obtain interconnection information between each FC port of each node in the storage network;

根据所述互联信息确定所述存储网络的独立子网络;其中,每个独立子网络由具有互联关系的FC端口及交换机构成;Determine independent sub-networks of the storage network according to the interconnection information; wherein, each independent sub-network is composed of FC ports and switches with interconnection;

利用各节点与FC端口的对应关系,对独立子网络中属于同一节点的FC端口进行聚合及替换,得到各节点的实际拓扑信息。Using the corresponding relationship between each node and the FC port, the FC ports belonging to the same node in the independent sub-network are aggregated and replaced, and the actual topology information of each node is obtained.

其中,所述得到各节点的实际拓扑信息之后,还包括:Wherein, after obtaining the actual topology information of each node, the method further includes:

将所述实际拓扑信息与规划网络拓扑信息进行比较,判断所述实际拓扑信息与所述规划网络拓扑信息是否相同;comparing the actual topology information with the planned network topology information, and judging whether the actual topology information is the same as the planned network topology information;

若不同,则生成故障链路提示信息。If different, generate fault link prompt information.

其中,根据所述互联信息确定所述存储网络的独立子网络,包括:Wherein, determining the independent sub-network of the storage network according to the interconnection information includes:

S11、从互联信息中选择未分析的初始互联信息;S11. Select unanalyzed initial interconnection information from interconnection information;

S12、在初始子网络中设置所述初始互联信息的两个FC端口的互联关系,并将具有互联关系的FC端口作为已识别端口;S12, setting the interconnection relationship of the two FC ports of the initial interconnection information in the initial sub-network, and using the FC port with the interconnection relationship as an identified port;

S13、从互联信息中选择未分析的目标互联信息,所述目标互联信息的其中一个FC端口为已识别端口;S13, select unanalyzed target interconnection information from interconnection information, and one of the FC ports in the target interconnection information is an identified port;

S14、根据所述目标互联信息,对所述初始子网络的端口互联关系进行更新,并在端口互联关系的交叉点设置交换机;S14, according to the target interconnection information, update the port interconnection relationship of the initial sub-network, and set a switch at the intersection of the port interconnection relationship;

S15、判断互联信息中是否存在具有一个已识别端口的目标互联信息;若存在,则继续执行S13;若不存在,则执行S16;S15, determine whether there is target interconnection information with an identified port in the interconnection information; if so, continue to execute S13; if not, execute S16;

S16、将最终的初始子网络作为独立子网络,将已分析的互联信息从所述互联信息中删除,并删除已识别端口;S16, take the final initial sub-network as an independent sub-network, delete the analyzed interconnection information from the interconnection information, and delete the identified port;

S17、判断互联信息中是否存在未分析的互联信息;若存在,则继续执行S11,以便识别所述互联信息中的其他独立子网络;若不存在,则结束流程。S17: Determine whether there is unanalyzed interconnection information in the interconnection information; if so, continue to execute S11 to identify other independent sub-networks in the interconnection information; if not, end the process.

其中,所述根据所述目标互联信息,对所述初始子网络的端口互联关系进行更新,并在端口互联关系的交叉点设置交换机,包括:Wherein, according to the target interconnection information, the port interconnection relationship of the initial sub-network is updated, and a switch is set at the intersection of the port interconnection relationship, including:

在所述初始子网络已存在的端口互联关系中,增加所述目标互联信息中已识别端口和未识别端口的互联关系;In the existing port interconnection relationship of the initial sub-network, add the interconnection relationship between the identified port and the unidentified port in the target interconnection information;

在端口互联关系新增的交叉点上设置交换机;Set the switch on the newly added cross point of the port interconnection;

判断所述初始子网络已存在的端口互联关系中是否存在目标交换机,所述目标交换机对应的端口与所述目标互联信息中未识别端口具有互联关系;Determine whether there is a target switch in the existing port interconnection relationship of the initial sub-network, and the port corresponding to the target switch has an interconnection relationship with the unidentified port in the target interconnection information;

若存在,则将新增的交换机与所述目标交换机合并。If it exists, the newly added switch is merged with the target switch.

为实现上述目的,本发明进一步提供一种基于存储网络的节点拓扑信息确定装置,包括:To achieve the above object, the present invention further provides a device for determining node topology information based on a storage network, comprising:

获取模块,用于获取存储网络中各节点的各FC端口之间的互联信息;an acquisition module for acquiring interconnection information between each FC port of each node in the storage network;

确定模块,用于根据所述互联信息确定所述存储网络的独立子网络;其中,每个独立子网络由具有互联关系的FC端口及交换机构成;a determining module, configured to determine independent sub-networks of the storage network according to the interconnection information; wherein each independent sub-network is composed of FC ports and switches with interconnection;

处理模块,用于利用各节点与FC端口的对应关系,对独立子网络中属于同一节点的FC端口进行聚合及替换,得到各节点的实际拓扑信息。The processing module is used to aggregate and replace the FC ports belonging to the same node in the independent sub-network by using the corresponding relationship between each node and the FC port, so as to obtain the actual topology information of each node.

其中,本方案还包括:Among them, this program also includes:

判断模块,用于将所述实际拓扑信息与规划网络拓扑信息进行比较,判断所述实际拓扑信息与所述规划网络拓扑信息是否相同;a judgment module, configured to compare the actual topology information with the planned network topology information, and judge whether the actual topology information is the same as the planned network topology information;

提示模块,用于在所述实际拓扑信息与所述规划网络拓扑信息不相同时,生成故障链路提示信息。The prompt module is configured to generate fault link prompt information when the actual topology information is different from the planned network topology information.

其中,所述确定模块包括:Wherein, the determining module includes:

第一选择单元,用于从互联信息中选择未分析的初始互联信息;a first selection unit for selecting unanalyzed initial interconnection information from interconnection information;

设置单元,用于在初始子网络中设置所述初始互联信息的两个FC端口的互联关系,并将具有互联关系的FC端口作为已识别端口;A setting unit for setting the interconnection relationship of the two FC ports of the initial interconnection information in the initial sub-network, and using the FC port with the interconnection relationship as an identified port;

第二选择单元,用于从互联信息中选择未分析的目标互联信息,所述目标互联信息的其中一个FC端口为已识别端口;a second selection unit, configured to select unanalyzed target interconnection information from the interconnection information, and one of the FC ports in the target interconnection information is an identified port;

更新单元,用于根据所述目标互联信息,对所述初始子网络的端口互联关系进行更新,并在端口互联关系的交叉点设置交换机;an update unit, configured to update the port interconnection relationship of the initial sub-network according to the target interconnection information, and set a switch at the intersection of the port interconnection relationship;

第一判断单元,用于判断互联信息中是否存在具有一个已识别端口的目标互联信息;若存在,则触发所述第二选择单元;若不存在,则触发确定单元;a first judging unit for judging whether there is target interconnection information with an identified port in the interconnection information; if so, triggering the second selection unit; if not, triggering a determining unit;

所述确定单元,用于将最终的初始子网络作为独立子网络,将已分析的互联信息从所述互联信息中删除,并删除已识别端口;The determining unit is configured to use the final initial sub-network as an independent sub-network, delete the analyzed interconnection information from the interconnection information, and delete the identified port;

第二判断单元,用于判断互联信息中是否存在未分析的互联信息;若存在,则触发第一选择单元,以便识别所述互联信息中的其他独立子网络;若不存在,则结束流程。The second judging unit is used to judge whether there is unanalyzed interconnection information in the interconnection information; if so, trigger the first selection unit to identify other independent sub-networks in the interconnection information; if not, end the process.

其中,所述更新单元包括:Wherein, the update unit includes:

互联关系增加子单元,用于在所述初始子网络已存在的端口互联关系中,增加所述目标互联信息中已识别端口和未识别端口的互联关系;An interconnection relationship adding subunit, configured to add the interconnection relationship between the identified port and the unidentified port in the target interconnection information in the existing port interconnection relationship of the initial sub-network;

设置子单元,用于在端口互联关系新增的交叉点上设置交换机;Set the sub-unit, which is used to set the switch at the newly added cross-point of the port interconnection;

判断子单元,用于判断所述初始子网络已存在的端口互联关系中是否存在目标交换机,所述目标交换机对应的端口与所述目标互联信息中未识别端口具有互联关系;A judging subunit for judging whether a target switch exists in the existing port interconnection relationship of the initial sub-network, and the port corresponding to the target switch has an interconnection relationship with the unidentified port in the target interconnection information;

合并子单元,用于存在目标交换机时,将新增的交换机与所述目标交换机合并。The merging subunit is used for merging the newly added switch with the target switch when there is a target switch.

为实现上述目的,本发明进一步提供一种电子设备,包括:To achieve the above object, the present invention further provides an electronic device, comprising:

存储器,用于存储计算机程序;处理器,用于执行所述计算机程序时实现上述节点拓扑信息确定方法的步骤。The memory is used for storing a computer program; the processor is used for implementing the steps of the above method for determining node topology information when the computer program is executed.

为实现上述目的,本发明进一步提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述节点拓扑信息确定方法的步骤。To achieve the above object, the present invention further provides a computer-readable storage medium, where a computer program is stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned method for determining node topology information are implemented.

通过以上方案可知,本发明实施例提供的一种基于存储网络的节点拓扑信息确定方法,包括:获取存储网络中各节点的各FC端口之间的互联信息;根据互联信息确定存储网络的独立子网络;其中,每个独立子网络由具有互联关系的FC端口及交换机构成;利用各节点与FC端口的对应关系,对独立子网络中属于同一节点的FC端口进行聚合及替换,得到各节点的实际拓扑信息。可见,在本方案中,可自动根据FC端口的互联信息分析存储网络的独立子网络,再根据各节点与FC端口的对应关系便可得到实际拓扑信息,与现有方案中的人工分析及人工排查的方式相比,可快速准确的得出实际网络拓扑信息,使用户快速发现问题、定位问题及解决问题。本发明还公开了一种基于存储网络的节点拓扑信息确定装置、设备及计算机可读存储介质,同样能实现上述技术效果。It can be seen from the above solutions that a method for determining node topology information based on a storage network provided by an embodiment of the present invention includes: acquiring interconnection information between FC ports of each node in the storage network; determining independent nodes of the storage network according to the interconnection information network; wherein, each independent sub-network is composed of FC ports and switches with interconnected relationship; using the corresponding relationship between each node and the FC port, the FC ports belonging to the same node in the independent sub-network are aggregated and replaced, and the FC ports of each node are obtained. Actual topology information. It can be seen that in this solution, the independent sub-networks of the storage network can be automatically analyzed according to the interconnection information of the FC ports, and then the actual topology information can be obtained according to the corresponding relationship between each node and the FC ports. Compared with the troubleshooting method, the actual network topology information can be obtained quickly and accurately, enabling users to quickly find, locate and solve problems. The invention also discloses a storage network-based node topology information determination device, equipment and computer-readable storage medium, which can also achieve the above technical effects.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明实施例公开的一种基于存储网络的节点拓扑信息确定方法流程示意图;1 is a schematic flowchart of a method for determining node topology information based on a storage network disclosed in an embodiment of the present invention;

图2为本发明实施例公开的一种基于存储网络的节点拓扑信息确定装置结构示意图;2 is a schematic structural diagram of a device for determining node topology information based on a storage network disclosed in an embodiment of the present invention;

图3为本发明实施例公开的一种电子设备结构示意图。FIG. 3 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例公开了一种基于存储网络的节点拓扑信息确定方法、装置、设备及计算机可读存储介质,以根据FC端口的互联信息快速确定存储节点的拓扑信息。Embodiments of the present invention disclose a method, apparatus, device and computer-readable storage medium for determining node topology information based on a storage network, so as to quickly determine topology information of storage nodes according to interconnection information of FC ports.

参见图1,本发明实施例提供的一种基于存储网络的节点拓扑信息确定方法,包括:Referring to FIG. 1 , a method for determining node topology information based on a storage network provided by an embodiment of the present invention includes:

S101、获取存储网络中各节点的各FC端口之间的互联信息;S101. Obtain interconnection information between each FC port of each node in the storage network;

需要说明的是,FC端口之间的互联信息是指FC端口之间连通的信息,例如:若P1、P2分别表示FC端口的端口号,则互联信息(P1,P2)则表示P1端口和P2端口连通。对于存储网络中的节点来说,每个节点可以有多个FC端口,该互联信息只能说明不同FC端口之间的互联情况,无法知道不同端口是否属于同一个节点,因此,通过该互联信息不能直接体现出节点之间的互联情况,也就不能直接根据该互联信息得到节点的拓扑信息。而通过本申请所述的节点拓扑信息确定方法,可以在存储端,根据存储识别到的FC端口互联信息进行分析,得出存储所在FC网络的拓扑结构信息。根据分析出的结果,用户可以直观的看到实际的基于网络节点的互联信息。It should be noted that the interconnection information between FC ports refers to the information about the connectivity between FC ports. For example, if P1 and P2 respectively represent the port numbers of the FC ports, the interconnection information (P1, P2) indicates the ports P1 and P2. port is connected. For nodes in the storage network, each node can have multiple FC ports. The interconnection information can only describe the interconnection between different FC ports, and it is impossible to know whether different ports belong to the same node. Therefore, through the interconnection information The interconnection between the nodes cannot be directly reflected, and the topology information of the nodes cannot be obtained directly according to the interconnection information. With the method for determining node topology information described in the present application, the storage end can analyze the FC port interconnection information identified by the storage to obtain the topology structure information of the FC network where the storage is located. According to the analyzed results, the user can intuitively see the actual interconnection information based on network nodes.

S102、根据互联信息确定存储网络的独立子网络;其中,每个独立子网络由具有互联关系的FC端口及交换机构成;S102. Determine independent sub-networks of the storage network according to the interconnection information; wherein, each independent sub-network is composed of FC ports and switches with interconnection;

在本申请中,由于互联信息记载了不同FC端口的连通情况,因此基于各个FC端口的连通情况,可以得出存储网络的独立子网络,该独立子网络的数量可以为1个,也可以为多个,主要根据互联信息所记载的端口连通情况进行确定。并且,由于网络连接的现实是一个端口只能和另外的一个端口直接连接,就像一条线只有两个顶点。如果从一个端口可以到达多个端口,那么端口之间一定有一个分叉的地方,这个分叉的交叉点便必然存在交换机。例如:存在互联信息(P1,P2)及(P1,P3),可以看出,P1既能和P2连通,又能和P3连通,即:P1这一个端口可以到达P2和P3这两个端口,则在P1、P2和P3组成的独立子网络中,P1、P2和P3之间必然存在交叉点,该交叉点即是交换机存在的位置。因此在本申请中,独立子网络是由具有互联关系的FC端口及交换机构成。In this application, since the interconnection information records the connectivity of different FC ports, based on the connectivity of each FC port, an independent sub-network of the storage network can be obtained, and the number of the independent sub-network may be one, or may be There are more than one, which is mainly determined according to the port connectivity status recorded in the interconnection information. And, due to the reality of network connections, a port can only be directly connected to another port, just like a line has only two vertices. If multiple ports can be reached from one port, there must be a fork between the ports, and there must be a switch at the cross point of the fork. For example, if there is interconnection information (P1, P2) and (P1, P3), it can be seen that P1 can be connected to both P2 and P3, that is, one port of P1 can reach the two ports of P2 and P3, Then, in the independent sub-network composed of P1, P2 and P3, there must be a cross point between P1, P2 and P3, and the cross point is the location where the switch exists. Therefore, in this application, the independent sub-network is composed of FC ports and switches with interconnection.

S103、利用各节点与FC端口的对应关系,对独立子网络中属于同一节点的FC端口进行聚合及替换,得到各节点的实际拓扑信息。S103 , using the corresponding relationship between each node and the FC port, aggregate and replace the FC ports belonging to the same node in the independent sub-network to obtain the actual topology information of each node.

需要说明的是,在本方案中,可以根据存储端获取到的FC端口的互联信息分析出存储网络中所包含的独立子网络,将FC端口划分到相对应的子独立子网络中,从而产生端口与网络的归属信息。当网络分析完毕后,再利用存储本身的节点及端口的对应关系将各端口进行聚合,抽象为节点,进而产生基于节点的拓扑信息。在此列举一种情况对S103进行说明:若独立子网络包括:P1通过交换机与P2和P3连通,并且,P1、P2与节点1具有对应关系,P3与节点2具有对应关系,那么在该独立子网络中,将P1、P2聚合及替换为节点1,将P3替换为节点2,则生成的与独立子网络对应的节点实际拓扑信息为:节点1与节点2互联的拓扑关系。It should be noted that, in this solution, the independent sub-networks included in the storage network can be analyzed according to the interconnection information of the FC ports obtained by the storage end, and the FC ports are divided into corresponding sub-independent sub-networks, thereby generating Port and network attribution information. After the network analysis is completed, each port is aggregated and abstracted into a node by using the corresponding relationship between the node and the port in the storage itself, and then the topology information based on the node is generated. Here is a case to illustrate S103: if the independent sub-network includes: P1 is connected to P2 and P3 through a switch, and P1, P2 have a corresponding relationship with node 1, and P3 has a corresponding relationship with node 2, then in this independent sub-network In the sub-network, if P1 and P2 are aggregated and replaced by node 1, and P3 is replaced by node 2, the generated actual topology information of nodes corresponding to the independent sub-network is: the topology relationship between node 1 and node 2.

进一步,在本申请中,得到各节点的实际拓扑信息之后,还包括:将所述实际拓扑信息与规划网络拓扑信息进行比较,判断所述实际拓扑信息与所述规划网络拓扑信息是否相同;若不同,则生成故障链路提示信息。Further, in the present application, after obtaining the actual topology information of each node, the method further includes: comparing the actual topology information with the planned network topology information, and judging whether the actual topology information and the planned network topology information are the same; if If it is different, a fault link prompt message will be generated.

需要说明的是,本申请在得到实际拓扑信息后,可以将该实际拓扑信息与预先设定的规划网络拓扑信息进行对比分析,判断实际拓扑信息是否与规划拓扑信息一致,若不一致,则说明网络中可能存在故障链路,这时可生成故障链路提示信息,以便提示用户存储网络中可能存在的故障,从而有效协助用户分析处理网络连接问题。It should be noted that, after obtaining the actual topology information, the present application can compare and analyze the actual topology information with the preset planned network topology information to determine whether the actual topology information is consistent with the planned topology information. There may be a faulty link in the network, at this time, a faulty link prompt message can be generated to remind the user of possible faults in the storage network, thereby effectively assisting the user to analyze and deal with network connection problems.

综上可以看出,本方案将原本需要人工分析,人工排查的工作,利用算法进行自动实现,提高了分析效率,避免了人为疏漏。根据分析结果,用户可以快速的掌握实际的网络拓扑信息,快速发现问题,定位问题,解决问题。To sum up, it can be seen that this scheme uses algorithms to automatically realize the work that originally required manual analysis and manual investigation, which improves the analysis efficiency and avoids human omissions. According to the analysis results, users can quickly grasp the actual network topology information, quickly find problems, locate problems, and solve problems.

基于上述实施例,在本实施例中,上述S102中的根据互联信息确定存储网络的独立子网络,具体包括如下步骤:Based on the foregoing embodiment, in this embodiment, determining the independent sub-network of the storage network according to the interconnection information in the foregoing S102 specifically includes the following steps:

S11、从互联信息中选择未分析的初始互联信息;S11. Select unanalyzed initial interconnection information from interconnection information;

S12、在初始子网络中设置所述初始互联信息的两个FC端口的互联关系,并将具有互联关系的FC端口作为已识别端口;S12, setting the interconnection relationship of the two FC ports of the initial interconnection information in the initial sub-network, and using the FC port with the interconnection relationship as an identified port;

在本实施例中,建立独立子网络时,需要根据端口之间的互联关系进行确定,如果两个端口存在互联信息,则认为这两个端口具有互联关系。例如:假设未分析的FC端口互联信息组成了集合S1;从集合S1中选取一条初始互联信息(P1,P2),该初始互联信息包含了可以互相识别的两个FC端口的端口号,分别为P1,P2。In this embodiment, when establishing an independent sub-network, it needs to be determined according to the interconnection relationship between the ports. If the two ports have interconnection information, it is considered that the two ports have an interconnection relationship. For example: Suppose that the unanalyzed FC port interconnection information forms a set S1; select a piece of initial interconnection information (P1, P2) from the set S1, and the initial interconnection information includes the port numbers of two FC ports that can identify each other, respectively P1, P2.

在此,为了更好的说明建立独立子网络的过程,假设P1,P2是平面坐标系横轴上的两个点,P1在坐标系原点,P2是横轴上距离P1足够远的一个点,可以认为该坐标系即为一个独立子网络的初始子网络N1。并且,在本方案中,将从互联信息中已选择的互联信息称为已分析的互联信息,未从互联信息中选择的互联信息称为未分析的互联信息,同理,对于已选择的互联信息中的FC端口称为已识别端口,例如:已从互联信息中选择的初始互联信息(P1,P2)即为已分析的互联信息,而P1,P2则为已识别端口。Here, in order to better illustrate the process of establishing an independent sub-network, it is assumed that P1 and P2 are two points on the horizontal axis of the plane coordinate system, P1 is at the origin of the coordinate system, and P2 is a point far enough away from P1 on the horizontal axis. This coordinate system can be considered as the initial sub-network N1 of an independent sub-network. Moreover, in this scheme, the interconnection information that has been selected from the interconnection information is called the analyzed interconnection information, and the interconnection information that is not selected from the interconnection information is called the unanalyzed interconnection information. The FC ports in the information are called identified ports. For example, the initial interconnection information (P1, P2) selected from the interconnection information is the analyzed interconnection information, and P1 and P2 are identified ports.

S13、从互联信息中选择未分析的目标互联信息,所述目标互联信息的其中一个FC端口为已识别端口;S13, select unanalyzed target interconnection information from interconnection information, and one of the FC ports in the target interconnection information is an identified port;

S14、根据所述目标互联信息,对所述初始子网络的端口互联关系进行更新,并在端口互联关系的交叉点设置交换机;S14, according to the target interconnection information, update the port interconnection relationship of the initial sub-network, and set a switch at the intersection of the port interconnection relationship;

需要说明的是,在建立独立子网络的过程中,需要从互联信息中选择未分析的互联信息对初始子网络进行更新,在选择的过程中,需要选择包含已识别端口的互联信息。并且,本申请根据目标互联信息,对初始子网络的端口互联关系进行更新,并在端口互联关系的交叉点设置交换机的过程,具体可以包括:在初始子网络已存在的端口互联关系中,增加目标互联信息中已识别端口和未识别端口的互联关系,在端口互联关系新增的交叉点上设置交换机;判断初始子网络已存在的端口互联关系中是否存在目标交换机,目标交换机对应的端口与目标互联信息中未识别端口具有互联关系;若存在,则将新增的交换机与目标交换机合并。It should be noted that, in the process of establishing an independent sub-network, it is necessary to select unanalyzed interconnection information from the interconnection information to update the initial sub-network. During the selection process, it is necessary to select the interconnection information including the identified ports. In addition, the present application updates the port interconnection relationship of the initial sub-network according to the target interconnection information, and the process of setting switches at the intersection of the port interconnection relationship may specifically include: adding to the existing port interconnection relationship of the initial sub-network. The interconnection relationship between the identified ports and the unidentified ports in the target interconnection information, set switches at the newly added cross points of the port interconnection relationship; determine whether there is a target switch in the existing port interconnection relationship of the initial subnet, and the port corresponding to the target switch is the same as the one. The port not identified in the target interconnection information has an interconnection relationship; if it exists, the newly added switch is merged with the target switch.

可以理解的是,由于一个端口需要通过交换机与多个端口连通,因此需要在初始子网络的每个交叉点设置交换机,由于交换机可实现一个端口与多个端口的连通,因此,可将符合要求的交换机进行合并。例如:初始子网络已存在的端口互联关系为:存在交换机H1,H1实现P1与P2和P3的连通,这时选取的目标互联信息为(P1,P4),则在已存在的端口互联关系中添加已识别端口P1和未识别端口P4的互联关系,并且在端口互联关系新增的交叉点上生成了实现P1和P4互联的交换机H2;这时需要查看是否具有目标交换机,该目标交换机是存在对应的端口与目标互联信息(P1,P4)中未识别端口P4具有互联关系的交换机,在已存在的端口互联关系中,交换机H1存在P3端口,这时需要从互联信息中,判断交换机H1的P3端口是否与目标互联信息(P1,P4)中未识别端口P4具有互联关系,若存在,则可将H1和H2合并,作为一个交换机。It can be understood that since a port needs to be connected to multiple ports through a switch, a switch needs to be set at each cross point of the initial sub-network. Since a switch can realize the connection between one port and multiple ports, it can switches are merged. For example: the existing port interconnection relationship of the initial subnet is: there is switch H1, H1 realizes the connection between P1 and P2 and P3, and the selected target interconnection information is (P1, P4), then in the existing port interconnection relationship Add the interconnection relationship between the identified port P1 and the unidentified port P4, and generate a switch H2 that realizes the interconnection between P1 and P4 at the newly added cross-point of the port interconnection relationship; at this time, you need to check whether there is a target switch, and the target switch exists. The corresponding port and target interconnection information (P1, P4) does not identify the switch with the interconnection relationship of port P4. In the existing port interconnection relationship, switch H1 has P3 port. At this time, it is necessary to judge the switch H1 from the interconnection information. Whether the P3 port has an interconnection relationship with the unidentified port P4 in the target interconnection information (P1, P4), if it exists, H1 and H2 can be combined as a switch.

在此,基于上文建立N1网络的过程,列举一种具体情况以对S13-S14的过程进行说明:Here, based on the above process of establishing the N1 network, a specific situation is listed to illustrate the process of S13-S14:

1)从集合S1中选取一条包含N1网络中已识别端口的的目标互联信息,目标互联信息即为(*,P1)或(*,P2),*代表未识别端口,在此以目标互联信息为(P1,P3)进行说明;1) Select a piece of target interconnection information including the identified ports in the N1 network from the set S1, the target interconnection information is (*, P1) or (*, P2), * represents the unidentified port, and the target interconnection information is used here. Explain for (P1, P3);

2)选取P1与N1网络中和P1最近的一个实体(当前即P2)中间位置的一个交叉点,作为H1,H1以交换机的角色在网络中存在,P3通过H1与P1进行互联,由于FC网络的特性,可以确定S1中存在一条互联信息(P3,P2),P3与P2也是通过H1进行互联;2) Select an intersection between the P1 and the N1 network in the middle of an entity closest to P1 (currently P2), as H1, H1 exists in the network as a switch, and P3 is interconnected with P1 through H1, because the FC network It can be determined that there is a piece of interconnection information (P3, P2) in S1, and P3 and P2 are also interconnected through H1;

需要说明的是,由于本申请将把P1、P2的位置抽象到坐标系中,在此为了方便计算/理解,将交换机H1的位置选择在P1和P2两点确定的直线段上的中间位置,当然,也可以将H1的位置选择在P1和P2两点直线段上的任意位置,在此并不具体限定。It should be noted that since this application will abstract the positions of P1 and P2 into the coordinate system, for the convenience of calculation/understanding, the position of the switch H1 is selected at the middle position on the straight line segment determined by the two points P1 and P2, Of course, the position of H1 can also be selected at any position on the straight line segment of the two points P1 and P2, which is not specifically limited here.

3)从集合S1中继续选取一条包含N1网络中已识端口的目标互联信息,即(*,P1)或(*,P2)或(*,P3),在此假设互联信息为(P1, P4);3) Continue to select a piece of target interconnection information containing the identified ports in the N1 network from the set S1, that is (*, P1) or (*, P2) or (*, P3), where the interconnection information is assumed to be (P1, P4 );

4)选取P1与N1网络中和P1最近的一个实体(当前即H1)中间位置的一个点,作为交换机H2,假设P4通过H2与P1进行互联;4) Select a point in the middle of an entity (currently H1) closest to P1 in the P1 and N1 networks as switch H2, assuming that P4 is interconnected with P1 through H2;

5)从集合S1中查找是否存在互联信息(P3,P4),如果存在,则认为H2为目标交换机,H2可以和H1进行合并,如果不存在,我们认为H2是独立于H1的实体;5) Find out whether there is interconnection information (P3, P4) in the set S1. If it exists, it is considered that H2 is the target switch, and H2 can be merged with H1. If it does not exist, we consider that H2 is an entity independent of H1;

需要说明的是,如果P3跟P4不能联通,则认为H2上做了配置,限制了P3跟P4的联通,形式上认为是独立的H2。如果P3能跟P4通,则在形式上认为H2其实就是H1,虽然在实际上可能是独立的两个,但是在业务表现上是一个,这个只通过互联信息无法判定的。It should be noted that if P3 and P4 cannot be connected, it is considered that H2 has been configured, which restricts the connection between P3 and P4, and is considered to be an independent H2 in form. If P3 can communicate with P4, it is considered that H2 is actually H1 in form. Although it may be two independent in fact, it is one in terms of business performance, which cannot be determined only through interconnected information.

S15、判断互联信息中是否存在具有一个已识别端口的目标互联信息;若存在,则继续执行S13;若不存在,则执行S16;S15, determine whether there is target interconnection information with an identified port in the interconnection information; if so, continue to execute S13; if not, execute S16;

S16、将最终的初始子网络作为独立子网络,将已分析的互联信息从所述互联信息中删除,并删除已识别端口;S16, take the final initial sub-network as an independent sub-network, delete the analyzed interconnection information from the interconnection information, and delete the identified port;

S17、判断互联信息中是否存在未分析的互联信息;若存在,则继续执行S11,以便识别所述互联信息中的其他独立子网络;若不存在,则结束流程。S17: Determine whether there is unanalyzed interconnection information in the interconnection information; if so, continue to execute S11 to identify other independent sub-networks in the interconnection information; if not, end the process.

可以理解的是,对目标互联信息分析完后,需要继续从集合S1中获取涉及N1网络中已识别端口的目标互联信息(Pm,Pn),Pn为N1网络中已识别的端口,Pm为N1网络中未识别的端口,并继续执行S13-S14进行子网络聚合,直到S1中不存在涉及N1网络中已识别端口的目标互联信息,N1网络拓扑识别完成,得到独立子网络,并将所有已识别的互联信息从集合S1中移除;如果互联信息中还存在未分析的互联信息,则继续执行S11,以识别新的子网络,直到集合S1变为空集,存储网络拓扑识别完成,生成端口与网络的对应信息。It can be understood that after analyzing the target interconnection information, it is necessary to continue to obtain the target interconnection information (Pm, Pn) involving the identified ports in the N1 network from the set S1, where Pn is the identified port in the N1 network, and Pm is the N1 network. Unrecognized ports in the network, and continue to perform S13-S14 for sub-network aggregation, until there is no target interconnection information involving the identified ports in the N1 network in S1, the N1 network topology identification is completed, an independent sub-network is obtained, and all The identified interconnection information is removed from the set S1; if there is still unanalyzed interconnection information in the interconnection information, continue to execute S11 to identify a new sub-network, until the set S1 becomes an empty set, the storage network topology identification is completed, and the generation of Corresponding information of ports and networks.

需要说明的是,本申请需要获取存储节点信息,该信息中包含了各存储节点的FC端口号信息,然后获取存储系统已经配置的主机端口号绑定信息,该信息中包含了已经配置的端口号主机聚合信息,也即:该信息中记载了某一节点与端口号之间的对应关系。通过上述步骤得到体现端口与子网的归属信息的独立子网络后,便可结合获取到的存储节点信息及主机端口号聚合信息,将节点与网络进行互相关联,生成基于节点的网络拓扑信息。It should be noted that this application needs to obtain storage node information, which includes the FC port number information of each storage node, and then obtain the host port number binding information that has been configured in the storage system, and the information includes the configured ports. host aggregation information, that is, the information records the correspondence between a node and a port number. After obtaining an independent subnet reflecting the attribution information of ports and subnets through the above steps, the nodes and the network can be correlated with each other by combining the obtained storage node information and host port number aggregation information to generate node-based network topology information.

综上可以看出,本申请可以在存储端分析存储所在FC网络的拓扑结构,生成基于节点的网络拓扑信息,从而实现快速准确的获得网络拓扑信息,并且,完成逻辑分析以后,可以以图形化的方式进行展示该网络拓扑信息,便于用户直观的看到存储所在的FC网络拓扑结构,提高用户体验。To sum up, it can be seen that the application can analyze the topology structure of the FC network where the storage is stored at the storage end, and generate node-based network topology information, so as to obtain the network topology information quickly and accurately, and after the logical analysis is completed, it can be graphically analyzed. The network topology information is displayed in the way of , so that users can intuitively see the FC network topology structure where the storage is located and improve user experience.

下面对本发明实施例提供的节点拓扑信息确定装置进行介绍,下文描述的节点拓扑信息确定装置与上文描述的节点拓扑信息确定方法可以相互参照。The following describes the device for determining node topology information provided by the embodiments of the present invention. The device for determining node topology information described below and the method for determining node topology information described above may refer to each other.

参见图2,本发明实施例提供的一种基于存储网络的节点拓扑信息确定装置,包括:Referring to FIG. 2, an apparatus for determining node topology information based on a storage network provided by an embodiment of the present invention includes:

获取模块100,用于获取存储网络中各节点的各FC端口之间的互联信息;The obtaining module 100 is used to obtain the interconnection information between the FC ports of the nodes in the storage network;

确定模块200,用于根据所述互联信息确定所述存储网络的独立子网络;其中,每个独立子网络由具有互联关系的FC端口及交换机构成;A determination module 200, configured to determine independent sub-networks of the storage network according to the interconnection information; wherein, each independent sub-network is composed of FC ports and switches with interconnection;

处理模块300,用于利用各节点与FC端口的对应关系,对独立子网络中属于同一节点的FC端口进行聚合及替换,得到各节点的实际拓扑信息。The processing module 300 is configured to aggregate and replace the FC ports belonging to the same node in the independent sub-network by using the corresponding relationship between each node and the FC port, so as to obtain the actual topology information of each node.

其中,本方案还包括:Among them, this program also includes:

判断模块,用于将所述实际拓扑信息与规划网络拓扑信息进行比较,判断所述实际拓扑信息与所述规划网络拓扑信息是否相同;a judgment module, configured to compare the actual topology information with the planned network topology information, and judge whether the actual topology information is the same as the planned network topology information;

提示模块,用于在所述实际拓扑信息与所述规划网络拓扑信息不相同时,生成故障链路提示信息。The prompt module is configured to generate fault link prompt information when the actual topology information is different from the planned network topology information.

其中,所述确定模块包括:Wherein, the determining module includes:

第一选择单元,用于从互联信息中选择未分析的初始互联信息;a first selection unit for selecting unanalyzed initial interconnection information from interconnection information;

设置单元,用于在初始子网络中设置所述初始互联信息的两个FC端口的互联关系,并将具有互联关系的FC端口作为已识别端口;A setting unit for setting the interconnection relationship of the two FC ports of the initial interconnection information in the initial sub-network, and using the FC port with the interconnection relationship as an identified port;

第二选择单元,用于从互联信息中选择未分析的目标互联信息,所述目标互联信息的其中一个FC端口为已识别端口;a second selection unit, configured to select unanalyzed target interconnection information from the interconnection information, and one of the FC ports in the target interconnection information is an identified port;

更新单元,用于根据所述目标互联信息,对所述初始子网络的端口互联关系进行更新,并在端口互联关系的交叉点设置交换机;an update unit, configured to update the port interconnection relationship of the initial sub-network according to the target interconnection information, and set a switch at the intersection of the port interconnection relationship;

第一判断单元,用于判断互联信息中是否存在具有一个已识别端口的目标互联信息;若存在,则触发所述第二选择单元;若不存在,则触发确定单元;a first judging unit for judging whether there is target interconnection information with an identified port in the interconnection information; if so, triggering the second selection unit; if not, triggering a determining unit;

所述确定单元,用于将最终的初始子网络作为独立子网络,将已分析的互联信息从所述互联信息中删除,并删除已识别端口;The determining unit is configured to use the final initial sub-network as an independent sub-network, delete the analyzed interconnection information from the interconnection information, and delete the identified port;

第二判断单元,用于判断互联信息中是否存在未分析的互联信息;若存在,则触发第一选择单元,以便识别所述互联信息中的其他独立子网络;若不存在,则结束流程。The second judging unit is used to judge whether there is unanalyzed interconnection information in the interconnection information; if so, trigger the first selection unit to identify other independent sub-networks in the interconnection information; if not, end the process.

其中,所述更新单元包括:Wherein, the update unit includes:

互联关系增加子单元,用于在所述初始子网络已存在的端口互联关系中,增加所述目标互联信息中已识别端口和未识别端口的互联关系;An interconnection relationship adding subunit, configured to add the interconnection relationship between the identified port and the unidentified port in the target interconnection information in the existing port interconnection relationship of the initial sub-network;

设置子单元,用于在端口互联关系新增的交叉点上设置交换机;Set the sub-unit, which is used to set the switch at the newly added cross-point of the port interconnection;

判断子单元,用于判断所述初始子网络已存在的端口互联关系中是否存在目标交换机,所述目标交换机对应的端口与所述目标互联信息中未识别端口具有互联关系;A judging subunit for judging whether a target switch exists in the existing port interconnection relationship of the initial sub-network, and the port corresponding to the target switch has an interconnection relationship with the unidentified port in the target interconnection information;

合并子单元,用于存在目标交换机时,将新增的交换机与所述目标交换机合并。The merging subunit is used for merging the newly added switch with the target switch when there is a target switch.

参见图3,本发明还公开了一种电子设备结构示意图;该设备包括:Referring to FIG. 3, the present invention also discloses a schematic structural diagram of an electronic device; the device includes:

存储器11,用于存储计算机程序;memory 11 for storing computer programs;

处理器12,用于执行所述计算机程序时实现上述任意方法实施例所实现的的节点拓扑信息确定方法的步骤。The processor 12 is configured to implement the steps of the method for determining node topology information implemented by any of the foregoing method embodiments when executing the computer program.

在本实施例中,设备可以是PC(Personal Computer,个人电脑),也可以是智能手机、平板电脑、掌上电脑、便携计算机等终端设备。In this embodiment, the device may be a PC (Personal Computer, personal computer), or may be a terminal device such as a smart phone, a tablet computer, a palmtop computer, and a portable computer.

该设备可以包括存储器11、处理器12和总线13。The device may include a memory 11 , a processor 12 and a bus 13 .

其中,存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、磁性存储器、磁盘、光盘等。存储器11在一些实施例中可以是设备的内部存储单元,例如该设备的硬盘。存储器11在另一些实施例中也可以是设备的外部存储设备,例如设备上配备的插接式硬盘,智能存储卡(SmartMedia Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括设备的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于设备的应用软件及各类数据,例如执行节点拓扑信息确定方法的程序代码等,还可以用于暂时地存储已经输出或者将要输出的数据。The memory 11 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (eg, SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the device, such as a hard disk of the device. The memory 11 may also be an external storage device of the device in other embodiments, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a Secure Digital (SD) card, a flash memory card ( Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the device and an external storage device. The memory 11 can not only be used to store application software installed in the device and various types of data, such as program codes for executing the node topology information determination method, etc., but also can be used to temporarily store data that has been output or will be output.

处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行节点拓扑信息确定方法的程序代码等。In some embodiments, the processor 12 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for executing program codes or processing stored in the memory 11 Data, such as program code for executing a method for determining node topology information, etc.

该总线13可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图3中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 13 may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (Extended industry standard architecture, EISA for short) bus or the like. The bus can be divided into address bus, data bus, control bus and so on. For ease of presentation, only one thick line is used in FIG. 3, but it does not mean that there is only one bus or one type of bus.

进一步地,设备还可以包括网络接口14,网络接口14可选的可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该设备与其他电子设备之间建立通信连接。Further, the device may also include a network interface 14, and the network interface 14 may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used between the device and other electronic devices Establish a communication connection.

可选地,该设备还可以包括用户接口15,用户接口15可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口15还可以包括标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在设备中处理的信息以及用于显示可视化的用户界面。Optionally, the device may further include a user interface 15, the user interface 15 may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 15 may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like. Among them, the display may also be appropriately referred to as a display screen or a display unit, for displaying information processed in the device and for displaying a visual user interface.

图3仅示出了具有组件11-15的设备,本领域技术人员可以理解的是,图3示出的结构并不构成对设备的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 3 only shows the device with the components 11-15. Those skilled in the art can understand that the structure shown in FIG. Either some components are combined, or different component arrangements.

本发明还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意方法实施例所实现的的节点拓扑信息确定方法的步骤。The present invention also discloses a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for determining node topology information implemented by any of the above method embodiments is implemented A step of.

其中,该存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory ,ROM)、随机存取存储器(Random Access Memory ,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Wherein, the storage medium may include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various storage media that can store program codes medium.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A node topology information determination method based on a storage network is characterized by comprising the following steps:
acquiring interconnection information among FC ports of nodes in a storage network;
determining independent sub-networks of the storage network according to the interconnection information; each independent sub-network is composed of FC ports and switches with interconnection relation;
aggregating and replacing FC ports belonging to the same node in independent sub-networks by utilizing the corresponding relation between each node and the FC ports to obtain the actual topology information of each node;
wherein determining independent sub-networks of the storage network based on the interconnection information comprises:
s11, selecting unanalyzed initial interconnection information from the interconnection information;
s12, setting the interconnection relationship of the two FC ports of the initial interconnection information in the initial sub-network, and taking the FC ports with the interconnection relationship as identified ports;
s13, selecting unanalyzed target interconnection information from interconnection information, wherein one FC port of the target interconnection information is an identified port;
s14, updating the port interconnection relation of the initial sub-network according to the target interconnection information, and setting a switch at the intersection of the port interconnection relation;
s15, judging whether target interconnection information with an identified port exists in the interconnection information; if so, continue to S13; if not, go to S16;
s16, taking the final initial sub-network as an independent sub-network, deleting the analyzed interconnection information from the interconnection information, and deleting the identified port;
s17, judging whether the interconnection information has the unanalyzed interconnection information; if so, continuing to execute S11 to identify other independent sub-networks in the interconnection information; if not, ending the flow;
wherein, the updating the port interconnection relationship of the initial sub-network according to the target interconnection information and setting a switch at the intersection of the port interconnection relationship comprises:
in the existing port interconnection relationship of the initial sub-network, increasing the interconnection relationship between the identified port and the unidentified port in the target interconnection information;
setting a switch at the newly-added cross point of the port interconnection relation;
judging whether a target switch exists in the existing port interconnection relationship of the initial sub-network, wherein the port corresponding to the target switch and the unidentified port in the target interconnection information have interconnection relationship;
and if so, merging the newly added switch and the target switch.
2. The method for determining node topology information according to claim 1, further comprising, after obtaining the actual topology information of each node:
comparing the actual topology information with planning network topology information, and judging whether the actual topology information is the same as the planning network topology information;
and if the two link failure modes are different, generating failure link prompt information.
3. A node topology information determination apparatus based on a storage network, comprising:
the acquisition module is used for acquiring interconnection information among FC ports of nodes in a storage network;
a determining module, configured to determine an independent sub-network of the storage network according to the interconnection information; each independent sub-network is composed of FC ports and switches with interconnection relation;
the processing module is used for aggregating and replacing FC ports belonging to the same node in the independent sub-networks by utilizing the corresponding relation between each node and the FC ports to obtain the actual topology information of each node;
wherein the determining module comprises:
a first selection unit, configured to select unanalyzed initial interconnection information from the interconnection information;
a setting unit, configured to set an interconnection relationship between two FC ports of the initial interconnection information in an initial sub-network, and use an FC port having the interconnection relationship as an identified port;
a second selecting unit, configured to select unanalyzed target interconnection information from interconnection information, where one FC port of the target interconnection information is an identified port;
an updating unit, configured to update the port interconnection relationship of the initial sub-network according to the target interconnection information, and set a switch at a cross point of the port interconnection relationship;
the first judging unit is used for judging whether target interconnection information with an identified port exists in the interconnection information or not; if yes, triggering the second selection unit; if not, triggering a determining unit;
the determining unit is configured to use the final initial sub-network as an independent sub-network, delete the analyzed interconnection information from the interconnection information, and delete the identified port;
the second judging unit is used for judging whether the interconnection information has the unanalyzed interconnection information or not; if the sub-networks exist, triggering a first selection unit so as to identify other independent sub-networks in the interconnection information; if not, ending the flow;
wherein the update unit includes:
an interconnection relation increasing subunit, configured to increase, in an existing port interconnection relation of the initial sub-network, an interconnection relation between an identified port and an unidentified port in the target interconnection information;
a setting subunit, configured to set a switch at the intersection where the port interconnection relationship is newly added;
a judging subunit, configured to judge whether a target switch exists in an existing port interconnection relationship of the initial sub-network, where a port corresponding to the target switch and an unidentified port in the target interconnection information have an interconnection relationship;
and the merging subunit is used for merging the newly added switch and the target switch when the target switch exists.
4. The node topology information determination apparatus according to claim 3, further comprising:
the judging module is used for comparing the actual topology information with the planning network topology information and judging whether the actual topology information is the same as the planning network topology information;
and the prompting module is used for generating fault link prompting information when the actual topology information is different from the planning network topology information.
5. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the node topology information determination method according to claim 1 or 2 when executing the computer program.
6. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the node topology information determination method according to claim 1 or 2.
CN201911286000.1A 2019-12-13 2019-12-13 A method, device, device and storage medium for determining node topology information Active CN111030863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911286000.1A CN111030863B (en) 2019-12-13 2019-12-13 A method, device, device and storage medium for determining node topology information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911286000.1A CN111030863B (en) 2019-12-13 2019-12-13 A method, device, device and storage medium for determining node topology information

Publications (2)

Publication Number Publication Date
CN111030863A CN111030863A (en) 2020-04-17
CN111030863B true CN111030863B (en) 2022-06-07

Family

ID=70210787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911286000.1A Active CN111030863B (en) 2019-12-13 2019-12-13 A method, device, device and storage medium for determining node topology information

Country Status (1)

Country Link
CN (1) CN111030863B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116016199B (en) * 2023-02-21 2023-06-09 山东海量信息技术研究院 Information control method, system, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101330405A (en) * 2008-07-02 2008-12-24 北京亿阳信通软件研究院有限公司 Method for discovering network topology and related equipment
CN102263807A (en) * 2010-05-31 2011-11-30 国际商业机器公司 Method for keeping communication path smooth in storage area network and storage area network
CN108712286A (en) * 2018-05-22 2018-10-26 华为技术有限公司 The determination method, apparatus and storage medium of network topology structure
CN109936480A (en) * 2019-03-19 2019-06-25 鹏城实验室 Network topology discovery method and device, storage medium and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7688758B2 (en) * 2007-06-26 2010-03-30 Avaya Inc. Node merging process for network topology representation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101330405A (en) * 2008-07-02 2008-12-24 北京亿阳信通软件研究院有限公司 Method for discovering network topology and related equipment
CN102263807A (en) * 2010-05-31 2011-11-30 国际商业机器公司 Method for keeping communication path smooth in storage area network and storage area network
CN108712286A (en) * 2018-05-22 2018-10-26 华为技术有限公司 The determination method, apparatus and storage medium of network topology structure
CN109936480A (en) * 2019-03-19 2019-06-25 鹏城实验室 Network topology discovery method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN111030863A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN110875850B (en) Firmware upgrading method and system, readable storage medium and terminal equipment
US20160352578A1 (en) System and method for adaptive paths locator for virtual network function links
CN107104824B (en) Network topology determination method and device
CN109995805B (en) Intelligent robot management method, terminal device and medium
CN103763129A (en) PCIe equipment management method and device
CN103220325A (en) Acquiring information dynamically regarding a hardware component in the cloud computing system while on the floor of the data center
CN110442773B (en) Node caching method, system, device and computer medium in distributed system
CN104836853A (en) Method and apparatus for business arrangement
CN110287696A (en) A detection method, device and equipment for reverse shell process
CN114386934A (en) Method and device for generating business process, server and storage medium
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN112333295A (en) A multi-path connection method, device, electronic device and storage medium
CN103164647B (en) Access control method of network security group and security computer
CN110175833B (en) Computer device, method, system and medium for binding bank card information
CN110474960B (en) A method and device for service deployment in a virtualized network
CN114116205A (en) Kubernetes-based resource management method and device, storage medium and electronic device
CN109542841A (en) The method and terminal device of data snapshot are created in cluster
CN114398397A (en) Data processing method, device, storage medium and system
US20150280996A1 (en) Cloud topology visualizations
CN111030863B (en) A method, device, device and storage medium for determining node topology information
CN114070741A (en) A topology map generation method, system, device and storage medium
KR101504490B1 (en) Method for control of phonebook synchronization in device and device enabling the method
CN114185804A (en) Interface testing method and device and terminal equipment
CN106527979B (en) Data migration method and device
CN110290172B (en) Container application cloning method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China