CN117675535A - Dual redundant communication method, device and computer equipment based on port routing management - Google Patents

Dual redundant communication method, device and computer equipment based on port routing management Download PDF

Info

Publication number
CN117675535A
CN117675535A CN202311719194.6A CN202311719194A CN117675535A CN 117675535 A CN117675535 A CN 117675535A CN 202311719194 A CN202311719194 A CN 202311719194A CN 117675535 A CN117675535 A CN 117675535A
Authority
CN
China
Prior art keywords
information
transmitted
destination address
switch
target
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.)
Pending
Application number
CN202311719194.6A
Other languages
Chinese (zh)
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.)
Beijing Tasson Science and Technology Co Ltd
Original Assignee
Beijing Tasson Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tasson Science and Technology Co Ltd filed Critical Beijing Tasson Science and Technology Co Ltd
Priority to CN202311719194.6A priority Critical patent/CN117675535A/en
Publication of CN117675535A publication Critical patent/CN117675535A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Landscapes

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

Abstract

The application relates to a dual redundancy communication method, a dual redundancy communication device, a dual redundancy communication computer device and a dual redundancy storage medium based on port routing management. The method comprises the following steps: receiving information to be transmitted, wherein the information to be transmitted carries a destination address; checking the communication condition of the current switch and the node corresponding to the destination address; under the condition that the current switch is not communicated with the node corresponding to the destination address, inquiring a target switch communicated with the node corresponding to the destination address; and sending the information to be transmitted to the target switch to instruct the target switch to forward the information to be transmitted to a node corresponding to the destination address. The method can complete double-redundancy communication with low cost.

Description

基于端口路由管理的双冗余通信方法、装置和计算机设备Dual redundant communication method, device and computer equipment based on port routing management

技术领域Technical field

本申请涉及通信技术领域,特别是涉及一种基于端口路由管理的双冗余通信方法、装置、计算机设备和存储介质。The present application relates to the field of communication technology, and in particular to a dual-redundant communication method, device, computer equipment and storage medium based on port routing management.

背景技术Background technique

高速串行传输总线光纤通道(Fibre Channel,FC)具备通道和网络的双重优势,具备高带宽、高可靠、抵抗电磁干扰等优点,能够提供非常稳定可靠的光纤连接,容易构建大型的数据传输和通信网络。The high-speed serial transmission bus Fiber Channel (FC) has the dual advantages of channel and network. It has the advantages of high bandwidth, high reliability, and resistance to electromagnetic interference. It can provide a very stable and reliable optical fiber connection, and it is easy to build large-scale data transmission and Communications network.

FC交换机作为FC网络中的核心设备,对整个FC网络的数据交换起着决定性的作用。随着FC交换网络的高速发展,越来越多的场景应用到FC交换网络。在一些传输数据种类复杂且工作环境较为恶劣的应用场景下,要求数据传输具备高可靠性、高稳定性。As the core device in the FC network, FC switches play a decisive role in the data exchange of the entire FC network. With the rapid development of FC switching networks, more and more scenarios are applied to FC switching networks. In some application scenarios where the types of transmitted data are complex and the working environment is harsh, data transmission is required to be highly reliable and stable.

传统双冗余交换网络中,若某节点与其中一个交换机间的通信链路断开,而另一个节点与另一个交换机间的通信链路也断开,那么这两个节点将无法进行通信。相关技术中,通过设置备用交换机来解决通讯链路中断的问题,但是使用备用交换机会导致更高的使用和维护成本。In a traditional dual-redundant switching network, if the communication link between a node and one of the switches is disconnected, and the communication link between another node and another switch is also disconnected, the two nodes will be unable to communicate. In the related technology, the problem of communication link interruption is solved by setting up a backup switch. However, using the backup switch will lead to higher usage and maintenance costs.

发明内容Contents of the invention

基于此,有必要针对上述技术问题,提供一种能够低成本完成双冗余通信的基于端口路由管理的双冗余通信方法、装置、计算机设备和计算机可读存储介质。Based on this, it is necessary to address the above technical problems and provide a dual-redundant communication method, device, computer equipment and computer-readable storage medium based on port routing management that can complete dual-redundant communication at low cost.

第一方面,本申请提供了一种基于端口路由管理的双冗余通信方法,所述方法用于当前交换机;所述方法包括:In the first aspect, this application provides a dual-redundant communication method based on port routing management, which method is used in current switches; the method includes:

接收待传输信息,其中,所述待传输信息中携带目的地址;Receive information to be transmitted, wherein the information to be transmitted carries a destination address;

检查所述当前交换机与所述目的地址对应的节点的连通情况;Check the connectivity between the current switch and the node corresponding to the destination address;

在所述当前交换机与所述目的地址对应的节点不连通的情况下,查询与所述目的地址对应的节点相连通的目标交换机;When the current switch is not connected to the node corresponding to the destination address, query the target switch connected to the node corresponding to the destination address;

将所述待传输信息发送至所述目标交换机,以指示所述目标交换机将所述待传输信息转发至所述目的地址对应的节点。The information to be transmitted is sent to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

在其中一个实施例中,所述当前交换机和多个候选交换机之间存在状态监控接口,所述状态监控接口用于持续监控所述候选交换机与多个候选节点的连通状态;所述查询与所述目的地址对应的节点相连通的目标交换机包括:In one embodiment, a status monitoring interface exists between the current switch and multiple candidate switches, and the status monitoring interface is used to continuously monitor the connectivity status of the candidate switch and multiple candidate nodes; the query is related to the The destination switches connected to the node corresponding to the destination address include:

根据所述目的地址确定目标节点;Determine the target node according to the destination address;

通过所述状态监控接口获取多个所述候选交换机与所述目标节点的连通状态;Obtain the connectivity status of multiple candidate switches and the target node through the status monitoring interface;

根据所述连通状态,在多个所述候选交换机中选取一个目标交换机。Select a target switch from a plurality of candidate switches according to the connectivity status.

在其中一个实施例中,所述当前交换机包括多个备选通信接口;所述将所述待传输信息发送至所述目标交换机,以指示所述目标交换机将所述待传输信息转发至所述目的地址对应的节点包括:In one embodiment, the current switch includes a plurality of alternative communication interfaces; the sending of the information to be transmitted to the target switch instructs the target switch to forward the information to be transmitted to the The nodes corresponding to the destination address include:

根据所述目标交换机,从多个所述备选通信接口中任意选取一个作为冗余通信接口,其中,所述冗余通信接口与所述目标交换机相连通;According to the target switch, any one of the plurality of candidate communication interfaces is selected as a redundant communication interface, wherein the redundant communication interface is connected to the target switch;

将所述待传输信息通过所述冗余通信接口发送至所述目标交换机,以指示所述目标交换机将所述待传输信息转发至所述目的地址对应的节点。The information to be transmitted is sent to the target switch through the redundant communication interface to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

在其中一个实施例中,所述接收待传输信息之后,还包括:In one embodiment, after receiving the information to be transmitted, the method further includes:

判断所述待传输信息是否来自所述冗余通信接口;Determine whether the information to be transmitted comes from the redundant communication interface;

在所述待传输信息不是来自所述冗余通信接口的情况下,执行所述检查当前交换机与所述目的地址对应的节点的连通情况的步骤。When the information to be transmitted does not come from the redundant communication interface, the step of checking the connectivity between the current switch and the node corresponding to the destination address is performed.

在其中一个实施例中,判断所述待传输信息是否来自所述冗余通信接口之后,还包括:In one embodiment, after determining whether the information to be transmitted comes from the redundant communication interface, the method further includes:

在所述待传输信息是来自所述冗余通信接口的情况下,根据所述目的地址进行路由查询,以获得目标节点;When the information to be transmitted comes from the redundant communication interface, perform a routing query according to the destination address to obtain the target node;

将所述待传输信息发送至所述目标节点。Send the information to be transmitted to the target node.

在其中一个实施例中,所述待传输信息是光纤通道FC帧。In one embodiment, the information to be transmitted is a Fiber Channel FC frame.

在其中一个实施例中,所述检查当前交换机与所述目的地址对应的节点的连通情况包括:In one embodiment, checking the connectivity between the current switch and the node corresponding to the destination address includes:

提取所述FC帧的帧头信息,以获得目的地址;Extract the frame header information of the FC frame to obtain the destination address;

根据所述目的地址进行路由查询,以获得目标节点;Perform routing query according to the destination address to obtain the target node;

检查当前交换机与所述目标节点相连通的接口是否处于工作状态,以获得连通情况。Check whether the interface connecting the current switch to the target node is in working state to obtain the connectivity status.

第二方面,本申请还提供了一种基于端口路由管理的双冗余通信装置,所述装置用于当前交换机;所述装置包括:In a second aspect, this application also provides a dual-redundant communication device based on port routing management. The device is used in current switches; the device includes:

信息接收模块,用于接收待传输信息,其中,所述待传输信息中携带目的地址;An information receiving module, configured to receive information to be transmitted, where the information to be transmitted carries a destination address;

连通性校验模块,用于检查所述当前交换机与所述目的地址对应的节点的连通情况;A connectivity check module, used to check the connectivity between the current switch and the node corresponding to the destination address;

冗余查询模块,用于在所述当前交换机与所述目的地址对应的节点不连通的情况下,查询与所述目的地址对应的节点相连通的目标交换机;A redundant query module, configured to query the target switch connected to the node corresponding to the destination address when the current switch is not connected to the node corresponding to the destination address;

信息转发模块,用于将所述待传输信息发送至所述目标交换机,以指示所述目标交换机将所述待传输信息转发至所述目的地址对应的节点。An information forwarding module is configured to send the information to be transmitted to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

第三方面,本申请还提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, this application also provides a computer device, including a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the following steps:

接收待传输信息,其中,所述待传输信息中携带目的地址;Receive information to be transmitted, wherein the information to be transmitted carries a destination address;

检查所述当前交换机与所述目的地址对应的节点的连通情况;Check the connectivity between the current switch and the node corresponding to the destination address;

在所述当前交换机与所述目的地址对应的节点不连通的情况下,查询与所述目的地址对应的节点相连通的目标交换机;When the current switch is not connected to the node corresponding to the destination address, query the target switch connected to the node corresponding to the destination address;

将所述待传输信息发送至所述目标交换机,以指示所述目标交换机将所述待传输信息转发至所述目的地址对应的节点。The information to be transmitted is sent to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

第四方面,本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, the application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

接收待传输信息,其中,所述待传输信息中携带目的地址;Receive information to be transmitted, wherein the information to be transmitted carries a destination address;

检查所述当前交换机与所述目的地址对应的节点的连通情况;Check the connectivity between the current switch and the node corresponding to the destination address;

在所述当前交换机与所述目的地址对应的节点不连通的情况下,查询与所述目的地址对应的节点相连通的目标交换机;When the current switch is not connected to the node corresponding to the destination address, query the target switch connected to the node corresponding to the destination address;

将所述待传输信息发送至所述目标交换机,以指示所述目标交换机将所述待传输信息转发至所述目的地址对应的节点。The information to be transmitted is sent to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

上述基于端口路由管理的双冗余通信方法、装置、计算机设备和存储介质,通过对待传输信息中的目的地址进行识别和分析,来检查当前交换机与目的地址对应的节点的连通情况,从而判断当前的通讯链路是否处于正常工作状态。在当前交换机与目的地址对应的节点不连通的情况下,通过查询与目的地址对应的节点相连通的目标交换机,能够得出可供选择的通讯链路,再根据查询结果将待传输信息发送至目标交换机,即可指示目标交换机将待传输信息转发至目的地址对应的节点。在当前交换机通讯链路发生故障等问题的情况下,能够通过查询可供连通的链路从而使得待传输信息由目标交换机进行转发,顺利完成信息发送。其中,当前交换机与目标交换机均处于正常工作状态,而不存在备用交换机的设置,只有当当前交换机发生故障,致使检查结果显示为不连通的情况下,才会查找能够转发待传输信息的目标交换机,进而建立新的信息转发链路。因此,只需要在多个交换机的网络中进行部署即可完成故障状态下的冗余通信,无需预先设置冗余交换机,既能够顺利完成信息转发,又降低了使用和维护的成本。The above-mentioned dual-redundant communication method, device, computer equipment and storage medium based on port routing management check the connectivity status of the current switch and the node corresponding to the destination address by identifying and analyzing the destination address in the information to be transmitted, thereby determining the current Whether the communication link is in normal working condition. When the current switch is not connected to the node corresponding to the destination address, alternative communication links can be obtained by querying the target switch connected to the node corresponding to the destination address, and then the information to be transmitted is sent to The target switch can instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address. In the case of problems such as a failure of the current switch communication link, the information to be transmitted can be forwarded by the target switch by querying available links, and the information transmission can be successfully completed. Among them, the current switch and the target switch are both in normal working status, and there is no backup switch setting. Only when the current switch fails and the check result shows that it is not connected, the target switch that can forward the information to be transmitted will be found. , and then establish a new information forwarding link. Therefore, it only needs to be deployed in a network of multiple switches to complete redundant communication under fault conditions. There is no need to set up redundant switches in advance. This can not only successfully complete information forwarding, but also reduce the cost of use and maintenance.

附图说明Description of drawings

为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present application or related technologies, the drawings needed to be used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings in the following description are only for the purpose of describing the embodiments or related technologies. For some embodiments of the application, those of ordinary skill in the art can also obtain other drawings based on these drawings without exerting creative efforts.

图1为一个实施例中一种基于端口路由管理的双冗余通信方法的应用环境图;Figure 1 is an application environment diagram of a dual-redundant communication method based on port routing management in one embodiment;

图2为一个实施例中一种基于端口路由管理的双冗余通信方法的流程示意图;Figure 2 is a schematic flow chart of a dual-redundant communication method based on port routing management in one embodiment;

图3为一个实施例的基于端口路由管理的双冗余通信方法中步骤S206的流程示意图;Figure 3 is a schematic flowchart of step S206 in the dual redundant communication method based on port routing management according to one embodiment;

图4为一个实施例中一种基于端口路由管理的双冗余通信装置的结构框图;Figure 4 is a structural block diagram of a dual redundant communication device based on port routing management in one embodiment;

图5为一个实施例中计算机设备的内部结构图;Figure 5 is an internal structure diagram of a computer device in one embodiment;

图6为另一个实施例中计算机设备的内部结构图。Figure 6 is an internal structure diagram of a computer device in another embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.

本申请实施例提供的一种基于端口路由管理的双冗余通信方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信,终端102可以作为发送节点,也可以作为接收节点,服务器104可以部署在一个交换机上,也可以部署在控制多个交换机组成的交换机网络的控制系统上。数据存储系统可以存储服务器104需要处理的数据。数据存储系统可以集成在服务器104上,也可以放在云上或其他网络服务器上。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The dual-redundant communication method based on port routing management provided by the embodiment of the present application can be applied in the application environment as shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 can be used as a sending node or a receiving node. The server 104 can be deployed on a switch or on a control system that controls a switch network composed of multiple switches. . The data storage system may store data that server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. . Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as an independent server or a server cluster composed of multiple servers.

在一个示例性的实施例中,如图2所示,提供了一种基于端口路由管理的双冗余通信方法,以该方法应用于图1中的服务器104,当前为例进行说明,且服务器104部署当前交换机上,其中,当前交换机存在于包括多个交换机的交换机集群中。上述方法包括以下步骤S202至步骤S208。其中:In an exemplary embodiment, as shown in Figure 2, a dual-redundant communication method based on port routing management is provided. This method is applied to the server 104 in Figure 1. The current example is used for illustration, and the server 104 Deploy on the current switch, where the current switch exists in a switch cluster including multiple switches. The above method includes the following steps S202 to S208. in:

步骤S202,接收待传输信息。Step S202: Receive information to be transmitted.

其中,待传输信息是来自发送节点的信息,其中携带目的地址。The information to be transmitted is information from the sending node, which carries the destination address.

示例性地,待传输信息可以是光纤通道的FC帧。在光纤通道(Fibre Channel,FC)中,FC帧指的是光纤通道协议中的帧(Frame)。光纤通道是一种高性能、高速率的网络技术,主要用于存储区域网络和其他需要高性能数据传输的应用。在光纤通道中,数据被分割为帧进行传输。每个帧包含控制信息、数据和用于错误检测的校验字段。光纤通道协议定义了帧的结构和如何进行数据传输。进一步地,FC帧的一般结构包括帧头信息、帧控制信息、数据负载以及校验字段。For example, the information to be transmitted may be an FC frame of a fiber channel. In Fiber Channel (FC), FC frame refers to the frame (Frame) in the Fiber Channel protocol. Fiber Channel is a high-performance, high-speed network technology mainly used for storage area networks and other applications that require high-performance data transmission. In Fiber Channel, data is divided into frames for transmission. Each frame contains control information, data, and parity fields for error detection. The Fiber Channel protocol defines the structure of frames and how data is transmitted. Further, the general structure of an FC frame includes frame header information, frame control information, data load and check fields.

步骤S204,检查当前交换机与目的地址对应的节点的连通情况。Step S204: Check the connectivity between the current switch and the node corresponding to the destination address.

其中,目的地址对应的节点是数据接收节点。Among them, the node corresponding to the destination address is the data receiving node.

示例性地,在当前交换机处于正常工作状态且未发生故障的情况下,上述待传输信息应当由发送节点发出,经由当前交换机直接发送至目标地址对应的节点,也即数据接收节点,服务器104可以通过检查与目的地址对应节点相连通的发送端口是否处于正常工作状态,来获得检查结果。进一步地,服务器104可以提取FC帧的帧头信息,以获得目的地址,再根据目的地址进行路由查询,以获得目标节点,检查当前交换机与目标节点相连通的接口是否处于工作状态,以获得连通情况。For example, when the current switch is in normal working condition and no fault occurs, the above information to be transmitted should be sent by the sending node and directly sent to the node corresponding to the target address via the current switch, that is, the data receiving node. The server 104 can The check result is obtained by checking whether the sending port connected to the node corresponding to the destination address is in normal working condition. Further, the server 104 can extract the frame header information of the FC frame to obtain the destination address, and then perform routing query according to the destination address to obtain the target node, and check whether the interface connecting the current switch and the target node is in working state to obtain connectivity. Condition.

步骤S206,在当前交换机与目的地址对应的节点不连通的情况下,查询与目的地址对应的节点相连通的目标交换机。Step S206: If the current switch is not connected to the node corresponding to the destination address, query the target switch connected to the node corresponding to the destination address.

示例性地,服务器104可以持续对多个交换机进行监控,持续周期性获取来自多个交换机端口工作状态信息,其中,端口工作状态信息用于表征交换机与各节点之间通信端口的工作状态。在当前交换机与目的地址对应的节点不连通的情况下,服务器104可以根据历史获取到的交换机端口工作状态信息查询与目的地址对应的节点相连通的目标交换机。另外,服务器104还可以在当前交换机与目的地址对应的节点不连通的情况下,临时获取端口工作状态信息,进而查询与目的地址对应的节点相连通的目标交换机。For example, the server 104 can continuously monitor multiple switches and continue to periodically obtain port working status information from multiple switches, where the port working status information is used to characterize the working status of the communication ports between the switch and each node. When the current switch is not connected to the node corresponding to the destination address, the server 104 may query the target switch connected to the node corresponding to the destination address based on the switch port working status information obtained in history. In addition, the server 104 can also temporarily obtain the port working status information when the current switch is not connected to the node corresponding to the destination address, and then query the target switch connected to the node corresponding to the destination address.

步骤S208,将待传输信息发送至目标交换机,以指示目标交换机将待传输信息转发至目的地址对应的节点。Step S208: Send the information to be transmitted to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

示例性地,服务器104可以将待传输信息发送至目标交换机,此时,目标交换机仍处于正常工作状态,当目标交换机接收到当前交换机发送的待传输信息后,同样会先对待传输信息中的目的地址进行识别,并根据目的地址将待传输信息发送至目的地址对应的节点。For example, the server 104 can send the information to be transmitted to the target switch. At this time, the target switch is still in normal working state. When the target switch receives the information to be transmitted sent by the current switch, it will also first treat the destination in the transmission information. Address is identified, and the information to be transmitted is sent to the node corresponding to the destination address according to the destination address.

上述基于端口路由管理的双冗余通信方法中,通过对待传输信息中的目的地址进行识别和分析,来检查当前交换机与目的地址对应的节点的连通情况,从而判断当前的通讯链路是否处于正常工作状态。在当前交换机与目的地址对应的节点不连通的情况下,通过查询与目的地址对应的节点相连通的目标交换机,能够得出可供选择的通讯链路,再根据查询结果将待传输信息发送至目标交换机,即可指示目标交换机将待传输信息转发至目的地址对应的节点。在当前交换机通讯链路发生故障等问题的情况下,能够通过查询可供连通的链路从而使得待传输信息由目标交换机进行转发,顺利完成信息发送。其中,当前交换机与目标交换机均处于正常工作状态,而不存在备用交换机的设置,只有当当前交换机发生故障,致使检查结果显示为不连通的情况下,才会查找能够转发待传输信息的目标交换机,进而建立新的信息转发链路。因此,只需要在多个交换机的网络中进行部署即可完成故障状态下的冗余通信,无需预先设置冗余交换机,既能够顺利完成信息转发,又降低了使用和维护的成本。In the above-mentioned dual-redundant communication method based on port routing management, the connection status of the current switch and the node corresponding to the destination address is checked by identifying and analyzing the destination address in the information to be transmitted, thereby determining whether the current communication link is normal. working status. When the current switch is not connected to the node corresponding to the destination address, alternative communication links can be obtained by querying the target switch connected to the node corresponding to the destination address, and then the information to be transmitted is sent to The target switch can instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address. In the case of problems such as a failure of the current switch communication link, the information to be transmitted can be forwarded by the target switch by querying available links, and the information transmission can be successfully completed. Among them, the current switch and the target switch are both in normal working status, and there is no backup switch setting. Only when the current switch fails and the check result shows that it is not connected, the target switch that can forward the information to be transmitted will be found. , and then establish a new information forwarding link. Therefore, it only needs to be deployed in a network of multiple switches to complete redundant communication in a fault state. There is no need to set up redundant switches in advance. This can not only successfully complete information forwarding, but also reduce the cost of use and maintenance.

在一个示例性的实施例中,如图3所示,步骤S206包括步骤S302至步骤S306。其中:In an exemplary embodiment, as shown in Figure 3, step S206 includes steps S302 to step S306. in:

步骤S302,根据目的地址确定目标节点。Step S302: Determine the target node according to the destination address.

其中,目标节点是指目的地址指示的、接收待传输信息的接收节点。示例性地,服务器104可以调用预设的映射表,根据待传输信息中携带的目的地址查询目标节点。The target node refers to the receiving node indicated by the destination address that receives the information to be transmitted. For example, the server 104 can call a preset mapping table and query the target node according to the destination address carried in the information to be transmitted.

步骤S304,通过状态监控接口获取多个候选交换机与目标节点的连通状态。Step S304: Obtain the connectivity status of multiple candidate switches and the target node through the status monitoring interface.

在包括多个交换机的通信网络中,当前交换机和多个候选交换机之间存在状态监控接口,状态监控接口用于持续监控候选交换机与多个候选节点的连通状态。示例性地,服务器104可以根据状态监控接口返回的、表征候选交换机与多个候选节点连通状态的信息,获知任何一个候选交换机能否代替当前交换机进行信息的转发。In a communication network including multiple switches, a status monitoring interface exists between the current switch and multiple candidate switches. The status monitoring interface is used to continuously monitor the connectivity status between the candidate switch and multiple candidate nodes. For example, the server 104 can learn whether any candidate switch can replace the current switch in forwarding information based on the information returned by the status monitoring interface that represents the connectivity status between the candidate switch and multiple candidate nodes.

步骤S306,根据连通状态,在多个候选交换机中选取一个目标交换机。Step S306: Select a target switch from multiple candidate switches according to the connectivity status.

示例性地,服务器104在获取到多个候选交换机分别与多个候选节点的连通状态后,能够确定出哪一个候选交换机与目标节点是连通的,从而能够在多个候选交换机中选取出合适的交换机作为目标交换机,进而通过目标交换机完成待传输信息的转发。For example, after obtaining the connectivity status of multiple candidate switches and multiple candidate nodes respectively, the server 104 can determine which candidate switch is connected to the target node, so that the appropriate candidate switch can be selected from the multiple candidate switches. The switch serves as the target switch, and then completes the forwarding of the information to be transmitted through the target switch.

在一个示例性的实施例中,当前交换机包括多个备选通信接口,步骤S208包括:根据目标交换机,从多个备选通信接口中任意选取一个作为冗余通信接口,其中,冗余通信接口与目标交换机相连通;将待传输信息通过冗余通信接口发送至目标交换机,以指示目标交换机将待传输信息转发至目的地址对应的节点。In an exemplary embodiment, the current switch includes multiple alternative communication interfaces. Step S208 includes: arbitrarily selecting one of the multiple alternative communication interfaces as a redundant communication interface according to the target switch, where the redundant communication interface Connected to the target switch; sending the information to be transmitted to the target switch through the redundant communication interface to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

示例性地,服务器104可以在多个交换机同时处于正常工作状态的情况下,获取目标交换机的各个备选通信接口的工作状态,再利用目标交换机当前未处于工作状态的任意一个备选通信接口作为冗余通信接口,来接收来自当前交换机的待传输信息,将待传输信息通过冗余通信接口发送至目标交换机,即可指示目标交换机将待传输信息转发至目的地址对应的节点。For example, when multiple switches are in normal working state at the same time, the server 104 can obtain the working status of each alternative communication interface of the target switch, and then use any alternative communication interface of the target switch that is not currently in working status as the The redundant communication interface is used to receive the information to be transmitted from the current switch and send the information to be transmitted to the target switch through the redundant communication interface, which instructs the target switch to forward the information to be transmitted to the node corresponding to the destination address.

在一个示例性的实施例中,步骤S202之后还包括判断待传输信息是否来自冗余通信接口。In an exemplary embodiment, step S202 also includes determining whether the information to be transmitted comes from a redundant communication interface.

示例性地,在待传输信息不是来自冗余通信接口的情况下,可以认为当前交换机接收的是来自发送节点的待传输信息,当前交换机存在无法与目的地址对应的节点相连通的可能性,因此,需要通过上述步骤判断是否需要将的待传输信息转发至目标交换机;反之,在待传输信息不是来自冗余通信接口的情况下,可以认为当前交换机接收的是来自其他交换机的待传输信息,由于前序步骤中,发出该待传输信息的交换机已经完成了上述判断过程,当前交换机只需要将待传输信息发送至目的地址对应的节点即可。For example, when the information to be transmitted does not come from the redundant communication interface, it can be considered that the current switch receives the information to be transmitted from the sending node, and there is a possibility that the current switch cannot connect with the node corresponding to the destination address. Therefore, , it is necessary to judge whether the information to be transmitted needs to be forwarded to the target switch through the above steps; conversely, when the information to be transmitted does not come from the redundant communication interface, it can be considered that the current switch receives the information to be transmitted from other switches, because In the preamble step, the switch that sends the information to be transmitted has completed the above judgment process. The current switch only needs to send the information to be transmitted to the node corresponding to the destination address.

示例性地,服务器104获取判断结果后,可以在待传输信息不是来自冗余通信接口的情况下,执行检查当前交换机与目的地址对应的节点的连通情况的步骤;可以在待传输信息是来自冗余通信接口的情况下,根据目的地址进行路由查询,以获得目标节点;将待传输信息发送至目标节点。For example, after obtaining the judgment result, the server 104 can perform the step of checking the connectivity between the current switch and the node corresponding to the destination address when the information to be transmitted does not come from the redundant communication interface; In the case of other communication interfaces, routing query is performed based on the destination address to obtain the target node; the information to be transmitted is sent to the target node.

在另一个实施例中,服务器104部署在交换机网络中的每一个交换机上,且交换机网络中包括多个交换机,每两个交换机之间均存在冗余通信接口和状态监控接口,其中,冗余通信接口是交换机多个备选通信接口中的任意一个。In another embodiment, the server 104 is deployed on each switch in the switch network, and the switch network includes multiple switches, and there are redundant communication interfaces and status monitoring interfaces between each two switches, where the redundant A communication interface is any one of multiple alternative communication interfaces on the switch.

当一个交换机接收到来自终端102的发送节点的待传输信息后,当前交换机的服务器104对待传输信息中的目的地址进行解析,并判断当前交换机上用于与目的地址对应的节点相连通的接口是否处于正常工作状态,在该接口正常工作的情况下,服务器104直接将待传输信息通过待接口发送至目的地址即可;若该接口未处于正常工作状态,则服务器104通过状态监控接口获取网络中其他的候选交换机与目的地址对应的节点的连通情况,从而选取出符合要求的目标交换机,并选取当前时刻目标交换机未处于工作状态的备选通信接口作为冗余通信接口,从而将待传输信息通过冗余通信接口发送至目标交换机。When a switch receives the information to be transmitted from the sending node of the terminal 102, the server 104 of the current switch parses the destination address in the information to be transmitted, and determines whether the interface on the current switch is used to connect to the node corresponding to the destination address. In the normal working state, when the interface is working normally, the server 104 can directly send the information to be transmitted to the destination address through the waiting interface; if the interface is not in the normal working state, the server 104 obtains the information in the network through the status monitoring interface. The connectivity between other candidate switches and the node corresponding to the destination address is determined, thereby selecting a target switch that meets the requirements, and selecting an alternative communication interface that is not working on the target switch at the current moment as a redundant communication interface, so that the information to be transmitted is passed through The redundant communication interface is sent to the target switch.

当目标交换机接收到来自冗余通信接口的待传输信息后,将会对待传输信息中的目的地址进行识别和解析,从而获取待传输信息对应的目标节点,将待传输信息发送至目标节点,以完成待传输信息的顺利发送。When the target switch receives the information to be transmitted from the redundant communication interface, it will identify and parse the destination address in the information to be transmitted, thereby obtaining the target node corresponding to the information to be transmitted, and send the information to be transmitted to the target node. Complete the smooth sending of the information to be transmitted.

应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts involved in the above-mentioned embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this article, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments may include multiple steps or stages. These steps or stages are not necessarily executed at the same time, but may be completed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的基于端口路由管理的双冗余通信方法的基于端口路由管理的双冗余通信装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个基于端口路由管理的双冗余通信装置实施例中的具体限定可以参见上文中对于基于端口路由管理的双冗余通信方法的限定,在此不再赘述。Based on the same inventive concept, embodiments of the present application also provide a dual-redundant communication device based on port routing management for implementing the above-mentioned dual-redundant communication method based on port routing management. The solution to the problem provided by this device is similar to the solution recorded in the above method. Therefore, the specific limitations in the embodiments of one or more dual redundant communication devices based on port routing management provided below can be found above. The limitations of the dual redundant communication method based on port routing management will not be described again here.

在一个示例性的实施例中,如图4所示,提供了一种基于端口路由管理的双冗余通信装置,用于当前交换机;包括:信息接收模块402、连通性校验模块404、冗余查询模块406和信息转发模块408,其中:In an exemplary embodiment, as shown in Figure 4, a dual-redundant communication device based on port routing management is provided for current switches; it includes: an information receiving module 402, a connectivity check module 404, a redundant communication device, and a redundant communication device. The rest query module 406 and the information forwarding module 408, among which:

信息接收模块402,用于接收待传输信息,其中,待传输信息中携带目的地址;The information receiving module 402 is used to receive information to be transmitted, where the information to be transmitted carries the destination address;

连通性校验模块404,用于检查当前交换机与目的地址对应的节点的连通情况;The connectivity check module 404 is used to check the connectivity between the current switch and the node corresponding to the destination address;

冗余查询模块406,用于在当前交换机与目的地址对应的节点不连通的情况下,查询与目的地址对应的节点相连通的目标交换机;The redundancy query module 406 is used to query the target switch connected to the node corresponding to the destination address when the current switch is not connected to the node corresponding to the destination address;

信息转发模块408,用于将待传输信息发送至目标交换机,以指示目标交换机将待传输信息转发至目的地址对应的节点。The information forwarding module 408 is used to send the information to be transmitted to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

在其中一个实施例中,当前交换机和多个候选交换机之间存在状态监控接口,状态监控接口用于持续监控候选交换机与多个候选节点的连通状态;冗余查询模块406包括:In one embodiment, there is a status monitoring interface between the current switch and multiple candidate switches. The status monitoring interface is used to continuously monitor the connectivity status between the candidate switch and multiple candidate nodes; the redundancy query module 406 includes:

节点确定单元,用于根据目的地址确定目标节点;The node determination unit is used to determine the target node according to the destination address;

状态确定单元,用于通过状态监控接口获取多个候选交换机与目标节点的连通状态;The status determination unit is used to obtain the connectivity status of multiple candidate switches and the target node through the status monitoring interface;

交换机选取单元,用于根据连通状态,在多个候选交换机中选取一个目标交换机。The switch selection unit is used to select a target switch among multiple candidate switches based on the connectivity status.

在其中一个实施例中,当前交换机包括多个备选通信接口;信息转发模块408包括:In one embodiment, the current switch includes multiple alternative communication interfaces; the information forwarding module 408 includes:

接口选取单元,用于根据目标交换机,从多个备选通信接口中任意选取一个作为冗余通信接口,其中,冗余通信接口与目标交换机相连通;An interface selection unit is used to select one of multiple alternative communication interfaces as a redundant communication interface according to the target switch, where the redundant communication interface is connected to the target switch;

信息转发单元,用于将待传输信息通过冗余通信接口发送至目标交换机,以指示目标交换机将待传输信息转发至目的地址对应的节点。The information forwarding unit is used to send the information to be transmitted to the target switch through the redundant communication interface to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

在其中一个实施例中,装置还包括:In one embodiment, the device further includes:

接口判断模块,用于判断待传输信息是否来自冗余通信接口;The interface judgment module is used to judge whether the information to be transmitted comes from the redundant communication interface;

初始信息接收模块,用于在待传输信息不是来自冗余通信接口的情况下,执行检查当前交换机与目的地址对应的节点的连通情况的步骤。The initial information receiving module is used to perform the step of checking the connectivity between the current switch and the node corresponding to the destination address when the information to be transmitted does not come from the redundant communication interface.

在其中一个实施例中,判断待传输信息是否来自冗余通信接口之后,还包括:In one of the embodiments, after determining whether the information to be transmitted comes from the redundant communication interface, the method further includes:

冗余信息接收模块,用于在待传输信息是来自冗余通信接口的情况下,根据目的地址进行路由查询,以获得目标节点;The redundant information receiving module is used to perform routing queries based on the destination address to obtain the target node when the information to be transmitted comes from the redundant communication interface;

信息发送模块,用于将待传输信息发送至目标节点。The information sending module is used to send the information to be transmitted to the target node.

在其中一个实施例中,待传输信息是光纤通道FC帧。In one embodiment, the information to be transmitted is Fiber Channel FC frames.

在其中一个实施例中,连通性校验模块404包括:In one embodiment, the connectivity check module 404 includes:

信息提取单元,用于提取FC帧的帧头信息,以获得目的地址;The information extraction unit is used to extract the frame header information of the FC frame to obtain the destination address;

路由查询单元,用于根据目的地址进行路由查询,以获得目标节点;The routing query unit is used to perform routing query based on the destination address to obtain the target node;

结果输出单元,用于检查当前交换机与目标节点相连通的接口是否处于工作状态,以获得连通情况。The result output unit is used to check whether the interface connecting the current switch and the target node is in working state to obtain the connectivity status.

上述基于端口路由管理的双冗余通信装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned dual redundant communication device based on port routing management can be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor of the computer device in the form of hardware, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

在一个示例性的实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图5所示。该计算机设备包括处理器、存储器、输入/输出接口(Input/Output,简称I/O)和通信接口。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储交换机网络中各个交换机的接口和终端节点之间的映射数据。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于端口路由管理的双冗余通信方法。In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be shown in Figure 5 . The computer device includes a processor, a memory, an input/output interface (Input/Output, referred to as I/O), and a communication interface. Among them, the processor, memory and input/output interface are connected through the system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile storage media and internal memory. The non-volatile storage medium stores operating systems, computer programs and databases. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media. The computer device's database is used to store mapping data between interfaces and end nodes of various switches in the switch network. The input/output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by a processor, implements a dual redundant communication method based on port routing management.

在一个示例性的实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图6所示。该计算机设备包括处理器、存储器、输入/输出接口、通信接口、显示单元和输入装置。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口、显示单元和输入装置通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种基于端口路由管理的双冗余通信方法。In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 6 . The computer device includes a processor, memory, input/output interface, communication interface, display unit and input device. Among them, the processor, memory and input/output interface are connected through the system bus, and the communication interface, display unit and input device are connected to the system bus through the input/output interface. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile storage media and internal memory. The non-volatile storage medium stores operating systems and computer programs. This internal memory provides an environment for the execution of operating systems and computer programs in non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used for wired or wireless communication with external terminals. The wireless mode can be implemented through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program, when executed by a processor, implements a dual redundant communication method based on port routing management.

本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 6 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Specific computer equipment can May include more or fewer parts than shown, or combine certain parts, or have a different arrangement of parts.

在一个示例性的实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:接收待传输信息,其中,待传输信息中携带目的地址;检查当前交换机与目的地址对应的节点的连通情况;在当前交换机与目的地址对应的节点不连通的情况下,查询与目的地址对应的节点相连通的目标交换机;将待传输信息发送至目标交换机,以指示目标交换机将待传输信息转发至目的地址对应的节点。In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements the following steps: receiving information to be transmitted, wherein the information to be transmitted is The destination address is carried in the Sent to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:根据目的地址确定目标节点;通过状态监控接口获取多个候选交换机与目标节点的连通状态;根据连通状态,在多个候选交换机中选取一个目标交换机。In one embodiment, when the processor executes the computer program, the following steps are also implemented: determine the target node according to the destination address; obtain the connectivity status of multiple candidate switches and the target node through the status monitoring interface; based on the connectivity status, among the multiple candidate switches, Select a target switch.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:判断待传输信息是否来自冗余通信接口;在待传输信息不是来自冗余通信接口的情况下,执行检查当前交换机与目的地址对应的节点的连通情况的步骤。In one embodiment, when the processor executes the computer program, it also implements the following steps: determine whether the information to be transmitted comes from the redundant communication interface; if the information to be transmitted does not come from the redundant communication interface, perform a check that the current switch corresponds to the destination address The steps of node connectivity.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:在待传输信息是来自冗余通信接口的情况下,根据目的地址进行路由查询,以获得目标节点;将待传输信息发送至目标节点。In one embodiment, the processor also implements the following steps when executing the computer program: when the information to be transmitted comes from the redundant communication interface, perform a routing query according to the destination address to obtain the target node; send the information to be transmitted to the target node.

在一个实施例中,处理器执行计算机程序时还实现以下步骤:提取FC帧的帧头信息,以获得目的地址;根据目的地址进行路由查询,以获得目标节点;检查当前交换机与目标节点相连通的接口是否处于工作状态,以获得连通情况。In one embodiment, when the processor executes the computer program, it also implements the following steps: extracting the frame header information of the FC frame to obtain the destination address; performing a routing query based on the destination address to obtain the target node; and checking that the current switch is connected to the target node. Whether the interface is in working status to obtain the connectivity status.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:接收待传输信息,其中,待传输信息中携带目的地址;检查当前交换机与目的地址对应的节点的连通情况;在当前交换机与目的地址对应的节点不连通的情况下,查询与目的地址对应的节点相连通的目标交换机;将待传输信息发送至目标交换机,以指示目标交换机将待传输信息转发至目的地址对应的节点。In one embodiment, a computer-readable storage medium is provided, with a computer program stored thereon. When the computer program is executed by a processor, the following steps are implemented: receiving information to be transmitted, wherein the information to be transmitted carries a destination address; checking The connectivity between the current switch and the node corresponding to the destination address; when the current switch is not connected to the node corresponding to the destination address, query the destination switch connected to the node corresponding to the destination address; send the information to be transmitted to the destination switch to Instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:根据目的地址确定目标节点;通过状态监控接口获取多个候选交换机与目标节点的连通状态;根据连通状态,在多个候选交换机中选取一个目标交换机。In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determine the target node according to the destination address; obtain the connectivity status of multiple candidate switches and the target node through the status monitoring interface; Select a target switch.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:判断待传输信息是否来自冗余通信接口;在待传输信息不是来自冗余通信接口的情况下,执行检查当前交换机与目的地址对应的节点的连通情况的步骤。In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determine whether the information to be transmitted comes from the redundant communication interface; if the information to be transmitted does not come from the redundant communication interface, perform a check of the current switch and the destination address The steps for the connectivity of the corresponding node.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:在待传输信息是来自冗余通信接口的情况下,根据目的地址进行路由查询,以获得目标节点;将待传输信息发送至目标节点。In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the information to be transmitted comes from the redundant communication interface, perform a routing query according to the destination address to obtain the target node; send the information to be transmitted to target node.

在一个实施例中,计算机程序被处理器执行时还实现以下步骤:提取FC帧的帧头信息,以获得目的地址;根据目的地址进行路由查询,以获得目标节点;检查当前交换机与目标节点相连通的接口是否处于工作状态,以获得连通情况。In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: extract the frame header information of the FC frame to obtain the destination address; perform routing query according to the destination address to obtain the target node; check that the current switch is connected to the target node Check whether the connected interface is in working status to obtain the connectivity status.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage. In the medium, when the computer program is executed, it may include the processes of the embodiments of the above methods. Any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random) Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene memory, etc. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration and not a limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include blockchain-based distributed databases, etc., but are not limited thereto. The processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to this.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined in any way. To simplify the description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, all possible combinations should be used. It is considered to be within the scope of this manual.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation modes of the present application, and their descriptions are relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all fall within the protection scope of the present application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims (10)

1. A dual redundancy communication method based on port routing management, characterized in that the method is used for a current switch; the method comprises the following steps:
receiving information to be transmitted, wherein the information to be transmitted carries a destination address;
checking the communication condition of the current switch and the node corresponding to the destination address;
under the condition that the current switch is not communicated with the node corresponding to the destination address, inquiring a target switch communicated with the node corresponding to the destination address;
and sending the information to be transmitted to the target switch to instruct the target switch to forward the information to be transmitted to a node corresponding to the destination address.
2. The method of claim 1, wherein a state monitoring interface exists between the current switch and the plurality of candidate switches, the state monitoring interface being configured to continuously monitor a connectivity state of the candidate switches with the plurality of candidate nodes; the target switch for inquiring the node which is communicated with the destination address comprises:
determining a target node according to the destination address;
acquiring the communication states of a plurality of candidate switches and the target node through the state monitoring interface;
and selecting a target switch from a plurality of candidate switches according to the communication state.
3. The method of claim 1, wherein the current switch comprises a plurality of alternate communication interfaces; the sending the information to be transmitted to the target switch to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address includes:
according to the target switch, any one of the plurality of alternative communication interfaces is selected as a redundant communication interface, wherein the redundant communication interface is communicated with the target switch;
and sending the information to be transmitted to the target switch through the redundant communication interface so as to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.
4. A method according to claim 3, wherein after receiving the information to be transmitted, further comprising:
judging whether the information to be transmitted comes from the redundant communication interface or not;
and executing the step of checking the communication condition of the current switch and the node corresponding to the destination address in the case that the information to be transmitted is not from the redundant communication interface.
5. The method of claim 4, further comprising, after determining whether the information to be transmitted is from the redundant communication interface:
if the information to be transmitted is from the redundant communication interface, carrying out routing query according to the destination address so as to obtain a target node;
and sending the information to be transmitted to the target node.
6. The method according to any of claims 1 to 5, wherein the information to be transmitted is fibre channel FC frames.
7. The method of claim 6, wherein the checking connectivity of the current switch with the node corresponding to the destination address comprises:
extracting frame header information of the FC frame to obtain a destination address;
performing routing query according to the destination address to obtain a target node;
and checking whether an interface of the current switch communicated with the target node is in a working state or not so as to obtain a communication condition.
8. A dual redundant communication device based on port routing management, wherein the device is used for a current switch; the device comprises:
the information receiving module is used for receiving information to be transmitted, wherein the information to be transmitted carries a destination address;
the connectivity verification module is used for checking the connectivity condition of the node corresponding to the destination address and the current switch;
the redundancy query module is used for querying a target switch communicated with a node corresponding to the destination address under the condition that the current switch is not communicated with the node corresponding to the destination address;
and the information forwarding module is used for sending the information to be transmitted to the target switch so as to instruct the target switch to forward the information to be transmitted to the node corresponding to the destination address.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311719194.6A 2023-12-14 2023-12-14 Dual redundant communication method, device and computer equipment based on port routing management Pending CN117675535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311719194.6A CN117675535A (en) 2023-12-14 2023-12-14 Dual redundant communication method, device and computer equipment based on port routing management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311719194.6A CN117675535A (en) 2023-12-14 2023-12-14 Dual redundant communication method, device and computer equipment based on port routing management

Publications (1)

Publication Number Publication Date
CN117675535A true CN117675535A (en) 2024-03-08

Family

ID=90086268

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311719194.6A Pending CN117675535A (en) 2023-12-14 2023-12-14 Dual redundant communication method, device and computer equipment based on port routing management

Country Status (1)

Country Link
CN (1) CN117675535A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040081087A1 (en) * 2002-09-09 2004-04-29 Shea Michael John Method, apparatus and program storage device for verifying existence of a redundant fibre channel path
CN1893338A (en) * 2005-06-28 2007-01-10 阿尔卡特公司 Communication path redundancy protection systems and methods
CN102171973A (en) * 2008-10-20 2011-08-31 国际商业机器公司 Redundant intermediary switch solution for detecting and managing fibre channel over Ethernet (FCOE) switch failures
US20130287389A1 (en) * 2012-04-25 2013-10-31 Siamack Ayandeh Fiber channel 1:n redundancy
CN105379201B (en) * 2014-05-09 2018-11-06 华为技术有限公司 Method, controller and the failover interchanger of path switching
CN110673799A (en) * 2019-09-26 2020-01-10 苏州浪潮智能科技有限公司 Cluster partnership establishment method, system, equipment and computer medium
CN111683021A (en) * 2020-07-17 2020-09-18 合肥国科天迅科技有限公司 Multi-protocol terminal with double-path redundant output for switch
CN112995041A (en) * 2021-04-21 2021-06-18 北京国科天迅科技有限公司 Network communication method, device, electronic equipment and storage medium
CN116614458A (en) * 2023-05-25 2023-08-18 浪潮思科网络科技有限公司 Information synchronization method, equipment and medium based on RoCE-SAN
CN116781648A (en) * 2023-07-14 2023-09-19 南京全信传输科技股份有限公司 High-stability redundant FC switch system based on FC protocol

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040081087A1 (en) * 2002-09-09 2004-04-29 Shea Michael John Method, apparatus and program storage device for verifying existence of a redundant fibre channel path
CN1893338A (en) * 2005-06-28 2007-01-10 阿尔卡特公司 Communication path redundancy protection systems and methods
CN102171973A (en) * 2008-10-20 2011-08-31 国际商业机器公司 Redundant intermediary switch solution for detecting and managing fibre channel over Ethernet (FCOE) switch failures
US20130287389A1 (en) * 2012-04-25 2013-10-31 Siamack Ayandeh Fiber channel 1:n redundancy
CN105379201B (en) * 2014-05-09 2018-11-06 华为技术有限公司 Method, controller and the failover interchanger of path switching
CN110673799A (en) * 2019-09-26 2020-01-10 苏州浪潮智能科技有限公司 Cluster partnership establishment method, system, equipment and computer medium
CN111683021A (en) * 2020-07-17 2020-09-18 合肥国科天迅科技有限公司 Multi-protocol terminal with double-path redundant output for switch
CN112995041A (en) * 2021-04-21 2021-06-18 北京国科天迅科技有限公司 Network communication method, device, electronic equipment and storage medium
CN116614458A (en) * 2023-05-25 2023-08-18 浪潮思科网络科技有限公司 Information synchronization method, equipment and medium based on RoCE-SAN
CN116781648A (en) * 2023-07-14 2023-09-19 南京全信传输科技股份有限公司 High-stability redundant FC switch system based on FC protocol

Similar Documents

Publication Publication Date Title
CN106059791B (en) A link switching method and storage device for services in a storage system
CN108173691B (en) Cross-device aggregation method and device
CN111049765B (en) Aggregation port switching method, device, chip, switch and storage medium
CN105262633A (en) Application-level disaster tolerant method and application-level disaster system
CN112583931A (en) Message processing method, message middleware, electronic device and storage medium
CN105162732A (en) Method and device for creating expansion port
EP3213441A1 (en) Redundancy for port extender chains
CN108337163B (en) Method and apparatus for aggregating links
CN117675535A (en) Dual redundant communication method, device and computer equipment based on port routing management
WO2024113894A1 (en) Method for establishing remote replication relationship and related apparatus
CN102868739A (en) Switching equipment applied to Internet protocol (IP) storage area network (SAN) cluster storage system
US11994992B2 (en) Takeover method and apparatus for cache partition recovery, device and readable medium
CN114785631B (en) Communication protocol stack multiplexing method, communication method, computer device and medium
CN114172841B (en) Message forwarding method and device, electronic equipment and read storage medium
CN116760745A (en) Network exception handling method, apparatus, device, storage medium and program product
CN112711466B (en) Hanging affair inspection method and device, electronic equipment and storage medium
CN115527564A (en) Storage device
CN101325558A (en) Method, device and system for sending data streams with multi-level and multi-plane structure
CN116208472B (en) Site switching method, device, computer equipment and storage medium
CN118764448B (en) Data transmission method, device, electronic device, storage medium and program product
CN118282851B (en) Configuration method, device and medium for sideband interface protocol of network controller
CN117354267A (en) Link failure processing method, device, equipment, storage medium and program product
CN108306773B (en) Network convergence method, device and computer storage medium
CN117555480A (en) Load balancing method and system based on separated roll-up wner
CN116232952A (en) Abnormality identification method and device for network topology and computer equipment

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