CN115604206A - Universal terminal connection state acquisition method and device, electronic equipment and storage medium - Google Patents
Universal terminal connection state acquisition method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115604206A CN115604206A CN202211235549.XA CN202211235549A CN115604206A CN 115604206 A CN115604206 A CN 115604206A CN 202211235549 A CN202211235549 A CN 202211235549A CN 115604206 A CN115604206 A CN 115604206A
- Authority
- CN
- China
- Prior art keywords
- frame
- terminal
- request
- connection
- main switch
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/15—Interconnection of switching modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及协议通信技术领域,尤其涉及一种基于FC交换网的终端连接状态通用获取方法、装置、电子设备及计算机可读存储介质。The present invention relates to the technical field of protocol communication, in particular to a general acquisition method, device, electronic equipment and computer-readable storage medium for terminal connection status based on FC switching network.
背景技术Background technique
光纤通道(Fiber Channel,简称FC)协议是一种高速串行通信协议,具有高带宽、高可靠性、低迟延、灵活的拓扑结构和开放性特点。为了满足FC协议在航空电子通信系统中的应用需求,目前已制定了适用于航空电子环境的多组FC协议簇。The Fiber Channel (FC for short) protocol is a high-speed serial communication protocol featuring high bandwidth, high reliability, low delay, flexible topology and openness. In order to meet the application requirements of the FC protocol in the avionics communication system, several sets of FC protocol clusters suitable for the avionics environment have been developed.
但目前航天领域终端接入至FC交换网中的交换机,均使用静态配置,即网络运行参数在初始化前人工指定,系统启动后根据初始运行参数识别设备信息,从而进行网络通信。也有基于动态配置的接入方式,主要通过DHCP协议和WINS服务完成。DHCP协议用于服务器为终端动态分配IP地址,WINS服务用于集中管理网络中终端的接入信息,以供通信时目的计算机信息的查询。However, at present, the switches connected to the FC switching network by terminals in the aerospace field use static configuration, that is, the network operating parameters are manually specified before initialization, and the device information is identified according to the initial operating parameters after the system is started, so as to carry out network communication. There is also an access method based on dynamic configuration, which is mainly completed through the DHCP protocol and WINS service. The DHCP protocol is used by the server to dynamically assign IP addresses to the terminals, and the WINS service is used to centrally manage the access information of the terminals in the network for querying the destination computer information during communication.
上述静态配置及动态配置均可有效的完成终端接入至FC交换网,但受限于FC协议簇的多样性,目前还没有一种通用的满足多组FC协议簇的终端接入至FC交换网的方法。The above static configuration and dynamic configuration can effectively complete the terminal access to the FC switching network. However, due to the diversity of the FC protocol cluster, there is no general terminal access to the FC switching network that meets the requirements of multiple groups of FC protocol clusters. net method.
发明内容Contents of the invention
本发明提供一种基于FC交换网的终端连接状态通用获取方法、装置及计算机可读存储介质,其主要目的在于解决因FC协议簇多样性,而无法通用的实现终端接入FC交换网的问题。The present invention provides a method, device, and computer-readable storage medium for universally obtaining terminal connection status based on FC switching network, the main purpose of which is to solve the problem that terminals cannot be universally connected to FC switching network due to the diversity of FC protocol clusters .
为实现上述目的,本发明提供的一种基于FC交换网的终端连接状态通用获取方法,包括:In order to achieve the above object, the present invention provides a general method for acquiring terminal connection status based on FC switching network, including:
接收终端的请求连接帧,将所述请求连接帧发送至预构建的主交换机;receiving the connection request frame of the terminal, and sending the connection request frame to the pre-built master switch;
判断所述请求连接帧是否为第一次发送至所述主交换机;judging whether the connection request frame is sent to the master switch for the first time;
若所述请求连接帧是第一次发送至所述主交换机,则提取所述主交换机中的终端信息,根据所述终端信息封装得到请求应答帧;If the connection request frame is sent to the main switch for the first time, then extract the terminal information in the main switch, and obtain a request response frame according to the terminal information encapsulation;
若所述请求连接帧不是第一次发送至所述主交换机,则不对所述请求应答帧作出响应;If the connection request frame is not sent to the main switch for the first time, then no response is made to the request response frame;
将所述请求应答帧回传至所述终端,得到终端连接状态信息。Returning the request response frame to the terminal to obtain terminal connection state information.
可选地,所述接收终端的请求连接帧的生成方法,包括:Optionally, the method for generating the connection request frame of the receiving terminal includes:
根据预构建的通用帧的结构信息及FC网络标准生成通用帧;Generate a general frame according to the structural information of the pre-built general frame and the FC network standard;
改变所述通用帧的帧类型,得到信息待完善的请求连接帧;changing the frame type of the general frame to obtain a connection request frame whose information needs to be improved;
获取所述主交换机的ID及所述终端的ID;Obtain the ID of the main switch and the ID of the terminal;
组合所述主交换机的ID及所述终端的ID至信息待完善的所述请求连接帧,得到所述请求连接帧。Combining the ID of the master switch and the ID of the terminal with the connection request frame whose information is to be completed, to obtain the connection request frame.
可选地,所述改变所述通用帧的帧类型,得到信息待完善的请求连接帧,包括:Optionally, changing the frame type of the general frame to obtain a connection request frame whose information needs to be completed includes:
获取帧类型取值表,在所述帧类型取值表中查找所述请求连接帧对应的帧类型取值;Obtain a frame type value table, and look up the frame type value corresponding to the request connection frame in the frame type value table;
提取所述终端发送此次请求连接帧的帧序号,将所述帧序号及所述帧类型取值填充进所述通用帧,得到信息待完善的所述请求连接帧。Extracting the frame number of the connection request frame sent by the terminal this time, filling the frame number and the value of the frame type into the general frame, and obtaining the connection request frame whose information is to be completed.
可选地,所述判断所述请求连接帧是否为第一次发送至所述主交换机,包括:Optionally, the judging whether the connection request frame is sent to the main switch for the first time includes:
从所述请求连接帧中提取所述帧序号及所述终端的ID;extracting the frame sequence number and the ID of the terminal from the connection request frame;
根据所述主交换机是否有与所述帧序号及所述终端的ID相同的历史帧序号及ID,判断所述请求连接帧是否为第一次发送至所述主交换机。According to whether the main switch has the same historical frame number and ID as the frame number and the ID of the terminal, it is judged whether the connection request frame is sent to the main switch for the first time.
可选地,所述终端信息的生成方法,包括:Optionally, the method for generating terminal information includes:
将终端的登录协议传输至与所述终端相连的交换机;transmitting the login protocol of the terminal to a switch connected to the terminal;
在所述交换机内生成所述终端的分配地址,并将所述分配地址填充至预构建的登录响应帧回传至所述终端,同时获取包括所述终端的终端名称、终端地址、所连接交换机标识的终端信息,并存入至所述主交换机的整网终端接入信息表,得到所述终端信息。Generate the distribution address of the terminal in the switch, fill the distribution address into a pre-built login response frame and send it back to the terminal, and obtain the terminal name, terminal address, and connected switch of the terminal at the same time The identified terminal information is stored in the network-wide terminal access information table of the master switch to obtain the terminal information.
可选地,所述根据所述终端信息封装得到请求应答帧,包括:Optionally, said encapsulating and obtaining the request response frame according to the terminal information includes:
根据所述通用帧的结构信息及FC网络标准生成原始应答帧;generating an original response frame according to the structural information of the general frame and the FC network standard;
改变所述原始应答帧的帧类型,得到信息待完善的请求应答帧;changing the frame type of the original response frame to obtain a request response frame whose information needs to be improved;
将所述终端信息封装至信息待完善的所述请求应答帧,得到所述请求应答帧。Encapsulating the terminal information into the request response frame whose information is to be completed, to obtain the request response frame.
可选地,所述将所述请求连接帧发送至预构建的主交换机,包括:Optionally, the sending the request connection frame to the pre-built master switch includes:
判断所述终端是否与所述主交换机直接连接;judging whether the terminal is directly connected to the main switch;
若所述终端与所述主交换机直接连接,则将所述请求连接帧发送至所述主交换机;If the terminal is directly connected to the main switch, sending the connection request frame to the main switch;
若所述终端不与所述主交换机直接连接,则将所述请求连接帧,通过预构建的副交换机的若干次转发,到达所述主交换机。If the terminal is not directly connected to the main switch, the connection request frame is forwarded several times by the pre-built secondary switch to reach the main switch.
为了解决上述问题,本发明还提供一种基于FC交换网的终端连接状态通用获取装置,所述装置包括:In order to solve the above problems, the present invention also provides a device for universally obtaining terminal connection status based on FC switching network, said device comprising:
请求连接帧发送模块,用于接收终端的请求连接帧,将所述请求连接帧发送至预构建的主交换机;The request connection frame sending module is used to receive the request connection frame of the terminal, and send the request connection frame to the pre-built master switch;
请求连接帧判断模块,用于判断所述请求连接帧是否为第一次发送至所述主交换机;A connection request frame judging module, configured to judge whether the connection request frame is sent to the main switch for the first time;
请求应答帧生成模块,用于若所述请求连接帧是第一次发送至所述主交换机,则提取所述主交换机中的终端信息,根据所述终端信息封装得到请求应答帧;若所述请求连接帧不是第一次发送至所述主交换机,则不对所述请求应答帧作出响应;A request response frame generation module, used to extract terminal information in the main switch if the connection request frame is sent to the main switch for the first time, and obtain a request response frame according to the terminal information encapsulation; if the If the connection request frame is not sent to the master switch for the first time, it will not respond to the request response frame;
请求应答帧回传模块,用于将所述请求应答帧回传至所述终端,得到终端连接状态信息。The request response frame return module is configured to return the request response frame to the terminal to obtain terminal connection status information.
为了解决上述问题,本发明还提供一种电子设备,所述电子设备包括: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 general method for acquiring 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 general acquisition method of terminal connection status based on FC switching network.
基于背景技术所述:静态配置及动态配置均可有效的完成终端接入至FC交换网,但受限于FC协议簇的多样性,目前还没有一种通用的满足多组FC协议簇的终端接入至FC交换网的方法。为解决该问题,本发明实施例将FC交换网络中交换机分为主交换机和副交换机两种,其中主交换机负责维护全网的终端连接状态,副交换机只负责维护本身的终端连接,任何终端的连接最终依赖于主交换机对整个交互网的终端连接状态的控制,当终端请求网络连接状态时,通过判断所述请求连接帧是否为第一次发送至所述主交换机,对所述请求连接帧执行不一样的响应策略,若终端发送的请求连接帧是第一次发送至所述主交换机,则获取与所述终端对应的终端信息,并根据所述终端信息封装得到所述请求应答帧,若请求连接帧不是第一次发送至主交换机,则不对所述请求应答帧作出响应,以避免重复接收到所述请求应答帧的可能。因此本发明将两种接入策略做出有机接口,可最大化实现因不同协议导致终端接入失败的现象。因此本发明提出的基于FC交换网的终端连接状态通用获取方法、装置、电子设备及计算机可读存储介质,可以解决因FC协议簇多样性,而无法通用的实现终端接入FC交换网的问题。Based on the background technology: static configuration and dynamic configuration can effectively complete the terminal access to the FC switching network, but limited by the diversity of FC protocol clusters, there is no general terminal that meets multiple groups of FC protocol clusters. The method of connecting to the FC switching network. In order to solve this problem, the embodiment of the present invention divides the switch in the FC switching network into two types: the main switch and the secondary switch. The main switch is responsible for maintaining the terminal connection status of the entire network, and the secondary switch is only responsible for maintaining its own terminal connection. The connection ultimately depends on the control of the main switch to the terminal connection status of the entire interactive network. When the terminal requests the network connection status, by judging whether the request connection frame is sent to the main switch for the first time, the connection request frame is sent to the main switch for the first time. Executing different response strategies, if the connection request frame sent by the terminal is sent to the main switch for the first time, then obtain the terminal information corresponding to the terminal, and obtain the request response frame according to the terminal information encapsulation, If the connection request frame is not sent to the main switch for the first time, no response is made to the request response frame, so as to avoid the possibility of repeatedly receiving the request response frame. Therefore, the present invention makes the two access strategies an organic interface, which can maximize the realization of terminal access failures caused by different protocols. Therefore, the general acquisition method, device, electronic equipment and computer-readable storage medium based on the terminal connection state of the FC switching network proposed by the present invention can solve the problem that the terminal cannot be universally connected to the FC switching network due to the diversity of the FC protocol cluster .
附图说明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 data interaction diagram of a terminal accessing a switch based on an FC switching network provided by another embodiment of the present invention;
图3为本发明一实施例提供的基于FC交换网的终端连接状态通用获取方法的流程示意图;FIG. 3 is a schematic flow diagram of a general method for obtaining terminal connection status 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 general frame structure diagram of a general method for obtaining terminal connection status based on an FC switching network provided by an embodiment of the present invention;
图6为本发明一实施例提供的基于FC交换网的终端连接状态通用获取方法的通用帧的帧头结构图;FIG. 6 is a frame header structure diagram of a general frame of a general acquisition method for terminal connection status based on an FC switching network provided by an embodiment of the present invention;
图7为本发明一实施例提供的基于FC交换网的终端连接状态通用获取方法的请求连接帧的payload格式图;7 is a payload format diagram of a request connection frame of a general method for obtaining terminal connection status based on an FC switching network provided by an embodiment of the present invention;
图8为本发明一实施例提供的基于FC交换网的终端连接状态通用获取方法的请求应答帧的payload格式图;FIG. 8 is a payload format diagram of a request response frame of a general acquisition method for terminal connection status based on an FC switching network provided by an embodiment of the present invention;
图9为本发明一实施例提供的基于FC交换网的终端连接状态通用获取装置的功能模块图;FIG. 9 is a functional block diagram of a device for universally acquiring terminal connection status based on an FC switching network provided by an embodiment of the present invention;
图10为本发明一实施例提供的实现所述基于FC交换网的终端连接状态通用获取方法的电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device implementing the general method for obtaining terminal connection status based on an FC switching network according to 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交换网的终端连接状态通用获取方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。An embodiment of the present application provides a general method for acquiring a connection state of a terminal based on an FC switching network. The executor of the general method for acquiring terminal connection status based on the FC switching network 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 general method for obtaining terminal connection status based on the FC switching network can be executed by software or hardware installed on the terminal device or 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.
在详细阐述本发明一实施例前,为方便理解并简化术语撰写,先规定如下定义:Before elaborating an embodiment of the present invention in detail, for the convenience of understanding and simplifying the writing of terms, the following definitions are stipulated first:
FC:Fiber Channel(光纤通道)FC: Fiber Channel (Fiber Channel)
LOGI:Login(登录,终端接入交换网时使用的通信协议,简称登录交换网通信协议)LOGI: Login (login, the communication protocol used when the terminal accesses the switching network, referred to as the login switching network communication protocol)
LOGO:Logout(登出,设备退出交换网时使用的通信协议,简称退出交换网通信协议)LOGO: Logout (logout, the communication protocol used when the device exits the switching network, referred to as exiting the switching network communication protocol)
LS_ACC:Link Service Accept(响应方接收服务请求时的回复帧)LS_ACC: Link Service Accept (the reply frame when the responder receives the service request)
FC-LS:Firber Channel-Link Services(光纤通道.链路服务)FC-LS: Fiber Channel-Link Services (Fiber Channel. Link Services)
NC:Network Controller(网络控制器)NC: Network Controller (network controller)
NT:Network Terminal(网络终端)NT: Network Terminal (network terminal)
ID:Identifier(指FC网络中设备唯一的地址标识符,长度为3字节)ID: Identifier (refers to the unique address identifier of the device in the FC network, the length is 3 bytes)
SW:Switch(交换机)SW: Switch (switch)
FLOGI:Fabric Login(终端与交换机之间建立连接时的登录协议,简称登录协议)FLOGI: Fabric Login (the login protocol when establishing a connection between the terminal and the switch, referred to as the login protocol)
LS_REQ:Link State Request(网络节点连接状态请求协议,简称连接状态请求协议)LS_REQ: Link State Request (Network Node Link State Request Protocol, referred to as Link State Request Protocol)
LS_ACK:Link State Acknowledge(网络节点连接状态应答协议,简称连接状态应答协议)LS_ACK: Link State Acknowledge (Network Node Link State Acknowledgment Protocol, referred to as Link State Acknowledgment Protocol)
FLOGI LS_ACC:交换机接受终端FLOGI时回复的帧,简称登录响应帧FLOGI LS_ACC: The frame that the switch replies when receiving the terminal FLOGI, referred to as the login response frame
LOGO LS_ACC:交换机接受终端LOGO时回复的帧,简称退出响应帧LOGO LS_ACC: The frame that the switch replies when accepting the terminal LOGO, referred to as the exit response frame
ELS:Extended Link Servises(扩展链路服务)ELS: Extended Link Servises (extended link services)
PLOGI:Port Login(两个节点设备之间建立连接时的登录协议)PLOGI: Port Login (login protocol when establishing a connection between two node devices)
S_ID:Source ID(源ID,发送FC帧的设备的ID)S_ID: Source ID (source ID, the ID of the device sending the FC frame)
D_ID:Destination ID(目的ID,接收FC帧的设备ID)D_ID: Destination ID (destination ID, device ID receiving FC frame)
级联端口:用于交换机之间互联的端口Cascading ports: ports used for interconnection between switches
Payload:负载,本文指FC帧中除帧头帧尾的定位符、CRC校验、帧头以外的内容。Payload: Payload, this article refers to the content in the FC frame except the locator of the frame header and tail, CRC check, and frame header.
此外,本发明实施例的主要应用场景为FC,FC主要应用航空电子通信系统,适用于航空电子环境。支持FC运转航空电子通信系统的协议称为FC协议,在FC协议中,会同时有不同的终端及交换机,以服务于航空电子通信系统的正常运行。In addition, the main application scenario of the embodiment of the present invention is FC, and FC is mainly applied to an avionics communication system, and is applicable to an avionics environment. The protocol that supports the FC operation of the avionics communication system is called the FC protocol. In the FC protocol, there will be different terminals and switches at the same time to serve the normal operation of the avionics communication system.
需解释的是,在不同的FC协议中,终端类型各不相同,终端之间交互模式也有所不同。例如在FC-AE-1553协议中,终端分为网络控制器(NC)和网络终端(NT),两者交互模式为命令-响应式;在FC-AE-ASM协议中,各终端又是同等关系,但不同的FC协议一般均依赖于图1的交换网络。It should be explained that, in different FC protocols, terminal types are different, and interaction modes between terminals are also different. For example, in the FC-AE-1553 protocol, terminals are divided into network controllers (NC) and network terminals (NT), and the interaction mode between the two is command-response; in the FC-AE-ASM protocol, each terminal is the same relationship, but different FC protocols generally rely on the switching network shown in Figure 1.
图1是一种常见的FC交换网络,在FC交换网内,终端之间、终端与交换网络内交换机之间有通信需求时均需依赖于交换网。Figure 1 is a common FC switching network. In the FC switching network, when there is a need for communication between terminals and between terminals and switches in the switching network, they all need to rely on the switching network.
需解释的是,本发明实施例完成FC交换网链路中各终端的连接状态自动维护,依赖于主交换机及副交换机。交换网中只有一个主交换机,其他为副交换机;主交换机负责维护全网的终端连接状态,为其他终端查询交换网内部终端连接状态提供统一的接口,副交换机只负责维护本身的终端连接状态;副交换机的终端连接信息有变化时,需要将变化信息同步至主交换机。It should be explained that, in the embodiment of the present invention, the automatic maintenance of the connection status of each terminal in the FC switching network link depends on the main switch and the secondary switch. There is only one main switch in the switching network, and the others are sub-switches; the main switch is responsible for maintaining the terminal connection status of the entire network, providing a unified interface for other terminals to query the internal terminal connection status of the switching network, and the sub-switch is only responsible for maintaining its own terminal connection status; When the terminal connection information of the secondary switch changes, the change information needs to be synchronized to the main switch.
本发明实施例以第一终端、第二终端为例,且为了描述方便,分别将第一终端、第二终端的终端接入信息请求端拆分出来,描述第一终端、第二终端接入至交换机的过程,另外,第一终端与主交换机相连,第二终端与副交换机相连,详细示例图请参照图2。In this embodiment of the present invention, the first terminal and the second terminal are taken as examples, and for the convenience of description, the terminal access information request ends of the first terminal and the second terminal are respectively separated, and the access information of the first terminal and the second terminal is described. In addition, the first terminal is connected to the main switch, and the second terminal is connected to the secondary switch. Please refer to Figure 2 for a detailed example diagram.
需依次解释的是,终端接入信息表特指接入FC交换网络并且可以正常通信的终端信息的集合,每个终端信息包括终端名称、终端地址、所连接交换机标识等,可根据实际需求增加其他信息。本发明实施例中,终端接入信息表包括整网和本地之分,其中整网终端接入信息表由主交换机维护,本地终端接入信息表由副交换机维护。What needs to be explained in turn is that the terminal access information table specifically refers to the collection of terminal information that is connected to the FC switching network and can communicate normally. Each terminal information includes terminal name, terminal address, connected switch identifier, etc., which can be added according to actual needs. other information. In the embodiment of the present invention, the terminal access information table includes network-wide and local points, wherein the network-wide terminal access information table is maintained by the master switch, and the local terminal access information table is maintained by the sub-switch.
进一步地,当终端启动后并首次或连接断开后再次接入交换网时,需要为终端分配地址,以第一终端为例,详细的执行过程包括:Furthermore, when the terminal starts up and accesses the switching network for the first time or after the connection is disconnected, it needs to assign an address to the terminal. Taking the first terminal as an example, the detailed execution process includes:
将所述第一终端的登录协议传输至所述主交换机;transmitting the login protocol of the first terminal to the main switch;
在所述主交换机内生成所述第一终端的分配地址,并将所述分配地址填充至所述登录响应帧回传至所述第一终端,同时获取包括所述第一终端的终端名称、终端地址、所连接交换机标识的终端信息,并存入至所述主交换机的整网终端接入信息表。Generate an assigned address of the first terminal in the main switch, fill the assigned address into the login response frame and send it back to the first terminal, and simultaneously obtain a terminal name including the first terminal, The terminal address and the terminal information identified by the connected switch are stored in the network-wide terminal access information table of the main switch.
此外,本发明另一实施例中,当第一终端主动退出交换网时,同时也需要与主交换机执行数据交互,详细的执行过程包括:In addition, in another embodiment of the present invention, when the first terminal voluntarily withdraws from the switching network, it also needs to perform data interaction with the main switch. The detailed execution process includes:
基于所述退出交换网通信协议,在所述第一终端生成退出交换网通信请求,并发送至所述主交换机;Based on the communication protocol for exiting the switching network, a request for exiting the switching network communication is generated at the first terminal and sent to the main switch;
当所述主交换机接收到所述退出交换网通信请求时,在所述主交换机的整网终端接入信息表中删除所述第一终端的终端信息;When the main switch receives the request to exit the switching network communication, delete the terminal information of the first terminal in the terminal access information table of the whole network of the main switch;
当删除成功所述第一终端的终端信息时,生成所述退出响应帧并反馈至所述第一终端,完成第一终端主动退出交换网过程。When the terminal information of the first terminal is successfully deleted, the exit response frame is generated and fed back to the first terminal to complete the process of the first terminal actively exiting the switching network.
同理,参照图2所示,第二终端对应副交换机,当第二终端登录或退出交换网的执行过程,与第一终端相似,主要区别点在于可直接在副交换机的本地终端接入信息表中写入第二终端信息或删除第二终端信息。且第二终端信息需要利用副交换机连接主交换机,然后在主交换机的全网终端接入信息表中插入或删除第二终端信息。Similarly, as shown in Figure 2, the second terminal corresponds to the sub-exchange. When the second terminal logs in or exits the switching network, the execution process is similar to that of the first terminal. The main difference is that the local terminal of the sub-exchange can directly access information. Write or delete the second terminal information in the table. And the second terminal information needs to use the secondary switch to connect to the main switch, and then insert or delete the second terminal information in the network-wide terminal access information table of the main switch.
参照图3所示,为本发明一实施例提供的基于FC交换网的终端连接状态通用获取方法的流程示意图。在本实施例中,以第一终端为例,所述基于FC交换网的终端连接状态通用获取方法包括:Referring to FIG. 3 , it is a schematic flowchart of a general method for obtaining terminal connection status based on FC switching network provided by an embodiment of the present invention. In this embodiment, taking the first terminal as an example, the general method for obtaining the terminal connection status based on the FC switching network includes:
S1、接收终端的请求连接帧,将所述请求连接帧发送至预构建的主交换机;S1. Receive a connection request frame from a terminal, and send the connection request frame to a pre-built master switch;
需解释的是,交换网中只有一个主交换机,其他为副交换机,主交换机负责维护全网的终端连接状态,为其他终端查询交换网内部终端连接状态提供统一接口,副交换机只负责维护本身的终端连接状态,当副交换机的终端连接信息有变化时,需要将变化信息同步至主交换机。It should be explained that there is only one main switch in the switching network, and the others are sub-switches. The main switch is responsible for maintaining the terminal connection status of the entire network and providing a unified interface for other terminals to query the internal terminal connection status of the switching network. The sub-switch is only responsible for maintaining its own Terminal connection status. When the terminal connection information of the secondary switch changes, the change information needs to be synchronized to the main switch.
本发明实施例中,终端准备进入交换网时,需直接与交换机执行通信协议转化,直至满足通信协议转化要求时,才准许终端进入交换网。In the embodiment of the present invention, when the terminal is about to enter the switching network, it needs to directly perform communication protocol conversion with the switch, and the terminal is not allowed to enter the switching network until the communication protocol conversion requirements are met.
需解释的是,终端与主交换机或副交换机均包括LS_REQ:Link State Request(网络节点连接状态请求协议,简称连接状态请求协议)及LS_ACK:Link State Acknowledge(网络节点连接状态应答协议,简称连接状态应答协议)。It should be explained that both the terminal and the main switch or the secondary switch include LS_REQ: Link State Request (Network Node Link State Request Protocol, referred to as Link State Request Protocol) and LS_ACK: Link State Acknowledge (Network Node Link State Acknowledgment Protocol, referred to as Link State Request Protocol) response protocol).
具体地,参阅图4所示,所述根据所述连接状态请求协议,生成请求连接帧,包括:Specifically, referring to FIG. 4 , the generating request connection frame according to the connection status request protocol includes:
S11、根据预构建的通用帧的结构信息及FC网络标准生成通用帧;S11. Generate a general frame according to the structural information of the pre-built general frame and the FC network standard;
S12、改变所述通用帧的帧类型,得到信息待完善的请求连接帧;S12. Change the frame type of the general frame to obtain a connection request frame whose information needs to be completed;
S13、获取所述主交换机的ID及所述终端的ID;S13. Obtain the ID of the main switch and the ID of the terminal;
S14、组合所述主交换机的ID及所述终端的ID至信息待完善的所述请求连接帧,得到所述请求连接帧。S14. Combine the ID of the master switch and the ID of the terminal into the connection request frame whose information needs to be completed to obtain the connection request frame.
需解释的是,本发明所述通用帧是支持FC运转航空电子通信系统的协议,即FC协议的通用帧格式,其中一个通用帧格式请参阅图5所示,主要包括SOF、CRC、EOF、通用帧头及Data_Field。其中SOF、CRC、EOF及Data_Field为通信领域常见技术标识,在此不再赘述。It should be explained that the general frame of the present invention is a protocol that supports the FC operation of the avionics communication system, that is, the general frame format of the FC protocol. One of the general frame formats is shown in Figure 5, which mainly includes SOF, CRC, EOF, Common frame header and Data_Field. Among them, SOF, CRC, EOF, and Data_Field are common technical identifiers in the communication field, and will not be repeated here.
结合图5所示,继续细化通用帧头的结构,请参阅图6所示。根据图6所示,通用帧头包括R_CTL、D_ID、S_ID、Payload等,其中D_ID即为接收FC帧的设备的ID,S_ID为发送FC帧的设备的ID,R_CTL设置为0x22,Payload简称负载,在本发明实施例中,指除SOF、CRC等内容以外的其他信息内容。Combined with what is shown in Figure 5, continue to refine the structure of the general frame header, please refer to Figure 6. As shown in Figure 6, the general frame header includes R_CTL, D_ID, S_ID, Payload, etc., where D_ID is the ID of the device receiving the FC frame, S_ID is the ID of the device sending the FC frame, R_CTL is set to 0x22, and Payload is referred to as the load. In the embodiment of the present invention, it refers to other information content except SOF, CRC and other content.
本发明实施例中,所述改变所述通用帧的帧类型,得到信息待完善的请求连接帧,包括:In the embodiment of the present invention, changing the frame type of the general frame to obtain the request connection frame whose information needs to be completed includes:
获取帧类型取值表,在所述帧类型取值表中查找所述请求连接帧对应的帧类型取值;Obtain a frame type value table, and look up the frame type value corresponding to the request connection frame in the frame type value table;
提取所述终端发送此次请求连接帧的帧序号,将所述帧序号及所述帧类型取值填充进所述通用帧,得到信息待完善的所述请求连接帧。Extracting the frame number of the connection request frame sent by the terminal this time, filling the frame number and the value of the frame type into the general frame, and obtaining the connection request frame whose information is to be completed.
本发明实施例中,所述请求连接帧的帧类型取值为0xA7。In the embodiment of the present invention, the frame type of the connection request frame is 0xA7.
需解释的是,请求连接帧的帧序号指LS_REQ帧的payload格式中的Req_Num字段,是按次数逐渐递加,如终端第一次发送请求连接时,则对应的帧序号为0,第二次发送请求连接时,则对应的帧序号为1。It should be explained that the frame number of the request connection frame refers to the Req_Num field in the payload format of the LS_REQ frame, which is gradually increased by the number of times. For example, when the terminal sends a connection request for the first time, the corresponding frame number is 0, and the second time When sending a connection request, the corresponding frame number is 1.
详细地,所述请求连接帧的payload格式,参阅图7所示。LS_REQ帧的payload格式中共8字节。Req_Num为终端发出LS_REQ帧的序号,用于对每条LS_REQ帧进行识别。In detail, the payload format of the connection request frame is shown in FIG. 7 . The payload format of the LS_REQ frame has a total of 8 bytes. Req_Num is the serial number of the LS_REQ frame sent by the terminal, and is used to identify each LS_REQ frame.
本发明实施例中,所述将所述请求连接帧发送至预构建的主交换机,包括:In the embodiment of the present invention, the sending the request connection frame to the pre-built master switch includes:
判断所述终端是否与所述主交换机直接连接;judging whether the terminal is directly connected to the main switch;
若所述终端与所述主交换机直接连接,则将所述请求连接帧发送至所述主交换机;If the terminal is directly connected to the main switch, sending the connection request frame to the main switch;
若所述终端不与所述主交换机直接连接,则将所述请求连接帧,通过预构建的副交换机的若干次转发,到达所述主交换机。If the terminal is not directly connected to the main switch, the connection request frame is forwarded several times by the pre-built secondary switch to reach the main switch.
详细地,所述请求连接帧需要经过所述副交换机转发时,所述副交换机根据S_ID及Req_Num识别是否是第一次接收到此帧,是则将此帧从级联端口进行转发,否则直接丢弃。所述请求连接帧经所述副交换机的若干次转发到达所述主交换机。In detail, when the connection request frame needs to be forwarded by the sub-switch, the sub-switch identifies whether it is the first time to receive the frame according to the S_ID and Req_Num, and if so, forwards the frame from the cascade port, otherwise directly throw away. The connection request frame is forwarded several times by the secondary switch to the main switch.
S2、判断所述请求连接帧是否为第一次发送至所述主交换机;S2. Judging whether the connection request frame is sent to the main switch for the first time;
本发明实施例中,所述判断所述请求连接帧是否为第一次发送至所述主交换机,包括:In the embodiment of the present invention, the judging whether the connection request frame is sent to the main switch for the first time includes:
从所述请求连接帧中提取所述帧序号及所述终端的ID;extracting the frame sequence number and the ID of the terminal from the connection request frame;
根据所述主交换机是否有与所述帧序号及所述终端的ID相同的历史帧序号及ID,判断所述请求连接帧是否为第一次发送至所述主交换机。According to whether the main switch has the same historical frame number and ID as the frame number and the ID of the terminal, it is judged whether the connection request frame is sent to the main switch for the first time.
进一步地,所述请求应答帧的生成过程与所述请求连接帧相似,主要区别在于帧类型取值表中关于请求应答帧对应的帧类型取值,示例性的,上述请求连接帧的帧类型取值为0xA7,请求应答帧的帧类型取值为0xA8。Further, the generation process of the request response frame is similar to the request connection frame, the main difference is that the frame type value corresponding to the request response frame in the frame type value table, for example, the frame type of the above request connection frame The value is 0xA7, and the frame type of the request response frame is 0xA8.
详细地,所述请求应答帧的payload格式,参阅图8所示。所述请求应答帧的长度取决于包含终端信息的条数。请求应答帧中的每条终端连接信息包括:SW_Num(终端连接交换机的标识)、Node_ID(终端的地址)及Node_Name(终端的名称)。In detail, the payload format of the request response frame is shown in FIG. 8 . The length of the request response frame depends on the number of pieces containing terminal information. Each piece of terminal connection information in the request response frame includes: SW_Num (identification of the switch to which the terminal is connected), Node_ID (address of the terminal) and Node_Name (name of the terminal).
本发明实施例中,判断请求连接帧是否第一次发送至副交换机的判断方法,与判断请求连接帧是否第一次发送至主交换机的判断方法相同,主要查看是否能在副交换机中找到与帧序号及终端的ID相同的历史帧序号及ID,在此不再赘述。In the embodiment of the present invention, the judging method for judging whether the connection request frame is sent to the sub-switch for the first time is the same as the judging method for judging whether the connection request frame is sent to the main switch for the first time. The historical frame numbers and IDs whose frame numbers are the same as the ID of the terminal will not be repeated here.
若所述请求连接帧是第一次发送至所述主交换机,则执行S3、提取所述主交换机中的终端信息,根据所述终端信息封装得到请求应答帧;If the connection request frame is sent to the main switch for the first time, execute S3, extract terminal information in the main switch, and obtain a request response frame according to the terminal information encapsulation;
本发明实施例中,所述终端信息可以从所述主机交换机的整网终端接入信息表中获取,所述终端信息包括终端名称、终端地址、所连接交换机标识等,可根据实际需求增加其他信息。In the embodiment of the present invention, the terminal information can be obtained from the network-wide terminal access information table of the host switch, and the terminal information includes terminal name, terminal address, connected switch identifier, etc. Other information can be added according to actual needs information.
本发明实施例中,所述终端信息的生成方法,包括:In the embodiment of the present invention, the method for generating terminal information includes:
将终端的登录协议传输至与所述终端相连的交换机;transmitting the login protocol of the terminal to a switch connected to the terminal;
在所述交换机内生成所述终端的分配地址,并将所述分配地址填充至预构建的登录响应帧回传至所述终端,同时获取包括所述终端的终端名称、终端地址、所连接交换机标识的终端信息,并存入至所述主交换机的整网终端接入信息表,得到所述终端信息。Generate the distribution address of the terminal in the switch, fill the distribution address into a pre-built login response frame and send it back to the terminal, and obtain the terminal name, terminal address, and connected switch of the terminal at the same time The identified terminal information is stored in the network-wide terminal access information table of the master switch to obtain the terminal information.
由于将终端信息写入至本地终端接入信息表的具体实施过程与前述类似,在此不再赘述。Since the specific implementation process of writing the terminal information into the local terminal access information table is similar to the above, it will not be repeated here.
本发明实施例中,所述根据所述终端信息封装得到请求应答帧,包括:In the embodiment of the present invention, said encapsulating and obtaining the request response frame according to the terminal information includes:
根据所述通用帧的结构信息及FC网络标准生成原始应答帧;generating an original response frame according to the structural information of the general frame and the FC network standard;
改变所述原始应答帧的帧类型,得到信息待完善的请求应答帧;changing the frame type of the original response frame to obtain a request response frame whose information needs to be improved;
将所述终端信息封装至信息待完善的所述请求应答帧,得到所述请求应答帧。Encapsulating the terminal information into the request response frame whose information is to be completed, to obtain the request response frame.
需解释的是,本发明实施例将终端信息封装至请求应答帧中的Payload内。It should be explained that the embodiment of the present invention encapsulates the terminal information into the Payload in the request response frame.
若所述请求连接帧不是第一次发送至所述主交换机,则执行S4、不对所述请求应答帧作出响应;If the connection request frame is not sent to the master switch for the first time, perform S4 and not respond to the request response frame;
可理解的,由于两个交换机之间可能有多种路由,因此同一个请求连接帧可能通过不同的路由被转发到所述主交换机,导致所述主交换机重复接收到所述请求连接帧,因此,当所述请求连接帧不是第一次发送至所述主交换机时,则不需要对所述请求应答帧作出响应。Understandably, since there may be multiple routes between the two switches, the same connection request frame may be forwarded to the main switch through different routes, causing the main switch to repeatedly receive the connection request frame, so , when the connection request frame is not sent to the master switch for the first time, there is no need to respond to the request response frame.
S5、将所述请求应答帧回传至所述终端,得到终端连接状态信息。S5. Return the request response frame to the terminal to obtain terminal connection status information.
详细地,当所述请求应答帧需要经过副交换机转发时,副交换机根据D_ID及Ack_Num识别是否第一次接收到此帧,是则将此帧从级联端口进行转发,否则丢弃。所述请求应答帧经副交换机的若干次转发到达请求端。所述终端连接状态信息包括接入FC交换网络并且可以正常通信的终端信息的集合。Specifically, when the request response frame needs to be forwarded by the sub-switch, the sub-switch identifies whether the frame is received for the first time according to the D_ID and Ack_Num, and if so, forwards the frame from the cascade port, otherwise discards it. The request response frame is forwarded several times by the secondary switch to the requesting end. The terminal connection status information includes a collection of terminal information that is connected to the FC switching network and can communicate normally.
基于背景技术所述:静态配置及动态配置均可有效的完成终端接入至FC交换网,但受限于FC协议簇的多样性,目前还没有一种通用的满足多组FC协议簇的终端接入至FC交换网的方法。为解决该问题,本发明实施例将FC交换网络中交换机分为主交换机和副交换机两种,其中主交换机负责维护全网的终端连接状态,副交换机只负责维护本身的终端连接,任何终端的连接最终依赖于主交换机对整个交互网的终端连接状态的控制,当终端请求网络连接状态时,通过判断所述请求连接帧是否为第一次发送至所述主交换机,对所述请求连接帧执行不一样的响应策略,若终端发送的请求连接帧是第一次发送至所述主交换机,则获取与所述终端对应的终端信息,并根据所述终端信息封装得到所述请求应答帧,若请求连接帧不是第一次发送至主交换机,则不对所述请求应答帧作出响应,以避免重复接收到所述请求应答帧的可能。因此本发明将两种接入策略做出有机接口,可最大化实现因不同协议导致终端接入失败的现象。因此本发明提出的基于FC交换网的终端连接状态通用获取方法、装置、电子设备及计算机可读存储介质,可以解决因FC协议簇多样性,而无法通用的实现终端接入FC交换网的问题。Based on the background technology: static configuration and dynamic configuration can effectively complete the terminal access to the FC switching network, but limited by the diversity of FC protocol clusters, there is no general terminal that meets multiple groups of FC protocol clusters. The method of connecting to the FC switching network. In order to solve this problem, the embodiment of the present invention divides the switch in the FC switching network into two types: the main switch and the secondary switch. The main switch is responsible for maintaining the terminal connection status of the entire network, and the secondary switch is only responsible for maintaining its own terminal connection. The connection ultimately depends on the control of the main switch to the terminal connection status of the entire interactive network. When the terminal requests the network connection status, by judging whether the request connection frame is sent to the main switch for the first time, the connection request frame is sent to the main switch for the first time. Executing different response strategies, if the connection request frame sent by the terminal is sent to the main switch for the first time, then obtain the terminal information corresponding to the terminal, and obtain the request response frame according to the terminal information encapsulation, If the connection request frame is not sent to the main switch for the first time, no response is made to the request response frame, so as to avoid the possibility of repeatedly receiving the request response frame. Therefore, the present invention makes the two access strategies an organic interface, which can maximize the realization of terminal access failures caused by different protocols. Therefore, the general acquisition method, device, electronic equipment and computer-readable storage medium based on the terminal connection state of the FC switching network proposed by the present invention can solve the problem that the terminal cannot be universally connected to the FC switching network due to the diversity of the FC protocol cluster .
如图9所示,是本发明一实施例提供的基于FC交换网的终端连接状态通用获取装置的功能模块图。As shown in FIG. 9 , it is a functional block diagram of a device for universally acquiring 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。本发明所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。The
所述请求连接帧发送模块101,用于接收终端的请求连接帧,将所述请求连接帧发送至预构建的主交换机;The connection request
所述请求连接帧判断模块102,用于判断所述请求连接帧是否为第一次发送至所述主交换机;The request connection
所述请求应答帧生成模块103,用于若所述请求连接帧是第一次发送至所述主交换机,则提取所述主交换机中的终端信息,根据所述终端信息封装得到请求应答帧;若所述请求连接帧不是第一次发送至所述主交换机,则不对所述请求应答帧作出响应;The request response
所述请求应答帧回传模块104,用于将所述请求应答帧回传至所述终端,得到终端连接状态信息。The request response
详细地,本发明实施例中所述基于FC交换网的终端连接状态通用获取装置100中的所述各模块在使用时采用与上述的图1中所述的基于FC交换网的终端连接状态通用获取方法一样的技术手段,并能够产生相同的技术效果,这里不再赘述。In detail, in the embodiment of the present invention, the modules in the
如图10所示,是本发明一实施例提供的实现基于FC交换网的终端连接状态通用获取方法的电子设备的结构示意图。As shown in FIG. 10 , it is a schematic structural diagram of an electronic device implementing a general method for obtaining terminal connection status based on an FC switching network provided by an embodiment of the present invention.
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如基于FC交换网的终端连接状态通用获取程序12。The
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(SecureDigital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如基于FC交换网的终端连接状态通用获取程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如基于FC交换网的终端连接状态通用获取程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。In some embodiments, the
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。The bus may be a peripheral component interconnect (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 the
图10仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图10示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 10 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 10 does not constitute a limitation to the
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, the
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。Further, the
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。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交换网的终端连接状态通用获取程序12是多个指令的组合,在所述处理器10中运行时,可以实现:The
接收终端的请求连接帧,将所述请求连接帧发送至预构建的主交换机;receiving the connection request frame of the terminal, and sending the connection request frame to the pre-built master switch;
判断所述请求连接帧是否为第一次发送至所述主交换机;judging whether the connection request frame is sent to the master switch for the first time;
若所述请求连接帧是第一次发送至所述主交换机,则提取所述主交换机中的终端信息,根据所述终端信息封装得到请求应答帧;If the connection request frame is sent to the main switch for the first time, then extract the terminal information in the main switch, and obtain a request response frame according to the terminal information encapsulation;
若所述请求连接帧不是第一次发送至所述主交换机,则不对所述请求应答帧作出响应;If the connection request frame is not sent to the main switch for the first time, then no response is made to the request response frame;
将所述请求应答帧回传至所述终端,得到终端连接状态信息。Returning the request response frame to the terminal to obtain terminal connection state information.
具体地,所述处理器10对上述指令的具体实现方法可参考图1至图8对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above instructions by the
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的。例如,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the integrated modules/units of the
本发明还提供一种计算机可读存储介质,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现: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 the connection request frame of the terminal, and sending the connection request frame to the pre-built master switch;
判断所述请求连接帧是否为第一次发送至所述主交换机;judging whether the connection request frame is sent to the master switch for the first time;
若所述请求连接帧是第一次发送至所述主交换机,则提取所述主交换机中的终端信息,根据所述终端信息封装得到请求应答帧;If the connection request frame is sent to the main switch for the first time, then extract the terminal information in the main switch, and obtain a request response frame according to the terminal information encapsulation;
若所述请求连接帧不是第一次发送至所述主交换机,则不对所述请求应答帧作出响应;If the connection request frame is not sent to the main switch for the first time, then no response is made to the request response frame;
将所述请求应答帧回传至所述终端,得到终端连接状态信息。Returning the request response frame to the terminal to obtain terminal connection state information.
在本发明所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。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)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211235549.XA CN115604206B (en) | 2022-10-10 | 2022-10-10 | Universal method, device, electronic device and storage medium for obtaining terminal connection status |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211235549.XA CN115604206B (en) | 2022-10-10 | 2022-10-10 | Universal method, device, electronic device and storage medium for obtaining terminal connection status |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115604206A true CN115604206A (en) | 2023-01-13 |
CN115604206B CN115604206B (en) | 2025-04-08 |
Family
ID=84847444
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211235549.XA Active CN115604206B (en) | 2022-10-10 | 2022-10-10 | Universal method, device, electronic device and storage medium for obtaining terminal connection status |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115604206B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3008096B1 (en) * | 1998-08-27 | 2000-02-14 | 株式会社超高速ネットワーク・コンピュータ技術研究所 | Connection setting method for multilink connection |
US20050213531A1 (en) * | 2004-03-26 | 2005-09-29 | Sanjiv Nanda | Routing communications in an ad hoc network |
CN102208945A (en) * | 2010-03-31 | 2011-10-05 | 成都市华为赛门铁克科技有限公司 | Method for obtaining network address and FCoE target and communication system |
CN114143295A (en) * | 2021-10-14 | 2022-03-04 | 北京国科天迅科技有限公司 | Transmission switch, FC-AE equipment and Ethernet equipment communication method |
-
2022
- 2022-10-10 CN CN202211235549.XA patent/CN115604206B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3008096B1 (en) * | 1998-08-27 | 2000-02-14 | 株式会社超高速ネットワーク・コンピュータ技術研究所 | Connection setting method for multilink connection |
US20050213531A1 (en) * | 2004-03-26 | 2005-09-29 | Sanjiv Nanda | Routing communications in an ad hoc network |
CN102208945A (en) * | 2010-03-31 | 2011-10-05 | 成都市华为赛门铁克科技有限公司 | Method for obtaining network address and FCoE target and communication system |
CN114143295A (en) * | 2021-10-14 | 2022-03-04 | 北京国科天迅科技有限公司 | Transmission switch, FC-AE equipment and Ethernet equipment communication method |
Also Published As
Publication number | Publication date |
---|---|
CN115604206B (en) | 2025-04-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108293022B (en) | Method, device and system for transmitting message | |
KR101623416B1 (en) | Communication method and system | |
US9137175B2 (en) | High performance ethernet networking utilizing existing fibre channel fabric HBA technology | |
US20100115132A1 (en) | Address identifier scaling in converged networks | |
US20120131225A1 (en) | Data center network system and packet forwarding method thereof | |
TW200807966A (en) | Scaling egress network traffic | |
CN101778050A (en) | Load balancing method, device and system | |
CN114050998A (en) | Method, device, electronic equipment and medium for realizing remote direct memory access | |
WO2021185083A1 (en) | Vnf instantiation method and device | |
CN111092942B (en) | Message processing method and device, electronic equipment and storage medium | |
WO2022052496A1 (en) | Address reservation method, network device, and system | |
CN112003685B (en) | A flexible Ethernet message forwarding method and device | |
CN109286564B (en) | Message forwarding method and device | |
CN117041147B (en) | Intelligent network card equipment, host equipment, method and system | |
CN109582242B (en) | Address determination method and device for cascade memory array system and electronic equipment | |
CN113691466A (en) | Data transmission method, intelligent network card, computing device and storage medium | |
CN115604206A (en) | Universal terminal connection state acquisition method and device, electronic equipment and storage medium | |
TWI799179B (en) | Computing systems and methods for management of a network device | |
CN117354867A (en) | Data transmission method, device and storage medium | |
CN111865801B (en) | Virtio port-based data transmission method and system | |
CN115987915A (en) | Message forwarding method and related equipment for virtual switch | |
CN111240867B (en) | Information communication system and method | |
CN114531320A (en) | Communication method, device, equipment, system and computer readable storage medium | |
CN115550177B (en) | Dynamic update method, device and medium based on FC switching network terminal connection status | |
CN114928589B (en) | Data transmission method, data transmission device, computer readable medium and apparatus |
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 |