Movatterモバイル変換


[0]ホーム

URL:


CN115550177A - Dynamic updating method, device and medium based on FC switching network terminal connection state - Google Patents

Dynamic updating method, device and medium based on FC switching network terminal connection state
Download PDF

Info

Publication number
CN115550177A
CN115550177ACN202211235241.5ACN202211235241ACN115550177ACN 115550177 ACN115550177 ACN 115550177ACN 202211235241 ACN202211235241 ACN 202211235241ACN 115550177 ACN115550177 ACN 115550177A
Authority
CN
China
Prior art keywords
terminal
switch
login
terminal information
information table
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.)
Granted
Application number
CN202211235241.5A
Other languages
Chinese (zh)
Other versions
CN115550177B (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.)
Technology and Engineering Center for Space Utilization of CAS
Original Assignee
Technology and Engineering Center for Space Utilization of CAS
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 Technology and Engineering Center for Space Utilization of CASfiledCriticalTechnology and Engineering Center for Space Utilization of CAS
Priority to CN202211235241.5ApriorityCriticalpatent/CN115550177B/en
Publication of CN115550177ApublicationCriticalpatent/CN115550177A/en
Application grantedgrantedCritical
Publication of CN115550177BpublicationCriticalpatent/CN115550177B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及数据交互技术领域,揭露了一种基于FC交换网终端连接状态的动态更新方法,包括:为终端分配终端地址,根据终端地址、终端的名称及交换机的标识,构建终端信息,将终端信息存储于终端登入信息表中,判断交换机是否为主交换机,若是,则不转发终端信息,若不是,则将终端信息发送至主交换机,接收登出请求,删除终端信息,若交换机是主交换机,则不转发删除的终端信息,若交换机不是主交换机,则在主交换机中删除终端信息。本发明还提出一种基于FC交换网终端连接状态的动态更新装置、电子设备以及计算机可读存储介质。本发明可以解决无法实现具有多种FC上层协议网络的网络连接信息的更新的问题。

Figure 202211235241

The present invention relates to the field of data interaction technology, and discloses a dynamic update method based on the terminal connection status of an FC switching network, including: assigning a terminal address to the terminal, constructing terminal information according to the terminal address, the name of the terminal and the identification of the switch, and updating the terminal The information is stored in the terminal login information table, and it is judged whether the switch is the main switch. If it is, the terminal information will not be forwarded. If not, the terminal information will be sent to the main switch, and the terminal information will be deleted after receiving the logout request. If the switch is the main switch , the deleted terminal information will not be forwarded. If the switch is not the master switch, the terminal information will be deleted in the master switch. The invention also proposes a dynamic update device, electronic equipment and computer-readable storage medium based on the connection state of the FC switching network terminal. The invention can solve the problem that the update of the network connection information of the network with multiple FC upper layer protocols cannot be realized.

Figure 202211235241

Description

Translated fromChinese
基于FC交换网终端连接状态的动态更新方法、装置及介质Method, device and medium for dynamically updating terminal connection status based on FC switching network

技术领域technical field

本发明涉及数据交互技术领域,尤其涉及一种基于FC交换网终端连接状态的动态更新方法、装置、电子设备及计算机可读存储介质。The present invention relates to the technical field of data interaction, and in particular to a dynamic update method, device, electronic equipment and computer-readable storage medium based on the connection status of FC switching network terminals.

背景技术Background technique

光纤通道(Fiber Channel,简称FC)协议是一种高速网络技术协议,光纤通道协议采用同步串行方式传输数据,具有很高的传输带宽。为了扩大光纤通道协议的应用范围,目前已制定了适用于各类使用环境下的FC协议簇。The Fiber Channel (FC for short) protocol is a high-speed network technology protocol. The Fiber Channel protocol transmits data in a synchronous serial manner and has a high transmission bandwidth. In order to expand the application range of the Fiber Channel protocol, FC protocol clusters suitable for various usage environments have been developed.

目前主要通过动态网络信息维护方案,来实现网络连接信息的更新,动态网络信息维护方案主要通过DHCP协议和WINS服务来完成终端信息的生成与维护,进而实现网络连接信息的更新,但是动态网络信息维护方案对于不同的FC协议不具有通用性,无法实现具有多种FC上层协议网络的网络连接信息的更新。At present, the update of network connection information is mainly realized through the dynamic network information maintenance scheme. The dynamic network information maintenance scheme mainly completes the generation and maintenance of terminal information through the DHCP protocol and WINS service, and then realizes the update of network connection information, but the dynamic network information The maintenance scheme is not universal for different FC protocols, and it is impossible to update the network connection information of networks with multiple FC upper-layer protocols.

发明内容Contents of the invention

本发明提供一种基于FC交换网终端连接状态的动态更新方法、装置及计算机可读存储介质,其主要目的在于解决动态网络信息维护方案对于不同的FC协议不具有通用性,无法实现具有多种FC上层协议网络的网络连接信息的更新的问题。The present invention provides a dynamic update method, device and computer-readable storage medium based on the connection status of FC switching network terminals. The problem of updating the network connection information of the FC upper layer protocol network.

为实现上述目的,本发明提供的一种基于FC交换网终端连接状态的动态更新方法,包括:In order to achieve the above object, the present invention provides a dynamic update method based on the connection state of the FC switching network terminal, including:

接收终端的登入请求,将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址;receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal;

获取所述终端的名称及所述交换机的标识,根据所述终端地址、终端的名称及所述交换机的标识,构建终端信息;Obtaining the name of the terminal and the identifier of the switch, constructing terminal information according to the terminal address, the name of the terminal and the identifier of the switch;

将所述终端信息存储于所述交换机的终端登入信息表中,得到本地登入更新终端信息表;storing the terminal information in the terminal login information table of the switch to obtain the local login update terminal information table;

判断所述交换机是否为预设的主交换机;judging whether the switch is a preset master switch;

若所述交换机是主交换机,则不转发所述本地登入更新终端信息表中的终端信息;If the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded;

若所述交换机不是主交换机,则将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表;If the switch is not the main switch, then the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the entire network login update terminal information table;

接收所述终端的登出请求,将所述登出请求发送至所述交换机,在所述交换机的本地登入更新终端信息表中,删除所述终端信息,得到本地登出更新终端信息表;receiving the logout request of the terminal, sending the logout request to the switch, deleting the terminal information in the local login update terminal information table of the switch, and obtaining the local logout update terminal information table;

若所述交换机是主交换机,则不转发所述本地登出更新终端信息表中删除的终端信息;If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded;

若所述交换机不是主交换机,则将所述本地登出更新终端信息表中删除的终端信息,在所述主交换机的整网登入更新终端信息表中删除,得到整网登出更新终端信息表。If the switch is not the main switch, the terminal information deleted in the local logout update terminal information table is deleted in the entire network login update terminal information table of the main switch to obtain the entire network logout update terminal information table .

可选地,所述将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址,包括:Optionally, the sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal includes:

根据所述登入请求,获取所述终端的登入协议;Obtain a login protocol of the terminal according to the login request;

根据所述终端的登入协议,在所述交换机内,生成所述终端的终端地址;generating a terminal address of the terminal in the switch according to the login protocol of the terminal;

将所述终端地址填充至预构建的初始登入响应帧中,得到目标登入响应帧;Filling the terminal address into the pre-built initial login response frame to obtain the target login response frame;

将所述目标登入响应帧回传至所述终端,完成所述终端地址的分配。Returning the target login response frame to the terminal to complete the allocation of the terminal address.

可选地,所述判断所述交换机是否为预设的主交换机,包括:Optionally, the judging whether the switch is a preset master switch includes:

根据预设的交换机标识集,对交换机进行分类,得到交换机标识-类别对应表;According to the preset switch identification set, the switches are classified to obtain the switch identification-category correspondence table;

利用所述交换机的标识,在所述交换机标识-类别对应表中,查询所述交换机对应的交换机类别;Using the identifier of the switch, in the switch identifier-category correspondence table, query the switch category corresponding to the switch;

根据所述交换机类别,判断所述交换机是否为所述主交换机。According to the type of the switch, it is judged whether the switch is the master switch.

可选地,所述将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表,包括:Optionally, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the entire network login update terminal information table, including:

根据预构建的FC通用帧结构及FC网络标准,构建初始通用帧;According to the pre-built FC general frame structure and FC network standard, construct the initial general frame;

改变所述初始通用帧的帧类型,得到初始登入同步帧;changing the frame type of the initial universal frame to obtain an initial login synchronization frame;

将所述终端信息填充至所述初始登入同步帧中,得到目标登入同步帧;Filling the terminal information into the initial login synchronization frame to obtain a target login synchronization frame;

将所述目标登入同步帧,发送至所述主交换机的终端登入信息表中,得到所述整网登入更新终端信息表。The target login synchronization frame is sent to the terminal login information table of the master switch to obtain the entire network login update terminal information table.

可选地,所述将所述目标登入同步帧,发送至所述主交换机的终端登入信息表中,得到所述整网登入更新终端信息表,包括:Optionally, the sending the target login synchronization frame to the terminal login information table of the master switch to obtain the entire network login update terminal information table includes:

将所述目标登入同步帧,通过所述交换机的级联端口发送至所述主交换机的级联端口;Send the target login synchronization frame to the cascade port of the main switch through the cascade port of the switch;

判断所述主交换机的级联端口,是否首次接收所述目标登入同步帧;Judging whether the cascading port of the main switch receives the target login synchronization frame for the first time;

若所述主交换机的级联端口不是首次接收所述目标登入同步帧,则将所述目标同步帧丢弃;If the cascading port of the master switch is not receiving the target login synchronization frame for the first time, discarding the target synchronization frame;

若所述主交换机的级联端口是首次接收所述目标登入同步帧,则利用所述目标登入同步帧更新所述主交换机的终端登入信息表,得到所述整网登入更新终端信息表。If the cascading port of the main switch receives the target login synchronization frame for the first time, then use the target login synchronization frame to update the terminal login information table of the main switch to obtain the entire network login updated terminal information table.

可选地,所述将所述目标登入同步帧,发送至所述主交换机的终端登入信息表中,得到所述整网登入更新终端信息表之后,所述方法还包括:Optionally, after sending the target login synchronization frame to the terminal login information table of the master switch, after obtaining the entire network login update terminal information table, the method further includes:

改变所述初始通用帧的帧类型,得到初始链路状态应答帧;changing the frame type of the initial general frame to obtain an initial link state response frame;

将所述终端信息填充至所述初始链路状态应答帧中,得到目标链路状态应答帧;Filling the terminal information into the initial link state response frame to obtain a target link state response frame;

将所述目标链路状态应答帧,通过所述主交换机的级联端口发送至所述交换机的级联端口;Sending the target link state response frame to the cascading port of the switch through the cascading port of the master switch;

判断所述交换机的级联端口,是否首次接收所述目标链路状态应答帧;judging whether the cascading port of the switch receives the target link state response frame for the first time;

若所述交换机的级联端口,不是首次接收所述目标链路状态应答帧,则将所述目标链路状态应答帧丢弃;If the cascading port of the switch does not receive the target link state response frame for the first time, discarding the target link state response frame;

若所述交换机的级联端口,是首次接收所述目标链路状态应答帧,则完成所述目标登入同步帧的发送。If the cascading port of the switch receives the target link state response frame for the first time, the sending of the target login synchronization frame is completed.

可选地,所述接收所述终端的登出请求,将所述登出请求发送至所述交换机之后,所述方法还包括:Optionally, after receiving the logout request of the terminal and sending the logout request to the switch, the method further includes:

改变所述初始通用帧的帧类型,得到初始登出响应帧;changing the frame type of the initial general frame to obtain an initial logout response frame;

将所述终端信息填充至所述初始登出响应帧中,得到目标登出响应帧;Filling the terminal information into the initial logout response frame to obtain a target logout response frame;

将所述目标登出响应帧,发送至所述终端。Sending the target logout response frame to the terminal.

为了解决上述问题,本发明还提供一种基于FC交换网终端连接状态的动态更新装置,所述装置包括:In order to solve the above problems, the present invention also provides a dynamic update device based on the connection state of the FC switching network terminal, the device comprising:

终端地址分配模块,用于接收终端的登入请求,将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址;A terminal address assignment module, configured to receive a login request from a terminal, send the login request to a pre-built switch, and use the switch to assign a terminal address to the terminal;

终端信息存储模块,用于获取所述终端的名称及所述交换机的标识,根据所述终端地址、终端的名称及所述交换机的标识,构建终端信息;将所述终端信息存储于所述交换机的终端登入信息表中,得到本地登入更新终端信息表;A terminal information storage module, configured to obtain the name of the terminal and the identifier of the switch, construct terminal information according to the terminal address, the name of the terminal and the identifier of the switch; store the terminal information in the switch In the terminal login information table of the local login update terminal information table is obtained;

终端登入信息同步模块,用于判断所述交换机是否为预设的主交换机;若所述交换机是主交换机,则不转发所述本地登入更新终端信息表中的终端信息;若所述交换机不是主交换机,则将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表;The terminal login information synchronization module is used to judge whether the switch is a preset main switch; if the switch is the main switch, the terminal information in the terminal information table of the local login update terminal information table is not forwarded; if the switch is not the main switch The switch sends the terminal information in the local login update terminal information table to the terminal login information table of the main switch to obtain the entire network login update terminal information table;

终端信息删除模块,用于接收所述终端的登出请求,将所述登出请求发送至所述交换机,在所述交换机的本地登入更新终端信息表中,删除所述终端信息,得到本地登出更新终端信息表;The terminal information deletion module is configured to receive the logout request of the terminal, send the logout request to the switch, delete the terminal information in the local login update terminal information table of the switch, and obtain the local logout request. To update the terminal information table;

终端登出信息同步模块,用于若所述交换机是主交换机,则不转发所述本地登出更新终端信息表中删除的终端信息;若所述交换机不是主交换机,则将所述本地登出更新终端信息表中删除的终端信息,在所述主交换机的整网登入更新终端信息表中删除,得到整网登出更新终端信息表。The terminal logout information synchronization module is used to not forward the terminal information deleted in the local logout update terminal information table if the switch is a master switch; if the switch is not a master switch, then log out the local The terminal information deleted in the update terminal information table is deleted in the entire network login update terminal information table of the main switch to obtain the entire network logout update terminal information table.

为了解决上述问题,本发明还提供一种电子设备,所述电子设备包括:In order to solve the above problems, the present invention also provides an electronic device, which includes:

存储器,存储至少一个指令;及a memory storing at least one instruction; and

处理器,执行所述存储器中存储的指令以实现上述所述的基于FC交换网终端连接状态的动态更新方法。The processor executes the instructions stored in the memory to implement the above-mentioned method for dynamically updating the terminal connection status based on the FC switching network.

为了解决上述问题,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现上述所述的基于FC交换网终端连接状态的动态更新方法。In order to solve the above problems, the present invention also provides a computer-readable storage medium, at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in the electronic device to realize the above-mentioned A method for dynamically updating terminal connection status based on FC switching network.

相比于背景技术所述:动态网络信息维护方案对于不同的FC协议不具有通用性,无法实现具有多种FC上层协议网络的网络连接信息的更新的现象,本发明实施例在接收到所述终端的登入请求时,利用与所述终端相连的交换机为所述终端分配终端地址,继而根据终端地址、终端的名称及交换机的标识来构建所述终端信息,得到所述终端信息后需要将其存储至所述交换机中的终端登入信息表,从而得到实时的本地登入更新终端信息表,此时需要判断所述交换机是否为主交换机,根据所述交换机的不同权限定位来采取不同的终端信息更新方式,当所述交换机是主交换机时,则不需要对所述终端信息做出任何调整,若所述交换机不是主交换机时,则需要将所述终端信息同步至所述主交换机中的终端登入信息表,得到所述整网登入更新终端信息表,当接收到所述终端的登出请求时,第一步是需要将所述终端的终端信息在所述交换机中删除,再根据所述交换机的具体权限定位,来采用不同的措施,若所述交换机是主交换机,则不再需要进行其他操作,若所述交换机不是主交换机时,则需要将删除的终端信息同步至所述主交换机的整网登入更新终端信息表进行删除,得到所述整网登出更新终端信息表。因此本发明提出的基于FC交换网终端连接状态的动态更新方法、装置、电子设备及计算机可读存储介质,可以解决动态网络信息维护方案对于不同的FC协议不具有通用性,无法实现具有多种FC上层协议网络的网络连接信息的更新的问题。Compared with the description of the background technology: the dynamic network information maintenance scheme is not universal for different FC protocols, and cannot realize the update of network connection information of networks with multiple FC upper layer protocols. The embodiment of the present invention receives the described When a terminal requests a login, the switch connected to the terminal is used to assign a terminal address to the terminal, and then the terminal information is constructed according to the terminal address, the name of the terminal and the identifier of the switch. After obtaining the terminal information, it needs to be Store the terminal login information table in the switch, so as to obtain the real-time local login update terminal information table. At this time, it is necessary to judge whether the switch is the main switch, and take different terminal information updates according to the different authority positions of the switch. In this way, when the switch is the master switch, there is no need to make any adjustments to the terminal information; if the switch is not the master switch, the terminal information needs to be synchronized to the terminal login in the master switch information table, to obtain the terminal information table of the entire network login update terminal, when receiving the logout request of the terminal, the first step is to delete the terminal information of the terminal in the switch, and then according to the switch According to the specific permission location of the specific authority, different measures are adopted. If the switch is the main switch, no other operations are required. If the switch is not the main switch, the deleted terminal information needs to be synchronized to the main switch. The entire network logs in and updates the terminal information table to delete, and the entire network logs out and updates the terminal information table to obtain. Therefore, the dynamic update method, device, electronic equipment and computer-readable storage medium based on the connection status of FC switching network terminals proposed by the present invention can solve the problem that the dynamic network information maintenance scheme is not universal for different FC protocols, and cannot realize multiple The problem of updating the network connection information of the FC upper layer protocol network.

附图说明Description of drawings

图1为本发明一实施例提供的基于FC交换网的交换机与终端的交互图;FIG. 1 is an interaction diagram between a switch and a terminal based on an FC switching network provided by an embodiment of the present invention;

图2为本发明一实施例提供的基于FC交换网终端连接状态的动态更新方法的通用帧结构图;Fig. 2 is a general frame structure diagram based on the dynamic update method of the FC switching network terminal connection status provided by an embodiment of the present invention;

图3为本发明一实施例提供的基于FC交换网终端连接状态的动态更新方法的流程示意图;FIG. 3 is a schematic flow diagram of a method for dynamically updating the connection state of a terminal based on an FC switching network provided by an embodiment of the present invention;

图4为图3中其中一个步骤的详细实施流程示意图;Fig. 4 is a detailed implementation flow diagram of one of the steps in Fig. 3;

图5为本发明一实施例提供的基于FC交换网终端连接状态的动态更新装置的功能模块图;FIG. 5 is a functional block diagram of a dynamic update device based on the connection status of FC switching network terminals provided by an embodiment of the present invention;

图6为本发明一实施例提供的实现所述基于FC交换网终端连接状态的动态更新方法的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device implementing the method for dynamically updating terminal connection status based on an FC switching network provided by an embodiment of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式detailed description

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

本申请实施例提供一种基于FC交换网终端连接状态的动态更新方法。所述基于FC交换网终端连接状态的动态更新方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述基于FC交换网终端连接状态的动态更新方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。The embodiment of the present application provides a method for dynamically updating the terminal connection state based on the FC switching network. The executor of the dynamic update method based on the connection state of the FC switching network terminal includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the dynamic update method based on the connection state of the FC switching network terminal can be executed by software or hardware installed on the terminal device or the server device, and the software can be a block chain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.

参照图1所示,为本发明一实施例提供的基于FC交换网终端连接状态的动态更新方法的流程示意图。在本实施例中,所述基于FC交换网终端连接状态的动态更新方法包括:Referring to FIG. 1 , it is a schematic flowchart of a method for dynamically updating terminal connection status based on FC switching network provided by an embodiment of the present invention. In this embodiment, the dynamic update method based on the connection state of the FC switching network terminal includes:

S1、接收终端的登入请求,将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址。S1. Receive a login request from a terminal, send the login request to a pre-built switch, and use the switch to assign a terminal address to the terminal.

可解释的,所述登入请求(Login,简称LOGI)指所述终端接入FC(Fiber Channel,光纤通道)交换网络时使用的通信协议。所述FC交换网络利用FC协议来构建,FC协议是一种高速串行通信协议,具有高带宽、高可靠性、低延迟、灵活的拓扑结构以及开放性的特点,主要应用于航空电子通信系统。在不同的FC协议中,终端之间的交互模式也有所不同,例如:在FC-AE-1553中,终端分为网络控制器(NC)和网络终端(NT),两者交互模式为命令响应式;在FC-AE-ASM中,各终端是同等关系。It can be explained that the login request (Login, LOGI for short) refers to a communication protocol used when the terminal accesses an FC (Fiber Channel, Fiber Channel) switching network. The FC switching network is constructed using the FC protocol. The FC protocol is a high-speed serial communication protocol with the characteristics of high bandwidth, high reliability, low delay, flexible topology and openness, and is mainly used in avionics communication systems . In different FC protocols, the interaction modes between terminals are also different. For example: in FC-AE-1553, terminals are divided into network controller (NC) and network terminal (NT), and the interaction mode between the two is command response formula; in FC-AE-ASM, each terminal is an equal relationship.

需解释的,由于不同的FC协议仅仅在FC-4层(upper layer protocol映射曾,简称ULP映射层)有差异,因此可提出一独立于FC-4的FC交换网络故障监测和终端连接信息动态维护更新方式,对于所有的FC协议均适用。It should be explained that because different FC protocols differ only in the FC-4 layer (upper layer protocol mapping layer, referred to as ULP mapping layer), it is possible to propose a FC switching network fault monitoring and terminal connection information dynamics independent of FC-4 The maintenance update method is applicable to all FC protocols.

进一步地,所述FC交换网络具有多种拓扑结构,其中常见的是交换型网络,如图1所示,FC交换网络内有若干个交换机互联,每个交换机可以连接若干个终端,各终端之间的通信数据通过交换机进行转发。Further, the FC switching network has a variety of topological structures, among which the switching network is common, as shown in Figure 1, there are several switches interconnected in the FC switching network, and each switch can be connected to several terminals. The communication data between them is forwarded through the switch.

本发明实施例中,所述将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址,包括:In the embodiment of the present invention, the sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal includes:

根据所述登入请求,获取所述终端的登入协议;Obtain a login protocol of the terminal according to the login request;

根据所述终端的登入协议,在所述交换机内,生成所述终端的终端地址;generating a terminal address of the terminal in the switch according to the login protocol of the terminal;

将所述终端地址填充至预构建的初始登入响应帧中,得到目标登入响应帧;Filling the terminal address into the pre-built initial login response frame to obtain the target login response frame;

将所述目标登入响应帧回传至所述终端,完成所述终端地址的分配。Returning the target login response frame to the terminal to complete the allocation of the terminal address.

可理解的,所述登入协议(Fabric Login,简称FLOGI)指终端与交换机之间建立连接的登录协议。Understandably, the login protocol (Fabric Login, FLOGI for short) refers to a login protocol for establishing a connection between a terminal and a switch.

应明白的,所述交换机接收到登入协议后,将会为终端分配地址,并填充在所述初始登入响应帧中,得到所述目标登入响应帧。所述目标登入响应帧(简称FLOGI LS_ACC)指交换机接收终端发出的登入协议时回复的LS_ACC帧。所述初始登入响应帧指未填充所述终端地址的待填充响应帧。It should be understood that after receiving the login protocol, the switch will assign an address to the terminal and fill it in the initial login response frame to obtain the target login response frame. The target login response frame (FLOGI LS_ACC for short) refers to the LS_ACC frame returned by the switch when receiving the login protocol sent by the terminal. The initial login response frame refers to a to-be-filled response frame that is not filled with the terminal address.

可解释的,所述终端登入FC交换网络属于显性登录,登入和登出所涉及的帧均为ELS类型帧,各字段定义可参见FC-LS-2中4.2.7Login(FLOGI/PLOGI)和4.2.8Logout(LOGO)。It can be explained that the terminal's login to the FC switching network is an explicit login, and the frames involved in the login and logout are all ELS type frames. For the definition of each field, please refer to 4.2.7 Login (FLOGI/PLOGI) and 4.2 in FC-LS-2. .8 Logout(LOGO).

S2、获取所述终端的名称及所述交换机的标识,根据所述终端地址、终端的名称及所述交换机的标识,构建终端信息。S2. Obtain the name of the terminal and the identifier of the switch, and construct terminal information according to the address of the terminal, the name of the terminal, and the identifier of the switch.

可解释的,所述终端信息包括终端的名称、终端地址及所述终端连接交换机的标识等,可以根据实际需求增加其他信息。It can be explained that the terminal information includes the name of the terminal, the address of the terminal, and the identifier of the switch to which the terminal is connected, and other information can be added according to actual needs.

S3、将所述终端信息存储于所述交换机的终端登入信息表中,得到本地登入更新终端信息表。S3. Store the terminal information in a terminal login information table of the switch to obtain a local login update terminal information table.

需解释的,所述终端登入信息表指接入FC交换网络并且可以正常通信的终端信息的集合。所述本地登入更新终端信息表指将所述终端信息存储于所述交换机的终端登入信息表中,实现对所述交换机中原有的终端登入信息表进行更新,进而得到的信息表。It should be explained that the terminal login information table refers to a collection of terminal information that accesses the FC switching network and can communicate normally. The local login update terminal information table refers to an information table obtained by storing the terminal information in the terminal login information table of the switch to update the original terminal login information table in the switch.

进一步地,可以利用所述交换机负责监测终端与交换机之间物理链路的连接状态,此过程可以通过FC-2层链路故障监测功能实现,若物理层完成字同步,并且链路层完成原语同步,则表示物理链路连接正常,否则表示物理链路为断开状态,当物理链路出现断开状态时,需要删除终端登入信息表中对应的终端信息,若物理链路由断开转为连接时,则不进行任何操作,等待终端重新发起显式登录。Further, the switch can be used to be responsible for monitoring the connection status of the physical link between the terminal and the switch. This process can be realized through the FC-2 layer link fault monitoring function. If the physical layer completes the word synchronization, and the link layer completes the original If the physical link is synchronized, it means that the physical link is connected normally, otherwise it means that the physical link is disconnected. When the physical link is disconnected, the corresponding terminal information in the terminal login information table needs to be deleted. If the physical link is disconnected by When turning to connection, do not perform any operation, and wait for the terminal to re-initiate explicit login.

S4、判断所述交换机是否为预设的主交换机。S4. Determine whether the switch is a preset master switch.

应明白的,所述交换机可分为主交换机和副交换机两种,主交换机负责维护整网的终端接入状态,副交换机负责维护自身连接的终端的接入状态。It should be understood that the switches can be divided into two types: a main switch and a secondary switch. The primary switch is responsible for maintaining the terminal access status of the entire network, and the secondary switch is responsible for maintaining the access status of terminals connected to itself.

详细地,参阅图4所示,所述判断所述交换机是否为预设的主交换机,包括:In detail, referring to FIG. 4, the judging whether the switch is a preset master switch includes:

S41、根据预设的交换机标识集,对交换机进行分类,得到交换机标识-类别对应表;S41. Classify the switches according to the preset switch identification set, and obtain a switch identification-category correspondence table;

S42、利用所述交换机的标识,在所述交换机标识-类别对应表中,查询所述交换机对应的交换机类别;S42. Using the identifier of the switch, query the switch category corresponding to the switch in the switch identifier-category correspondence table;

S43、根据所述交换机类别,判断所述交换机是否为所述主交换机。S43. Determine whether the switch is the master switch according to the type of the switch.

可解释的,所述FC交换网络中的主交换机可以为一个,其它交换机均为副交换机。由于所述交换机的标识为交换机的唯一标识,所以可以利用所述交换机的标识来分辨交换机是主交换机还是副交换机。It can be explained that there may be one main switch in the FC switching network, and the other switches are all secondary switches. Since the identifier of the switch is a unique identifier of the switch, the identifier of the switch can be used to distinguish whether the switch is a master switch or a secondary switch.

若所述交换机是主交换机,则执行S5、不转发所述本地登入更新终端信息表中的终端信息。If the switch is the master switch, perform S5, not forwarding the terminal information in the local login update terminal information table.

可理解的,当所述交换机是主交换机时,表示所述交换机中更新的本地登入更新终端信息表,可以记录整网所有终端的终端信息,此时将所述终端信息存储于所述主交换机中的终端登入信息表,即已实现对整网的终端接入状态的维护。It can be understood that when the switch is the main switch, it means that the updated local login update terminal information table in the switch can record the terminal information of all terminals in the entire network, and at this time, the terminal information is stored in the main switch The terminal login information table in , that is, the maintenance of the terminal access status of the entire network has been realized.

进一步地,所述主交换机既需要维护自身所连接的终端的终端信息,还需要维护整网的终端的终端信息。Further, the main switch needs to maintain not only the terminal information of the terminals connected to itself, but also the terminal information of the terminals in the entire network.

若所述交换机不是主交换机,则执行S6、将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表。If the switch is not the master switch, execute S6, and send the terminal information in the local login update terminal information table to the terminal login information table of the master switch to obtain the entire network login update terminal information table.

可解释的,所述整网登入更新终端信息表指实时记录所述FC交换网中所有终端的终端信息的信息表。It can be explained that the whole network login update terminal information table refers to an information table that records terminal information of all terminals in the FC switching network in real time.

本发明实施例中,所述将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表,包括:In the embodiment of the present invention, the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the entire network login update terminal information table, including:

根据预构建的FC通用帧结构及FC网络标准,构建初始通用帧;According to the pre-built FC general frame structure and FC network standard, construct the initial general frame;

改变所述初始通用帧的帧类型,得到初始登入同步帧;changing the frame type of the initial universal frame to obtain an initial login synchronization frame;

将所述终端信息填充至所述初始登入同步帧中,得到目标登入同步帧;Filling the terminal information into the initial login synchronization frame to obtain a target login synchronization frame;

将所述目标登入同步帧,发送至所述主交换机的终端登入信息表中,得到所述整网登入更新终端信息表。The target login synchronization frame is sent to the terminal login information table of the master switch to obtain the entire network login updated terminal information table.

详细地,所述FC通用帧结构可以参阅图2所示。所述初始通用帧指可以通过设置帧类型,来生成可以实现不同功能的通用帧。例如:当所述帧类型(LS_Command Code)的字节为0xA7时,表示网络节点连接状态请求协议(Link State Request,简称LS_REQ);当所述帧类型(LS_Command Code)的字节为0xA8时,表示网络节点连接状态应答协议(Link StateAcknowledge,简称LS_ACK)。In detail, the general frame structure of the FC can be referred to as shown in FIG. 2 . The initial general frame means that a general frame that can realize different functions can be generated by setting the frame type. For example: when the byte of the frame type (LS_Command Code) is 0xA7, it means the network node link state request protocol (Link State Request, LS_REQ for short); when the byte of the frame type (LS_Command Code) is 0xA8, Represents a link state acknowledgment protocol (Link State Acknowledge, LS_ACK for short) of a network node.

进一步地,所述初始登入同步帧指已设置好帧类型,但还未填充所述终端信息的待完善帧。所述目标登入同步帧(Link State Update,简称LSU)指用于交换机之间进行链路状态同步的数据帧。Further, the initial login synchronization frame refers to a frame to be completed for which the frame type has been set but the terminal information has not been filled. The target login synchronization frame (Link State Update, LSU for short) refers to a data frame used for link state synchronization between switches.

本发明实施例中,所述将所述目标登入同步帧,发送至所述主交换机的终端登入信息表中,得到所述整网登入更新终端信息表,包括:In the embodiment of the present invention, the said target login synchronization frame is sent to the terminal login information table of the master switch to obtain the entire network login update terminal information table, including:

将所述目标登入同步帧,通过所述交换机的级联端口发送至所述主交换机的级联端口;Send the target login synchronization frame to the cascade port of the main switch through the cascade port of the switch;

判断所述主交换机的级联端口,是否首次接收所述目标登入同步帧;Judging whether the cascading port of the main switch receives the target login synchronization frame for the first time;

若所述主交换机的级联端口不是首次接收所述目标登入同步帧,则将所述目标同步帧丢弃;If the cascading port of the master switch is not receiving the target login synchronization frame for the first time, discarding the target synchronization frame;

若所述主交换机的级联端口是首次接收所述目标登入同步帧,则利用所述目标登入同步帧更新所述主交换机的终端登入信息表,得到所述整网登入更新终端信息表。If the cascading port of the main switch receives the target login synchronization frame for the first time, then use the target login synchronization frame to update the terminal login information table of the main switch to obtain the entire network login update terminal information table.

可解释的,通过所述目标登入同步帧将所述终端信息进行封装,再通过所述交互机以及所述FC交换网中其它副交换机的级联端口,将所述目标登入同步帧,发送至所述主交换机的级联端口,从而使得所述主交换机获得所述交换机与对应的终端的终端信息。其中所述FC交换网中其它副交换机的级联端口可能会重复收到所述目标登入同步帧,所以需要将重复的目标登入同步帧丢弃,直至所述主交换机接收到所述目标登入同步帧。主交换机也需要将重复的目标登入同步帧进行丢弃。It can be explained that the terminal information is encapsulated through the target login synchronization frame, and then the target login synchronization frame is sent to The cascading port of the main switch, so that the main switch obtains the terminal information of the switch and the corresponding terminal. The cascading ports of other secondary switches in the FC switching network may repeatedly receive the target login synchronization frame, so the repeated target login synchronization frame needs to be discarded until the main switch receives the target login synchronization frame . The master switch also needs to discard duplicate target login sync frames.

本发明实施例中,所述将所述目标登入同步帧,发送至所述主交换机的终端登入信息表中,得到所述整网登入更新终端信息表之后,所述方法还包括:In the embodiment of the present invention, after sending the target login synchronization frame to the terminal login information table of the main switch, and obtaining the entire network login update terminal information table, the method further includes:

改变所述初始通用帧的帧类型,得到初始链路状态应答帧;changing the frame type of the initial general frame to obtain an initial link state response frame;

将所述终端信息填充至所述初始链路状态应答帧中,得到目标链路状态应答帧;Filling the terminal information into the initial link state response frame to obtain a target link state response frame;

将所述目标链路状态应答帧,通过所述主交换机的级联端口发送至所述交换机的级联端口;Sending the target link state response frame to the cascading port of the switch through the cascading port of the master switch;

判断所述交换机的级联端口,是否首次接收所述目标链路状态应答帧;judging whether the cascading port of the switch receives the target link state response frame for the first time;

若所述交换机的级联端口,不是首次接收所述目标链路状态应答帧,则将所述目标链路状态应答帧丢弃;If the cascading port of the switch does not receive the target link state response frame for the first time, discarding the target link state response frame;

若所述交换机的级联端口,是首次接收所述目标链路状态应答帧,则完成所述目标登入同步帧的发送。If the cascading port of the switch receives the target link state response frame for the first time, the sending of the target login synchronization frame is completed.

可理解的,所述初始链路状态应答帧指已设置好帧类型,但还未封装终端信息的待完善帧。所述目标链路状态应答帧(Link State Update,简称LSA)用于链路状态应答。当所述主交换机接收到所述目标登入同步帧后,开始解析所述目标登入同步帧,并对原有的终端登入信息表进行更新,然后通过接收所述目标登入同步帧的级联端口,将所述目标链路状态应答帧利用所述FC交换网络中的其它副交换机的级联端口,发送至所述交换机。同理,副交换机需要将重复接收到的目标链路状态应答帧丢弃,直至将所述目标链路状态应答帧,发送至所述交换机。It can be understood that the initial link state response frame refers to a frame to be completed for which a frame type has been set but terminal information has not been encapsulated. The target link state response frame (Link State Update, LSA for short) is used for link state response. After the main switch receives the target login synchronization frame, it starts to parse the target login synchronization frame, and updates the original terminal login information table, and then through the cascaded port receiving the target login synchronization frame, and sending the target link state response frame to the switch by using the cascading ports of other sub-switches in the FC switching network. Similarly, the secondary switch needs to discard the repeatedly received target link state response frame until the target link state response frame is sent to the switch.

进一步地,当所述交换机监测到终端与交换机之间物理链路的连接状态出现异常时,不仅需要在所述交换机的终端登入信息表中记录,还需要同步至所述主交换机中。Further, when the switch detects that the connection status of the physical link between the terminal and the switch is abnormal, it not only needs to record in the terminal login information table of the switch, but also needs to be synchronized to the master switch.

S7、接收所述终端的登出请求,将所述登出请求发送至所述交换机,在所述交换机的本地登入更新终端信息表中,删除所述终端信息,得到本地登出更新终端信息表。S7. Receive the logout request of the terminal, send the logout request to the switch, delete the terminal information in the local login update terminal information table of the switch, and obtain the local logout update terminal information table .

可解释的,所述登出请求(Logout,简称LOGO)指终端退出交换机时使用的通信协议。所述本地登出更新终端信息表指根据所述终端的登出操作,更新所述本地登入更新终端信息表,得到的更新信息表。It can be explained that the logout request (Logout, LOGO for short) refers to the communication protocol used when the terminal exits the switch. The local logout update terminal information table refers to an update information table obtained by updating the local login update terminal information table according to a logout operation of the terminal.

详细地,所述接收所述终端的登出请求,将所述登出请求发送至所述交换机之后,所述方法还包括:Specifically, after receiving the logout request of the terminal and sending the logout request to the switch, the method further includes:

改变所述初始通用帧的帧类型,得到初始登出响应帧;changing the frame type of the initial general frame to obtain an initial logout response frame;

将所述终端信息填充至所述初始登出响应帧中,得到目标登出响应帧;Filling the terminal information into the initial logout response frame to obtain a target logout response frame;

将所述目标登出响应帧,发送至所述终端。Sending the target logout response frame to the terminal.

应明白的,所述目标登出响应帧(LOGO LS_ACC)指交换机接受终端登出时回复的LS_ACC帧。It should be understood that the target logout response frame (LOGO LS_ACC) refers to the LS_ACC frame received by the switch when the terminal logs out.

S8、若所述交换机是主交换机,则不转发所述本地登出更新终端信息表中删除的终端信息。S8. If the switch is a master switch, not forwarding the terminal information deleted in the local logout update terminal information table.

可解释的,当所述终端连接的交换机是主交换机时,不需要再将所述终端的登出信息进行同步,就可以实现主交换机维护所述终端的终端信息的目的。It can be explained that when the switch to which the terminal is connected is the main switch, the purpose of maintaining the terminal information of the terminal by the main switch can be achieved without synchronizing the logout information of the terminal.

S9、若所述交换机不是主交换机,则将所述本地登出更新终端信息表中删除的终端信息,在所述主交换机的整网登入更新终端信息表中删除,得到整网登出更新终端信息表。S9. If the switch is not the main switch, delete the terminal information deleted in the local logout update terminal information table from the entire network login update terminal information table of the main switch to obtain the entire network logout update terminal Information Sheet.

需明白的,当所述交换机不是主交换机时,需要将所述本地登出更新终端信息表中删除的终端信息,在所述主交换机的整网登入更新终端信息表中同步删除。此时需要类似所述目标登入同步帧(Link State Update,简称LSU)的同步过程,将所述删除的终端信息,通过构建目标登出同步帧进行封装,再通过与所述目标登入同步帧同样的传送方式,将所述目标登出同步帧发送至主交换机中,再在主交换机中删除对应的终端信息,然后构建并发送链路状态应答帧指所述交换机,实现终端登出信息的同步。It should be understood that when the switch is not the master switch, the terminal information deleted in the local logout update terminal information table needs to be deleted synchronously from the entire network login update terminal information table of the master switch. At this time, a synchronization process similar to the target login synchronization frame (Link State Update, referred to as LSU) is required, and the deleted terminal information is encapsulated by constructing the target login synchronization frame, and then passed the same as the target login synchronization frame. transmission method, send the target logout synchronization frame to the master switch, delete the corresponding terminal information in the master switch, and then build and send a link state response frame to the switch to realize the synchronization of terminal logout information .

相比于背景技术所述:动态网络信息维护方案对于不同的FC协议不具有通用性,无法实现具有多种FC上层协议网络的网络连接信息的更新的现象,本发明实施例在接收到所述终端的登入请求时,利用与所述终端相连的交换机为所述终端分配终端地址,继而根据终端地址、终端的名称及交换机的标识来构建所述终端信息,得到所述终端信息后需要将其存储至所述交换机中的终端登入信息表,从而得到实时的本地登入更新终端信息表,此时需要判断所述交换机是否为主交换机,根据所述交换机的不同权限定位来采取不同的终端信息更新方式,当所述交换机是主交换机时,则不需要多所述终端信息做出任何调整,若所述交换机不是主交换机时,则需要将所述终端信息同步至所述主交换机中的终端登入信息表,得到所述整网登入更新终端信息表,当接收到所述终端的登出请求时,第一步是需要将所述终端的终端信息在所述交换机中删除,再根据所述交换机的具体权限定位,来采用不同的措施,若所述交换机是主交换机,则不再需要进行其他操作,若所述交换机不是主交换机时,则需要将删除的终端信息同步至所述主交换机的整网登入更新终端信息表进行删除,得到所述整网登出更新终端信息表。因此本发明提出的基于FC交换网终端连接状态的动态更新方法、装置、电子设备及计算机可读存储介质,可以解决动态网络信息维护方案对于不同的FC协议不具有通用性,无法实现具有多种FC上层协议网络的网络连接信息的更新的问题。Compared with the description of the background technology: the dynamic network information maintenance scheme is not universal for different FC protocols, and cannot realize the update of network connection information of networks with multiple FC upper layer protocols. The embodiment of the present invention receives the described When a terminal requests a login, the switch connected to the terminal is used to assign a terminal address to the terminal, and then the terminal information is constructed according to the terminal address, the name of the terminal and the identifier of the switch. After obtaining the terminal information, it needs to be Store the terminal login information table in the switch, so as to obtain the real-time local login update terminal information table. At this time, it is necessary to judge whether the switch is the main switch, and take different terminal information updates according to the different authority positions of the switch. In this way, when the switch is the main switch, there is no need to make any adjustments to the terminal information; if the switch is not the main switch, the terminal information needs to be synchronized to the terminal login in the main switch information table, to obtain the terminal information table of the entire network login update terminal, when receiving the logout request of the terminal, the first step is to delete the terminal information of the terminal in the switch, and then according to the switch According to the specific permission location of the specific authority, different measures are adopted. If the switch is the main switch, no other operations are required. If the switch is not the main switch, the deleted terminal information needs to be synchronized to the main switch. The entire network logs in and updates the terminal information table to delete, and the entire network logs out and updates the terminal information table to obtain. Therefore, the dynamic update method, device, electronic equipment and computer-readable storage medium based on the connection status of FC switching network terminals proposed by the present invention can solve the problem that the dynamic network information maintenance scheme is not universal for different FC protocols, and cannot realize multiple The problem of updating the network connection information of the FC upper layer protocol network.

如图5所示,是本发明一实施例提供的基于FC交换网终端连接状态的动态更新装置的功能模块图。As shown in FIG. 5 , it is a functional block diagram of an apparatus for dynamically updating terminal connection status based on an FC switching network provided by an embodiment of the present invention.

本发明所述基于FC交换网终端连接状态的动态更新装置100可以安装于电子设备中。根据实现的功能,所述基于FC交换网终端连接状态的动态更新装置100可以包括终端地址分配模块101、终端信息存储模块102、终端登入信息同步模块103、终端信息删除模块104及终端登出信息同步模块105。本发明所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。Thedevice 100 for dynamically updating the terminal connection state based on the FC switching network of the present invention can be installed in electronic equipment. According to the function realized, thedynamic update device 100 based on the terminal connection state of the FC switching network may include a terminaladdress allocation module 101, a terminalinformation storage module 102, a terminal logininformation synchronization module 103, a terminalinformation deletion module 104 and a terminal logoutinformation Synchronization module 105 . The module in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of the electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

所述终端地址分配模块101,用于接收终端的登入请求,将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址;The terminaladdress allocation module 101 is configured to receive a terminal login request, send the login request to a pre-built switch, and use the switch to allocate a terminal address for the terminal;

所述终端信息存储模块102,用于获取所述终端的名称及所述交换机的标识,根据所述终端地址、终端的名称及所述交换机的标识,构建终端信息;将所述终端信息存储于所述交换机的终端登入信息表中,得到本地登入更新终端信息表;The terminalinformation storage module 102 is configured to obtain the name of the terminal and the identifier of the switch, and construct terminal information according to the terminal address, the name of the terminal and the identifier of the switch; store the terminal information in In the terminal login information table of the switch, obtain the local login update terminal information table;

所述终端登入信息同步模块103,用于判断所述交换机是否为预设的主交换机;若所述交换机是主交换机,则不转发所述本地登入更新终端信息表中的终端信息;若所述交换机不是主交换机,则将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表;The terminal logininformation synchronization module 103 is used to determine whether the switch is a preset master switch; if the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded; if the The switch is not the main switch, then the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the entire network login update terminal information table;

所述终端信息删除模块104,用于接收所述终端的登出请求,将所述登出请求发送至所述交换机,在所述交换机的本地登入更新终端信息表中,删除所述终端信息,得到本地登出更新终端信息表;The terminalinformation deletion module 104 is configured to receive a logout request of the terminal, send the logout request to the switch, and delete the terminal information in the local login update terminal information table of the switch, Get the local logout update terminal information table;

所述终端登出信息同步模块105,用于若所述交换机是主交换机,则不转发所述本地登出更新终端信息表中删除的终端信息;若所述交换机不是主交换机,则将所述本地登出更新终端信息表中删除的终端信息,在所述主交换机的整网登入更新终端信息表中删除,得到整网登出更新终端信息表。The terminal logoutinformation synchronization module 105 is used for not forwarding the terminal information deleted in the local logout update terminal information table if the switch is a master switch; if the switch is not a master switch, then forwarding the The terminal information deleted in the local logout update terminal information table is deleted in the entire network logout update terminal information table of the main switch to obtain the entire network logout update terminal information table.

详细地,本发明实施例中所述基于FC交换网终端连接状态的动态更新装置100中的所述各模块在使用时采用与上述的图3中所述的基于FC交换网终端连接状态的动态更新方法一样的技术手段,并能够产生相同的技术效果,这里不再赘述。In detail, the modules in thedynamic update device 100 based on the connection state of the FC switching network terminal in the embodiment of the present invention adopt the dynamic update method based on the connection state of the FC switching network terminal described above in FIG. 3 . The update method uses the same technical means and can produce the same technical effect, which will not be repeated here.

如图6所示,是本发明一实施例提供的实现基于FC交换网终端连接状态的动态更新方法的电子设备的结构示意图。As shown in FIG. 6 , it is a schematic structural diagram of an electronic device implementing a method for dynamically updating terminal connection status based on an FC switching network provided by an embodiment of the present invention.

所述电子设备1可以包括处理器10、存储器11、通信接口13和总线12,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如基于FC交换网终端连接状态的动态更新程序。Theelectronic device 1 may include aprocessor 10, amemory 11, acommunication interface 13 and abus 12, and may also include a computer program stored in thememory 11 and operable on theprocessor 10, such as based on a FC switching network Dynamic updater of terminal connection status.

其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(SecureDigital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如基于FC交换网终端连接状态的动态更新程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, thememory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc. Thestorage 11 may be an internal storage unit of theelectronic device 1 in some embodiments, such as a mobile hard disk of theelectronic device 1 . Thememory 11 can also be an external storage device of theelectronic device 1 in other embodiments, such as a plug-in mobile hard disk equipped on theelectronic device 1, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, flash memory card (Flash Card), etc. Further, thememory 11 may also include both an internal storage unit of theelectronic device 1 and an external storage device. Thememory 11 can not only be used to store the application software and various data installed in theelectronic device 1, such as the code of the dynamic update program based on the connection state of the FC switching network terminal, but also can be used to temporarily store the output or will be output. The data.

所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如基于FC交换网终端连接状态的动态更新程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。In some embodiments, theprocessor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combination of central processing unit (Central Processing unit, CPU), microprocessor, digital processing chip, graphics processor and various control chips, etc. Theprocessor 10 is the control core (Control Unit) of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and runs or executes programs or modules stored in the memory 11 (for example, based on FC switching network terminal connection state dynamic update program, etc.), and call the data stored in thememory 11 to execute various functions of theelectronic device 1 and process data.

所述总线12可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。Thebus 12 may be a peripheral component interconnect standard (PCI for short) bus or an 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. The bus is configured to realize connection and communication between thememory 11 and at least oneprocessor 10 and the like.

图6仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图6示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 6 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 6 does not constitute a limitation to theelectronic device 1, and may include fewer or more components, or combinations of certain components, or different arrangements of components.

例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, theelectronic device 1 can also include a power supply (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the at least oneprocessor 10 through a power management device, so that the power supply can be controlled by power management. The device implements functions such as charge management, discharge management, and power consumption management. The power supply may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components. Theelectronic device 1 may also include various sensors, bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

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

可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, theelectronic device 1 may further include a user interface, which may be a display (Display) or an input unit (such as a keyboard (Keyboard)). Optionally, the user interface may also be a standard wired interface or 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 panel, and the like. Wherein, the display may also be appropriately called a display screen or a display unit, and is used for displaying information processed in theelectronic device 1 and for displaying a visualized user interface.

应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are only for illustration, and are not limited by the structure in terms of the scope of the patent application.

所述电子设备1中的所述存储器11存储的基于FC交换网终端连接状态的动态更新程序是多个指令的组合,在所述处理器10中运行时,可以实现:The dynamic update program based on the connection state of the FC switching network terminal stored in thememory 11 in theelectronic device 1 is a combination of multiple instructions. When running in theprocessor 10, it can realize:

接收终端的登入请求,将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址;receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal;

获取所述终端的名称及所述交换机的标识,根据所述终端地址、终端的名称及所述交换机的标识,构建终端信息;Obtaining the name of the terminal and the identifier of the switch, constructing terminal information according to the terminal address, the name of the terminal and the identifier of the switch;

将所述终端信息存储于所述交换机的终端登入信息表中,得到本地登入更新终端信息表;storing the terminal information in the terminal login information table of the switch to obtain the local login update terminal information table;

判断所述交换机是否为预设的主交换机;judging whether the switch is a preset master switch;

若所述交换机是主交换机,则不转发所述本地登入更新终端信息表中的终端信息;If the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded;

若所述交换机不是主交换机,则将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表;If the switch is not the main switch, then the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the entire network login update terminal information table;

接收所述终端的登出请求,将所述登出请求发送至所述交换机,在所述交换机的本地登入更新终端信息表中,删除所述终端信息,得到本地登出更新终端信息表;receiving the logout request of the terminal, sending the logout request to the switch, deleting the terminal information in the local login update terminal information table of the switch, and obtaining the local logout update terminal information table;

若所述交换机是主交换机,则不转发所述本地登出更新终端信息表中删除的终端信息;If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded;

若所述交换机不是主交换机,则将所述本地登出更新终端信息表中删除的终端信息,在所述主交换机的整网登入更新终端信息表中删除,得到整网登出更新终端信息表。If the switch is not the main switch, the terminal information deleted in the local logout update terminal information table is deleted in the entire network login update terminal information table of the main switch to obtain the entire network logout update terminal information table .

具体地,所述处理器10对上述指令的具体实现方法可参考图3至图5对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above instructions by theprocessor 10, reference may be made to the description of relevant steps in the embodiments corresponding to FIG. 3 to FIG. 5 , and details are not repeated here.

进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的。例如,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the integrated modules/units of theelectronic device 1 are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory).

本发明还提供一种计算机可读存储介质,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:The present invention also provides a computer-readable storage medium, the readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can realize:

接收终端的登入请求,将所述登入请求发送至预构建的交换机,利用所述交换机为所述终端分配终端地址;receiving a login request from a terminal, sending the login request to a pre-built switch, and using the switch to assign a terminal address to the terminal;

获取所述终端的名称及所述交换机的标识,根据所述终端地址、终端的名称及所述交换机的标识,构建终端信息;Obtaining the name of the terminal and the identifier of the switch, constructing terminal information according to the terminal address, the name of the terminal and the identifier of the switch;

将所述终端信息存储于所述交换机的终端登入信息表中,得到本地登入更新终端信息表;storing the terminal information in the terminal login information table of the switch to obtain the local login update terminal information table;

判断所述交换机是否为预设的主交换机;judging whether the switch is a preset master switch;

若所述交换机是主交换机,则不转发所述本地登入更新终端信息表中的终端信息;If the switch is a master switch, the terminal information in the local login update terminal information table is not forwarded;

若所述交换机不是主交换机,则将所述本地登入更新终端信息表中的终端信息发送至所述主交换机的终端登入信息表中,得到整网登入更新终端信息表;If the switch is not the main switch, then the terminal information in the local login update terminal information table is sent to the terminal login information table of the main switch to obtain the entire network login update terminal information table;

接收所述终端的登出请求,将所述登出请求发送至所述交换机,在所述交换机的本地登入更新终端信息表中,删除所述终端信息,得到本地登出更新终端信息表;receiving the logout request of the terminal, sending the logout request to the switch, deleting the terminal information in the local login update terminal information table of the switch, and obtaining the local logout update terminal information table;

若所述交换机是主交换机,则不转发所述本地登出更新终端信息表中删除的终端信息;If the switch is a master switch, the terminal information deleted in the local logout update terminal information table is not forwarded;

若所述交换机不是主交换机,则将所述本地登出更新终端信息表中删除的终端信息,在所述主交换机的整网登入更新终端信息表中删除,得到整网登出更新终端信息表。If the switch is not the main switch, the terminal information deleted in the local logout update terminal information table is deleted in the entire network login update terminal information table of the main switch to obtain the entire network logout update terminal information table .

在本发明所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed devices, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of hardware plus software function modules.

对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。It will be apparent to those skilled in the art that the invention is not limited to the details of the above-described exemplary embodiments, but that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention.

因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。Accordingly, the embodiments should be regarded in all points of view as exemplary and not restrictive, the scope of the invention being defined by the appended claims rather than the foregoing description, and it is therefore intended that the scope of the invention be defined by the appended claims rather than by the foregoing description. All changes within the meaning and range of equivalents of the elements are embraced in the present invention. Any reference sign in a claim should not be construed as limiting the claim concerned.

本发明所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The block chain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain (Blockchain), essentially a decentralized database, is a series of data blocks associated with each other using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify its Validity of information (anti-counterfeiting) and generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。In addition, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or devices stated in the system claims may also be realized by one unit or device through software or hardware. Secondary terms are used to denote names without implying any particular order.

最后应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent replacements can be made without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

CN202211235241.5A2022-10-102022-10-10 Dynamic update method, device and medium based on FC switching network terminal connection statusActiveCN115550177B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211235241.5ACN115550177B (en)2022-10-102022-10-10 Dynamic update method, device and medium based on FC switching network terminal connection status

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211235241.5ACN115550177B (en)2022-10-102022-10-10 Dynamic update method, device and medium based on FC switching network terminal connection status

Publications (2)

Publication NumberPublication Date
CN115550177Atrue CN115550177A (en)2022-12-30
CN115550177B CN115550177B (en)2025-04-08

Family

ID=84734149

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211235241.5AActiveCN115550177B (en)2022-10-102022-10-10 Dynamic update method, device and medium based on FC switching network terminal connection status

Country Status (1)

CountryLink
CN (1)CN115550177B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20130201990A1 (en)*2010-08-062013-08-08Beijing Qiantang Network Technology Company, Ltd.Method and system of accessing network for access network device
CN105338127A (en)*2014-07-182016-02-17华为技术有限公司Media access control MAC address table updating method, switch and system
CN114465904A (en)*2020-10-212022-05-10西门子(中国)有限公司Network topology construction method and computing equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20130201990A1 (en)*2010-08-062013-08-08Beijing Qiantang Network Technology Company, Ltd.Method and system of accessing network for access network device
CN105338127A (en)*2014-07-182016-02-17华为技术有限公司Media access control MAC address table updating method, switch and system
CN114465904A (en)*2020-10-212022-05-10西门子(中国)有限公司Network topology construction method and computing equipment

Also Published As

Publication numberPublication date
CN115550177B (en)2025-04-08

Similar Documents

PublicationPublication DateTitle
JP4740897B2 (en) Virtual network configuration method and network system
JP4150336B2 (en) Configuration to create multiple virtual queue pairs from compressed queue pairs based on shared attributes
KR101414017B1 (en)Sas zone group permission table version identifiers
US8683001B2 (en)Address management device
US10656874B2 (en)Storage device operation control method, and storage device
CN102263698B (en)Method for establishing virtual channel, method of data transmission and line card
CN110221918A (en)A kind of correlating method, the apparatus and system of NS and VNF
CN114650223B (en)Network configuration method and device of Kubernetes cluster and electronic equipment
JP2008228150A (en)Switch device, and frame switching method and program thereof
JP6543246B2 (en) Network interface
CN107800737A (en)The determination method, apparatus and server cluster of host node in a kind of server cluster
CN114143853B (en) Communication link selection method, device and storage medium
TWI799179B (en)Computing systems and methods for management of a network device
CN110851186B (en)Network equipment restarting method and device, electronic equipment and readable storage medium
WO2022052496A1 (en)Address reservation method, network device, and system
CN115550177A (en)Dynamic updating method, device and medium based on FC switching network terminal connection state
CN118400339A (en)Tenant management method, device, controller and storage medium
CN117354867A (en) Data transmission method, device and storage medium
CN101902436A (en) Inter-board communication method, device and system
CN116095007A (en) Load scheduling method, device, computer equipment and storage medium
CN118426937A (en)Port resource allocation method, device, equipment, storage medium and program product
EP3573303A1 (en)Forwarder network-access recognition method, sdn controller, and forwarder
CN106161439B (en)A kind of information processing method and electronic equipment
CN115988078A (en)Communication method, system, electronic device and storage medium
CN115604206B (en) Universal method, device, electronic device and storage medium for obtaining terminal connection status

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp