Link switching method, related device, and storage medium
By using a switching module (such as a Retimer) in the communication system to switch links between cable-connected nodes, the trigger data stream is directly changed to a request data stream, which solves the problem that optical cross-connect modules cannot switch, and achieves low-latency and high-reliability link switching.
Patent Information
- Application Number
- PCT/CN2025/081178
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-01
- Filing Date
- 2025-03-07
- Publication Date
- 2025-11-27
AI Technical Summary
In communication systems, when nodes are connected by cables, optical cross-connect modules cannot switch network topologies, resulting in long link switching delays.
A switching module (such as a Retimer) is used to switch links between nodes connected by cables. By receiving a switching instruction, the trigger data stream is changed to a request data stream, and the link is switched directly, avoiding the need to regenerate the data stream and reducing latency.
It effectively reduces the latency of link switching, improves the reliability and success rate of link switching, and ensures the transmission quality and reliability of business data streams.
Smart Images

Figure CN2025081178_27112025_PF_FP_ABST
Abstract
Description
Method, related device and storage medium for link switching
[0001] The present application claims priority from the Chinese patent application No. 202410390560.6 filed on April 1, 2024, and entitled "Method, related device and storage medium for link switching", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of communication technology, and in particular to a method for link switching, related device and storage medium. BACKGROUND
[0003] A communication system includes multiple nodes, and the networking topology between the nodes can be switched at any time as needed. For example, the communication system includes a first node and a second node, and the first node has a connection relationship with the second node. As the demand of the communication system changes, for example, the communication system can change the application scenario, or the communication system is expanded to improve the scale, and the connection relationship between the first node and the second node is switched to the connection relationship between the first node and a third node.
[0004] To realize the switching of the networking topology, the first node and the second node are connected with an optical cross module, and the optical cross module can cross-transmit the optical signal from the first node to the second node or the third node according to the networking topology. The optical cross module can be an optical circuit switch (OCS), an optical cross-connect (OXC), a reconfigurable optical add-drop multiplexer (ROADM), etc.
[0005] However, if different nodes included in the communication device are connected by cables, the optical cross module cannot switch the networking topology. SUMMARY
[0006] The embodiments of the present application provide a method for link switching, related device and storage medium, which can switch the link at any time as needed under the condition that different nodes are connected by cables, and effectively reduce the latency of link switching.
[0007] In a first aspect, an embodiment of the present application provides a link switching method, which is applied to a switching module. For example, the switching module can be any type of chip, module, device, component, single board, etc. connected between a first node and a third node and connected between a second node and a fourth node. The switching module includes a first port, a second port, a third port, and a fourth port. A first link of the switching module is in a conducting state, the first link includes the first port and the third port, the first port is connected to the first node, and the third port is connected to the third node. The method includes: the switching module receiving switching indication information. The switching module receives the switching indication information from a management node. The management node can be located on the same cabinet as the first node. Alternatively, the management node can be located on a different cabinet from the first node, and the specific implementation is not limited. Alternatively, the management node and the first node can be located on the same single board. Alternatively, the management node can be located in the first node. In this case, the management node can be a logical module or software included in the first node, or a component or device (such as a processor or a chip) of the first node. Alternatively, the management node can be a logical module, software, component, or device in the second node, the third node, or the fourth node. The switching indication information is used to conduct a second link, the second link includes the first port and the fourth port, and the fourth port is connected to the fourth node. The switching module receives a first trigger data stream from the third node through the third port. The switching module changes the first trigger data stream into a first request data stream according to the switching indication information, and sends the first request data stream to the first node through the first port. The first request data stream is used to request link switching. The switching module receives a second trigger data stream from the second node through the second port. The first trigger data stream and the second trigger data stream are both used to trigger link switching. The switching module changes the second trigger data stream into a second request data stream according to the switching indication information, and sends the second request data stream to the fourth node through the fourth port. The second request data stream is used to request link switching. The switching module disconnects the first link and conducts the second link.
[0008] According to the first aspect, the trigger data stream is transmitted between different node ports in a connected state through the switching module. For example, the third node continuously sends the trigger data stream to the first node through the switching module. For another example, the second node continuously sends the trigger data stream to the fourth node through the switching module. When the management node determines that link switching is needed, the management node sends the switching indication information for indicating the second link to the switching module. Then, the switching module directly changes the trigger data stream into the request data stream according to the switching indication information, and the request data stream is used to request the node ports to perform link switching, so that the switching module switches the first link between the first port and the third port to the second link between the first port and the fourth port. Since the request data stream is directly changed from the trigger data stream, the switching module or the node does not need to generate a new data stream for requesting switching, and the time delay of the switching module sending the request data stream to the node port is effectively reduced.
[0009] According to the first aspect, in an optional implementation, the switching module is a Retimer. The Retimer transmits the first trigger data stream and the service data stream from the third node through different channels. According to the implementation, the service data stream and the first trigger data stream are transmitted through different channels in the Retimer. According to the implementation, when the Retimer receives the service data stream from the first node, the second node, the third node or the fourth node, the Retimer can balance the service data stream through the service channel, increase the transmission energy of the service data stream through the internal clock reconstruction signal, compensate for the channel loss in the service data stream transmission process, eliminate signal jitter, and thus improve the transmission distance and the transmission quality of the service data stream. When the Retimer receives the trigger data stream, the Retimer changes the trigger data stream into the request data stream through the switching channel and according to the switching indication information, and sends the request data stream to the corresponding node. Moreover, according to the Retimer, the link between different node ports can be switched when the different nodes are connected through a cable, and the Retimer is used to switch the link, so that the time delay of the link switching is effectively reduced and the reliability of the link switching is improved.
[0010] In an optional implementation of the first aspect, after the switching module changes the first trigger data stream into a first request data stream according to the switching indication information, and sends the first request data stream to the first node through the first port, the method further includes: the switching module receives a first response data stream from the first node through the first port, the first response data stream being changed from the first request data stream, and the first response data stream being used to respond to the first request data stream; after the switching module changes the second trigger data stream into a second request data stream according to the switching indication information, and sends the second request data stream to the fourth node through the fourth port, the method further includes: the switching module receives a second response data stream from the fourth node through the fourth port, the second response data stream being changed from the second request data stream, and the second response data stream being used to respond to the second request data stream; and the switching module turns on the second link according to the first response data stream and the second response data stream.
[0011] According to the implementation, the switching module requests each node port whether to agree to perform link switching through a request data stream, and then switches the first link to the second link to turn on the second link after receiving a response data stream returned by each node port, thereby improving the reliability of link switching and ensuring the success rate of transmission of each service data stream in the state of turning on the second link.
[0012] In an optional implementation of the first aspect, before the switching module turns on the second link, the method further includes:
[0013] The switching module receives a third trigger data stream from the first node through the first port; the switching module changes the third trigger data stream into a third request data stream according to the switching indication information, and sends the third request data stream to the third node through the third port, the third request data stream being used to request link switching; and the switching module disconnects the first link according to the switching indication information. According to the implementation, the first link is disconnected to ensure the successful turning on of the second link.
[0014] In an optional implementation of the first aspect, after the switching module changes the first trigger data stream into a first request data stream and sends the first request data stream to the first node through the first port according to the switching indication information, the method further includes: receiving, by the switching module, a third response data stream from the third node through the third port, the third response data stream being changed from the third request data stream, and the third response data stream being used to respond to the third request data stream; and disconnecting, by the switching module, the first link according to the switching indication information, the first response data stream, and the third response data stream, wherein the first response data stream is a response data stream from the first node. With this implementation, the switching module requests each node port whether to agree to link switching through a request data stream, and the switching module disconnects the first link after receiving a response data stream returned by each node port, so as to ensure successful connection of the second link and improve the reliability of link switching.
[0015] In an optional implementation of the first aspect, before the switching module connects the second link, the method further includes: changing, by the switching module, the third response data stream into a negotiation data stream, and sending the negotiation data stream to the first node through the first port, the third response data stream being a response data stream from the third node; and after the switching module connects the second link, the method further includes: receiving, by the switching module, a negotiation response data stream from the first node through the first port, the negotiation response data stream being used to respond to the negotiation data stream; and sending, by the switching module, the negotiation response data stream to the fourth node through the fourth port. With this implementation, the first node and the fourth node transmit a negotiation data stream through the second link, so as to ensure reliable transmission of the switched second link.
[0016] In an optional implementation of the first aspect, the negotiation data stream is used to instruct the first node to interrupt transmission of a service data stream between the first node and the switching module. With this implementation, after the node receives the negotiation data stream, the node interrupts transmission of a service data stream between the node and the switching module, so as to avoid packet loss rate of the service data stream transmission and improve the reliability of the service data stream transmission.
[0017] In an optional implementation of the first aspect, the first trigger data stream, the first request data stream, the first response data stream, and the first negotiation data stream each include a switching state field, the first response data stream is changed from the first request data stream, the first negotiation data stream is changed from the first response data stream, and the switching state field has different values in the first trigger data stream, the first request data stream, the first response data stream, and the first negotiation data stream. The first response data stream is a response data stream from the first node, and the first negotiation data stream is a negotiation data stream sent to the third node. With this implementation, the values of the switching state field are changed to achieve the purpose of changing the trigger data stream into the request data stream, changing the request data stream into the response data stream, and changing the response data stream into the negotiation data stream, thereby reducing the latency of link switching.
[0018] In an optional implementation of the first aspect, the switching indication information includes a correspondence between the identifier of the first node and the identifier of the fourth node. The switching module obtains configuration information, which includes a correspondence between the first port identifier and the identifier of the first node, and a correspondence between the fourth port identifier and the identifier of the fourth node. With this implementation, the switching module can obtain the second link according to the switching indication information and the stored configuration information, thereby ensuring the success rate of link switching.
[0019] In an optional implementation of the first aspect, the switching indication information includes a correspondence between the identifier of the first node, the identifier of the first port, the identifier of the fourth port, and the identifier of the fourth node. With this implementation, the switching module can obtain the second link according to the switching indication information, thereby ensuring the success rate of link switching.
[0020] In an optional implementation of the first aspect, the switching indication information is also used to indicate that the second node is faulty. Before the switching module turns on the second link, the method further includes that the switching indication information is also used to indicate that the third node is faulty, and before the switching module turns on the second link, the method further includes that the switching module generates the second request data stream according to the switching indication information. With this implementation, when the third node is faulty, the management node informs the switching module to switch the first link to the second link, thereby ensuring that link switching can be performed in time even if a node is faulty, and improving the reliability of data transmission.
[0021] In an optional implementation of the first aspect, the first trigger data stream comprises a switching data stream identifier and a channel number indication, where the switching data stream identifier is used to identify the first trigger data stream, and the channel number indication is used to indicate the number of channels supported by the third node. With this implementation, the switching module can accurately identify the trigger data stream, the response data stream, and the negotiation data stream according to the switching data stream identifier, thereby improving the accuracy of link switching. The node can determine whether to agree to link switching according to the channel number indication.
[0022] In the second aspect, the embodiments of the present application provide a method for link switching, which is applied to a first node, a second node, a third node, or a fourth node, and the node is used to connect a switching module. The method comprises the following steps: the node sends a trigger data stream to the switching module, where the trigger data stream is used to trigger link switching; and the node receives a request data stream from the switching module, where the request data stream is changed from another trigger data stream, and the request data stream is used to request link switching. The beneficial effects of the present aspect are described in the first aspect, and thus are not described in detail here.
[0023] In an optional implementation of the second aspect, after the node receives the request data stream from the switching module, the method further comprises the following steps: the node changes the request data stream into a response data stream, where the response data stream is used to respond to the request data stream; and the node sends the response data stream to the switching module.
[0024] In an optional implementation of the second aspect, after the node receives the request data stream from the switching module, the method further comprises the following steps: the node receives a negotiation data stream from the switching module; and the node interrupts the transmission of a service data stream between the node and the switching module according to the negotiation data stream.
[0025] In an optional implementation of the second aspect, the trigger data stream, the request data stream, the response data stream, and the negotiation data stream each comprise a switching state field, the response data stream is changed from the request data stream, the negotiation data stream is changed from the response data stream, and the values of the switching state field in the trigger data stream, the request data stream, the response data stream, and the negotiation data stream are different from each other.
[0026] In an optional implementation of the second aspect, the trigger data stream comprises a switching data stream identifier and a channel number indication, where the switching data stream identifier is used to identify the trigger data stream, and the channel number indication is used to indicate the number of channels supported by the node.
[0027] In a third aspect, an embodiment of the present application provides a switching module, the switching module comprising a processing module, a first port, a second port, a third port and a fourth port, wherein the processing module is connected with the first port, the second port, the third port and the fourth port respectively, a first link of the switching module is in a conducting state, the first link comprising the first port and the third port, the first port being connected with a first node, and the third port being connected with a third node; the processing module is configured to: receive switching indication information, the switching indication information being used to conduct a second link, the second link comprising the first port and the fourth port, and the fourth port being connected with a fourth node; receive a first trigger data stream from the third node through the third port, and receive a second trigger data stream from a second node through the second port, the first trigger data stream and the second trigger data stream being used to trigger link switching respectively, and the second port being connected with the second node; according to the switching indication information, change the first trigger data stream and the second trigger data stream into a first request data stream and a second request data stream respectively, and send the first request data stream to the first node through the first port and send the second request data stream to the fourth node through the fourth port, the first request data stream and the second request data stream being used to request link switching respectively; and conduct the second link. The switching process and the beneficial effects of the present aspect are described in the first aspect, and thus will not be repeated here.
[0028] In a fourth aspect, an embodiment of the present application provides a node, comprising a processor and a node port, the node port being used to connect a switching module; the processor is configured to send a trigger data stream to the switching module through the node port, the trigger data stream being used to trigger link switching; and the processor receives a request data stream from the switching module through the node port, the request data stream being changed from another trigger data stream by the switching module, and the request data stream being used to request link switching. The switching process and the beneficial effects of the present aspect are described in the second aspect, and thus will not be repeated here.
[0029] Based on the fourth aspect, in an optional implementation, the node further comprises an optical module connected with the node port.
[0030] In a fifth aspect, an embodiment of the present application provides a chip system, the chip system comprising a processor and an input / output interface, the input / output interface being used to receive data and transmit the data to the processor, or send data from the processor to another chip system, and the processor being used to execute the method of any one of the first aspect or the method of any one of the second aspect.
[0031] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, including computer program instructions, when the computer program instructions are executed by a processor, the processor executes the method in any one of the first aspect or the second aspect.
[0032] In a seventh aspect, an embodiment of the present application provides a communication system, including a node and a switching module, the node includes a node port, the node port is connected with the switching module, the switching module is shown in the third aspect, the node is shown in the fourth aspect, and details are not described herein.
[0033] Based on the seventh aspect, the communication system further includes another node, the node port included in the another node is connected with the switching module.
[0034] Based on the seventh aspect, the communication system further includes an optical module, the port of the switching module is connected with the optical module. BRIEF DESCRIPTION OF DRAWINGS
[0035] FIG. 1 is a structure example diagram of a first embodiment of the communication system provided by the present application;
[0036] FIG. 2 is a structure example diagram of the first node shown in FIG. 1;
[0037] FIG. 3 is a connection example diagram of FIG. 1 in a source link connection state;
[0038] FIG. 4 is a connection example diagram of FIG. 1 in a target link connection state;
[0039] FIG. 5 is a step flow chart of a first embodiment of the link switching method provided by the present application;
[0040] FIG. 6 is a structure example diagram of the switching module shown in FIG. 2;
[0041] FIG. 7 is a structure example diagram of the first channel shown in FIG. 6;
[0042] FIG. 8 is a structure example diagram of the second channel shown in FIG. 6;
[0043] FIG. 9 is a connection example diagram of FIG. 1 in a source link connection state and a fault;
[0044] FIG. 10 is a connection example diagram of FIG. 1 in a target link connection state and a fault;
[0045] FIG. 11 is a step flow chart of a second embodiment of the link switching method provided by the present application;
[0046] FIG. 12 is a structure example diagram of a second embodiment of the communication system provided by the present application;
[0047] FIG. 13 is a structure example diagram of a third embodiment of the communication system provided by the present application. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person skilled in the art without creative work under the premise that the embodiments in the present application are within the scope of protection of the present application.
[0049] The method for link switching provided in the embodiments of the present application can switch the networking topology at any time according to the requirement of the communication system. In order to better understand the method shown in the embodiments, first, the structure of the communication system to which the method shown in the embodiments is applied will be described with reference to FIG. 1. FIG. 1 is an example structural diagram of the first embodiment of the communication system provided in the present application. The embodiments of the present application do not limit the system type to which the communication system is applied, for example, super computing cluster (SCC), which can also be referred to as supercomputer cluster, database, distributed computing system, parallel computing system, cloud computing network, automatic intelligence (AI), etc.
[0050] The communication system shown in the embodiments includes a first node 100, a second node 140, a Retimer 110, a third node 120 and a fourth node 130. The communication system shown in the embodiments can be located on the same cabinet or on different cabinets, which is not limited specifically. For example, if located on the same cabinet, the first node 100, the second node 140, the Retimer 110, the third node 120 and the fourth node 130 can be distributed on one or more single boards. The embodiments of the present application do not limit the number of single boards on which the first node 100, the second node 140, the Retimer 110, the third node 120 and the fourth node 130 are distributed. The embodiments of the present application do not limit the number of nodes included in the communication system, for example, the first node 100 and the second node 140 can be two different nodes, and for example, the first node 100 and the second node 140 can be the same node, which is not limited specifically.
[0051] Taking the first node 100 as an example, refer to FIG. 2, wherein FIG. 2 is a structural example diagram of the first node shown in FIG. 1. The first node 100 includes a processor 103, a memory 102, a system bus 105, a first node port 101, and a direct memory access controller (DAMC) 106. The processor 103, the memory 102, the first node port 101, and the DAMC 106 are respectively connected with the system bus 105. The processor 103 can access the memory 102 through the system bus 105, for example, the processor 103 can read and write data or execute code in the memory 102 through the system bus. The system bus 105 can be, for example, a quick path interconnect (QPI) or an ultra path interconnect (UPI). The system bus 105 is divided into an address bus, a data bus, a control bus, and the like. The function of the processor 103 is mainly to interpret the instructions (or code) of the computer program and process the data in the computer software. The instructions of the computer program and the data in the computer software can be saved in the memory 102. In this embodiment, the processor 103 is taken as an example of a central processing unit (CPU), and only one CPU is shown in FIG. 1. In actual application, the number of CPUs is often more than one, and one CPU can have one or more CPU cores. The number of CPUs and the number of CPU cores are not limited in this example. It should be noted that the description of the type of the processor 103 in this example is an optional example and is not limited, for example, the processor 103 can also be a neural processing unit (NPU), a field-programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a network processor (NP), a microcontroller unit (MCU), or a programmable logic device (PLD), a data processing unit (DPU), a graphics processing unit (GPU), and the like, and details are not described herein.The memory 102 refers to an internal memory that directly exchanges data with the processor 103, which can read and write data at any time and at a very fast speed, as temporary data storage of an operating system or other programs that are running. The memory 102 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0052] The first node port 101 is an input / output (I / O) port. It should be noted that the number of node ports included in the first node 100 is not limited in the embodiment. For example, if the first node 100 and the second node 140 are the same node, the first node 100 further includes a second node port 141 connected with the system bus 105. The description of the second node port 141 can refer to the description of the first node port 101, and details are not described herein. The description of the structures of the second node 140, the third node 120, and the fourth node 130 can refer to the description of the first node 100, and details are not described herein.
[0053] Taking the first node port 101 as an example, the first node port 101 can be a high-speed serial interface using a remote direct memory access (RDMA) protocol, a unified bus (UB) protocol, a serial advanced technology attachment (SATA), a peripheral component interconnect express (PCle), and the like. In this embodiment, the first node port 101 uses the UB protocol as an example. The high-speed serial interface has a high data transmission rate and a low bit error rate, and is suitable for application scenarios of long-distance and high-speed data transmission. With the development of the high-speed serial interface, the rate of the serializer and deserializer (SerDes) included in the node port is getting higher and higher. Correspondingly, the medium insertion loss (IL) embodied by the interconnection medium connected between different nodes is also getting larger. When the IL size exceeds the driving capability of the SerDes, it is necessary to insert a Retimer 110 in the link to relay and amplify the signal and filter out the link jitter, so as to enhance the driving distance of the link. Specifically, the Retimer 110 includes a first port 111, a second port 112, a third port 113, and a fourth port 114. It should be noted that the number of ports included in the Retimer 110 is not limited in this embodiment. The first port 111 is connected with the first node port 101. The second port 112 is connected with the second node port 141 of the second node 140. The third port 113 is connected with the third node port 121. The fourth port 114 is connected with the fourth node port 131. The number of Retimers 110 included in the communication system is not limited in this embodiment.
[0054] Fig. 3 is a connection diagram of Fig. 1 in a source link connection state. In the embodiment, each node port includes one sending interface and one receiving interface. It is to be understood that the number of sending interfaces and receiving interfaces included in each node port is not limited in the embodiment. For example, the first node port 101 includes a sending interface 201 and a receiving interface 202, the second node port 141 includes a sending interface 203 and a receiving interface 204, the third node port 121 includes a receiving interface 222 and a sending interface 221, and the fourth node port 131 includes a receiving interface 232 and a sending interface 231. In the Retimer 110, each port includes two interfaces. It is to be understood that the number of interfaces included in each port of the Retimer 110 is not limited in the embodiment. Specifically, the first port 111 of the Retimer 110 includes a first interface 211 and a second interface 212, and the first interface 211 is connected to the sending interface 201 and the second interface 212 is connected to the receiving interface 202. The second port 112 includes a third interface 213 and a fourth interface 214, and the third interface 213 is connected to the sending interface 203 and the fourth interface 214 is connected to the receiving interface 204. The third port 113 includes a fifth interface 215 and a sixth interface 216, and the fifth interface 215 is connected to the receiving interface 222 and the sixth interface 216 is connected to the sending interface 221. The fourth port 114 includes a seventh interface 217 and an eighth interface 218, and the seventh interface 217 is connected to the receiving interface 232 and the eighth interface 218 is connected to the sending interface 231. As shown in Fig. 3, in the Retimer 110, the first link between the first interface 211 and the fifth interface 215 is in a conducting state, and then the sending interface 201 and the receiving interface 222 are in a connection state. The first link between the second interface 212 and the sixth interface 216 is in a conducting state, and then the receiving interface 202 and the sending interface 221 are in a connection state. The first link between the third interface 213 and the seventh interface 217 is in a conducting state, and then the sending interface 203 and the receiving interface 232 are in a connection state. The first link between the fourth interface 214 and the eighth interface 218 is in a conducting state, and then the receiving interface 204 and the sending interface 231 are in a connection state.
[0055] The link switching method provided in the embodiment can switch the communication system in the source link connection state (as shown in FIG. 3) to the target link connection state (as shown in FIG. 4). FIG. 4 is an example diagram of the connection of the first node in the target link connection state. The first node port 101, the second node port 141, the third node port 121 and the fourth node port 131 shown in FIG. 4 are described in FIG. 3, and details are not repeated. In the Retimer 110, each port includes two interfaces. The Retimer 110 is connected to the first node port 101, the second node port 141, the third node port 121 and the fourth node port 131. The corresponding description in FIG. 3 is referred to, and details are not repeated. In the Retimer 110, the second link between the first interface 211 and the seventh interface 217 is in the on state, so that the sending interface 201 and the receiving interface 232 are in the connection state. The second link between the second interface 212 and the eighth interface 218 is in the on state, so that the receiving interface 202 and the sending interface 231 are in the connection state. The second link between the third interface 213 and the fifth interface 215 is in the on state, so that the sending interface 203 and the receiving interface 222 are in the connection state. The second link between the fourth interface 214 and the sixth interface 216 is in the on state, so that the receiving interface 204 and the sending interface 221 are in the connection state.
[0056] FIG. 5 is a first embodiment step flow chart of the link switching method provided in the application. FIG. 5 shows that the switching module is the Retimer, which is used to switch the communication system in the source link connection state shown in FIG. 3 to the target link connection state shown in FIG. 4. The switching module is not limited in the embodiment, for example, the switching module can be any type of chip, module, device, component, single board, etc. connected between the first node and the third node and connected between the second node and the fourth node, and details are not limited.
[0057] Step 501, the management node sends switching indication information to the Retimer.
[0058] The switching indication information shown in the embodiment is used to indicate the second link, so that the Retimer turns on each second link in the Retimer according to the switching indication information. The description of each second link in the Retimer can be referred to the corresponding description of FIG. 4, and will not be repeated here. The management node shown in the embodiment can be located on the same cabinet as the first node, or the management node can be located on different cabinets from the first node, and the specific implementation is not limited. For example, the management node and the first node can be located on the same single board, or the management node can be located in the first node, and the management node can be a logical module or software included in the first node, or a component or device (such as a processor, a chip, etc.) of the first node. The relationship between the management node and the second node, the third node, and the fourth node can be referred to the description of the relationship between the management node and the first node, and will not be repeated here. The type of the management node is not limited in the embodiment, for example, the management node can be a fabric manager (FM).
[0059] For example, the management node 220 is connected with the Retimer 110, and the management node 220 has stored the source link connection state, and the source link connection state shown in Table 1 is used to indicate that the communication system is in the source link connection state shown in FIG. 3, and the source link connection state includes the correspondence between the identifier of the node and the identifier of the Retimer port, and specifically, the identifier of the node is specifically the identifier of the node port of the node.
[0060] Table 1
[0061] It should be noted that the description of the port identification (ID) in the embodiment is an optional example, as long as different ports correspond to different IDs. It can be understood that the source link connection state is used to indicate the correspondence between the ID of the first node port, the ID of the first port, the ID of the third port, and the ID of the third node port. Then, the data flow between the first node port of the first node and the third node port of the third node can be transmitted via the transmission link including the first node port 101, the first port 111, the third port 113, and the third node port 121. For specific connection description, please refer to the corresponding description of FIG. 3, and details are not described herein. The data flow shown in the embodiment can also be referred to as a code stream, which specifically includes a plurality of data units, which can be data packets, data frames, data messages, control frames, etc., and details are not limited. The source link connection state is also used to indicate the correspondence between the ID of the second node port, the ID of the second port, the ID of the fourth port, and the ID of the fourth node port. Then, the data flow between the second node port of the second node and the fourth node port of the fourth node can be transmitted via the transmission link including the second node port 141, the second port 112, the fourth port 114, and the fourth node port 131 of the fourth node. For specific connection description, please refer to the corresponding description of FIG. 3, and details are not described herein.
[0062] If the communication system is switched from the source link connection state shown in FIG. 3 to the target link connection state shown in FIG. 4 according to the network needs. For example, in a super computer cluster, the management node decomposes a computing task into a sub-computing task, and the original sub-computing task is transmitted from the first node to the third node for processing by the third node. Subsequently, according to the business execution needs (such as the computing resources of the node, the congestion of the node, etc.), the sub-computing task is transmitted from the first node to the fourth node for processing by the fourth node. For another example, in a cloud computing network, according to the changes of the computing model in terms of computing resources, network bandwidth, data storage, business model demand, etc., the first node switches the business model executed by the third node to the fourth node. Then, the management node obtains the target link connection state shown in Table 2, and the target link connection state shown in Table 2 is used to indicate that the communication system is in the target link connection state shown in FIG. 4.
[0063] Table 2
[0064] It can be understood that the target link connection state is used to indicate the correspondence between the ID of the first node port, the ID of the first port, the ID of the fourth port and the ID of the fourth node port. Then, the data flow between the first node port 101 of the first node and the fourth node port 131 of the fourth node can be transmitted via the transmission link including the first node port 101, the first port 111, the fourth port 114 and the fourth node port 131. For details of the transmission link, please refer to the corresponding description of FIG. 4, and details are not described herein. The target link connection state is also used to indicate the correspondence between the ID of the second node port, the ID of the second port, the ID of the third port and the ID of the third node port. Then, the data flow between the second node port of the second node and the third node port of the third node can be transmitted via the transmission link including the second node port 141, the second port 112, the third port 113 and the third node port 121. For details of the transmission link, please refer to the corresponding description of FIG. 4, and details are not described herein. It should be clear that the embodiment takes the target link connection state including the correspondence between the ID of the first node port, the ID of the first port, the ID of the fourth port and the ID of the fourth node port, and the correspondence between the ID of the second node port, the ID of the second port, the ID of the third port and the ID of the third node port as an example. In other examples, the target link connection state can only include one of the correspondence between the ID of the first node port, the ID of the first port, the ID of the fourth port and the ID of the fourth node port, and the correspondence between the ID of the second node port, the ID of the second port, the ID of the third port and the ID of the third node port, and details are not limited.
[0065] If the management node determines that the communication system needs to switch to the target link connection state as shown in Table 2, the management node sends the switching indication information to the Retimer. The switching indication information includes the correspondence between the ports shown in Table 2. It should be clear that the embodiment does not limit the way of carrying the correspondence as shown in Table 2 by the target. After receiving the switching indication information, the Retimer can determine that it needs to switch the source link connection state as shown in FIG. 3 to the target link connection state as shown in FIG. 4.
[0066] For example, the switching indication information can include a correspondence between the ID of the first node port and the ID of the fourth node port. The Retimer stores configuration information including a correspondence between the first port ID and the ID of the first node port, and a correspondence between the ID of the fourth port and the ID of the fourth node port. The Retimer can obtain the target link connection state according to the switching indication information and the stored configuration information. The switching indication information can include a correspondence between the ID of the second node port and the ID of the third node port. The Retimer stores configuration information including a correspondence between the second port ID and the ID of the second node port, and a correspondence between the ID of the third port and the ID of the third node port. The Retimer can obtain the target link connection state according to the switching indication information and the stored configuration information.
[0067] Step 502, the first node sends a third trigger data stream to the Retimer.
[0068] In the step 502 stage, the Retimer is in the connection state shown in FIG. 3, then the sending interface included in the first node port of the first node sends the third trigger data stream to the first interface included in the first port of the Retimer. The embodiment takes the first node sending the third trigger data stream to the Retimer as an example, and in other examples, the Retimer itself can generate the third trigger data stream, etc., which is not limited. The third trigger data stream is used to trigger the Retimer to perform link switching as needed.
[0069] The following describes several examples of the first node sending the third trigger data stream:
[0070] Example 1
[0071] When the management node detects that it is necessary to switch the source link connection state to the target link connection state, the first node is instructed to send the third trigger data stream to the Retimer.
[0072] Example 2
[0073] In example 1, the management node detects that it is necessary to switch from the source link connection state to the target link connection state, and triggers the first node to send the third trigger data stream to the Retimer. In example 2, the first node can continuously send the third trigger data stream to the Retimer.
[0074] Example 3
[0075] In example 3, the first node can periodically send the third trigger data stream to the Retimer according to a preset period.
[0076] The format of the third trigger data stream shown in the embodiment will be described below, which can be seen from Table 3:
[0077] Table 3
[0078] The third trigger data stream shown in the embodiment specifically includes two parts of Body and Payload. In the third trigger data stream, the 0th to (4*N-1)th bits are a switching data stream identifier, which is used to identify the third trigger data stream, so that the Retimer determines, according to the switching data stream identifier, that the data stream carrying the switching data stream identifier is the third trigger data stream for link switching. For example, the Retimer receives the service data stream and the third trigger data stream from the first node, and the Retimer can identify the third trigger data stream from the service data stream and the third trigger data stream according to the switching data stream identifier. For example, the third trigger data stream can be a unified align marker (UAM), which is not limited. The switching data stream identifier can specifically be a UAM identify, which is used to identify the third trigger data stream, and the UAM identify is the Body part of the UAM. The embodiment does not limit the value of N, as long as N is a natural number. The embodiment can use error correction coding for the switching data stream identifier, so that even if an error occurs in one or more bits of the switching data stream identifier after the third trigger data stream is transmitted, the error can be checked out, improving the reliability of the transmission of the switching data stream identifier. The embodiment does not limit the type of error correction coding, for example, bose ray-chaudhuri hocquenghem (BCH) can be used. The switching data stream identifier shown in the embodiment can be a code word with a code number of CW21 or CW28 in the error correction coded code word (CW), and the like, which is not specifically limited.
[0079] The 4*Nth to (4*N+3)th bits in the third trigger data stream are a payload indication. For example, the payload indication can be a UAM END, which represents the end of the UAM Body part, and the Payload is after the UAM END. The payload indication can use error correction coding, and the description of the error correction coding can be seen from the description of the error correction coding of the switching data stream identifier, which is not specifically described. The payload indication shown in the embodiment can be a code word with a code number of CW22 or CW28 in the error correction coded CW, and the like, which is not specifically limited.
[0080] The Payload of the third trigger data stream includes a channel number indication, a switching type field and a switching state field. Specifically, the 4*N+4 to 4*N+11 bits in the third trigger data stream are the channel number indication. The 4*N+12 to 4*N+19 bits in the third trigger data stream are the switching type field, and the 4*N+20 to 4*N+27 bits in the third trigger data stream are the switching state field. The channel number indication is used to indicate the number of channels supported by the first node port of the first node. For example, the channel number indication is used to indicate the number of transmission channels included in the transmission interface of the first node port, where the number of transmission channels is the number of independent data streams that can be simultaneously transmitted by the transmission interface. The channel number indication is also used to indicate the number of reception channels included in the first node port, where the number of reception channels is the number of independent data streams that can be simultaneously received by the first node port. In the case where the transmission channels of the first node port are connected to the reception channels of the third node port, each data stream transmitted by the transmission channels of the first node port can be successfully transmitted to the reception channels of the third node port. Similarly, in the case where the transmission channels of the third node port are connected to the reception channels of the first node, each data stream transmitted by the transmission channels of the third node port can be successfully transmitted to the reception channels of the first node. The channel number indication can be encoded using error correction coding. For details of the error correction coding, please refer to the description of the error correction coding of the switching data stream identifier, which will not be repeated here. The specific code word included in the channel number indication error correction coding CW is not limited in the present embodiment, and different code words can be used to indicate different channel numbers.
[0081] The switching type field can be a UAM Payload Type, and the switching type field includes link control information. Specifically, the UAM Payload Type is used to indicate the type of the Payload, i.e., the UAM Payload Type is used to indicate that the Payload is used for link switching. The switching type field can be encoded using error correction coding. For details of the error correction coding, please refer to the description of the error correction coding of the switching data stream identifier, which will not be repeated here. The switching type field shown in the present embodiment can be a code word designated as CW8 in the error correction coded CW, and the like, which is not limited in detail.
[0082] The switching state field can be UAM Payload DETAIL, used to indicate various states in the link switching process. When the switching state field takes different values, the switching state field indicates different meanings. For example, if the switching state field takes a first value, the switching state field taking the first value is a no switching indication, used to indicate that no link switching is needed. If the switching state field takes a second value, the switching state field taking the second value is a switching request, used to request link switching. For example, the switching request is a code word CW3 in the error correction coded CW. For another example, if the switching state field takes a third value, the switching state field taking the third value is a switching preparation completion indication, used to request that the link switching has been prepared. For example, the switching preparation completion indication is a code word CW9 in the error correction coded CW. If the switching state field takes a fourth value, the switching state field taking the fourth value is a negotiation indication, used to indicate triggering a negotiation process. For example, the negotiation indication is a code word CW10 in the error correction coded CW. In this embodiment, the switching request, the switching preparation completion indication, the negotiation indication, and the no switching indication are indicated by the same field (i.e., the switching state field) through different values, which is not limited. In other examples, the switching request, the switching preparation completion indication, the negotiation indication, and the no switching indication can be indicated by different fields, which is not limited. It should be noted that the description of the various fields included in the third trigger data stream and the number of bits included in each field in this embodiment is not limited.
[0083] In step 503, the Retimer sends a third request data stream to the third node.
[0084] In step 503, the Retimer is in the connection state as shown in FIG. 3. Then, the Retimer determines that the source link connection state needs to be switched to the target link connection state according to the switching indication information from the management node. Therefore, the Retimer changes the third trigger data stream received from the first node port to the third request data stream. The difference between the third request data stream and the third trigger data stream is that the value of the switching state field is different. In the third trigger data stream, the value of the switching state field is the first value, and the Retimer changes the value of the switching state field, so that the value of the switching state field is the second value. The switching state field taking the second value is a switching request, used to request the third node to perform link switching. It can be understood that the value of the switching state field in the third request data stream is the second value. The Retimer sends the third request data stream to the third node port of the third node through the fifth interface 215 and the receiving interface 222 in sequence, to request the third node to perform link switching.
[0085] The embodiment takes that the management node has sent the switching indication information to the Retimer as an example. Then, the Retimer determines that the link switching is needed according to the switching indication information. For this purpose, the Retimer changes the third trigger data stream into the third request data stream, for example. If the Retimer does not receive the switching indication information, the Retimer determines that the link switching is not needed, and then the Retimer does not need to change the value of the switching indication information with the first value in the third trigger data stream.
[0086] In step 504, the second node sends the second trigger data stream to the Retimer.
[0087] Specifically, the sending interface included in the second node port of the second node sends the second trigger data stream to the third interface included in the second port of the Retimer. For the description of the second trigger data stream shown in the embodiment, refer to the description of the third trigger data stream shown in step 502, and details are not described herein.
[0088] In step 505, the Retimer sends the second request data stream to the fourth node.
[0089] In step 505, the Retimer is in the connection state shown in FIG. 3. Then, the Retimer determines that the source link connection state needs to be switched to the target link connection state according to the switching indication information from the management node. For this purpose, the Retimer changes the second trigger data stream received from the second node port into the second request data stream. The difference between the second request data stream and the second trigger data stream is that the values of the switching state fields are different. For the description of the Retimer changing the second trigger data stream into the second request data stream, refer to the description of the Retimer changing the third trigger data stream into the third request data stream shown in step 503, and details are not described herein. It can be understood that the value of the switching state field in the second request data stream is the second value. The Retimer sends the second request data stream to the fourth node port of the fourth node in sequence via the seventh interface 217 and the receiving interface 232, so as to instruct the fourth node to perform the link switching.
[0090] In step 506, the third node sends the first trigger data stream to the Retimer.
[0091] Specifically, the sending interface included in the third node port of the third node sends the first trigger data stream to the sixth interface included in the third port of the Retimer. For the description of the first trigger data stream shown in the embodiment, refer to the description of the third trigger data stream shown in step 502, and details are not described herein.
[0092] In step 507, the Retimer sends the first request data stream to the first node.
[0093] At stage 507, the Retimer is in the connection state as shown in FIG. 3. Then, the Retimer determines, according to the switching indication information from the management node, that the source link connection state needs to be switched to the target link connection state. To this end, the Retimer changes the first trigger data stream received from the third node port into a first request data stream. The first request data stream is different from the first trigger data stream in that the switching state field has a different value. For details of how the Retimer changes the first trigger data stream into the first request data stream, please refer to the description of how the Retimer changes the third trigger data stream into the third request data stream at stage 503. It can be understood that the switching state field in the first request data stream has the second value. The Retimer sends the first request data stream to the first node port of the first node via the second interface 212 and the receiving interface 202 in sequence, to request the first node to perform link switching.
[0094] At stage 508, the fourth node sends a fourth trigger data stream to the Retimer.
[0095] Specifically, the sending interface 231 included in the fourth node port of the fourth node sends the fourth trigger data stream to the eighth interface included in the fourth port of the Retimer. For details of the fourth trigger data stream, please refer to the description of the third trigger data stream at stage 502.
[0096] At stage 509, the Retimer sends a fourth request data stream to the second node.
[0097] At stage 509, the Retimer is in the connection state as shown in FIG. 3. Then, the Retimer determines, according to the switching indication information from the management node, that the source link connection state needs to be switched to the target link connection state. To this end, the Retimer changes the fourth trigger data stream received from the fourth node port into a fourth request data stream. The fourth request data stream is different from the fourth trigger data stream in that the switching state field has a different value. For details of how the Retimer changes the fourth trigger data stream into the fourth request data stream, please refer to the description of how the Retimer changes the third trigger data stream into the third request data stream at stage 503. It can be understood that the switching state field in the fourth request data stream has the second value. The Retimer sends the fourth request data stream to the second node via the fourth interface 214 and the receiving interface 204 in sequence, to request the second node port of the second node to perform link switching.
[0098] Step 510, the third node sends a third response data stream to the Retimer.
[0099] Via step 503, the third node port of the third node receives the third request data stream from the Retimer, and determines whether to agree to the link switching according to the switching request carried by the third request data stream. For example, the third node can determine whether to agree to the link switching according to the computing resources, network bandwidth, data storage, business model requirements, data to be sent, etc. For another example, the third node can determine whether to agree to the link switching according to the number of channels indicated by the number of channel indication. Specifically, the third node determines that the number of receiving channels supported by the receiving interface included in the third node port is equal to the number of sending channels supported by the first node port indicated by the number of channel indication, and / or the third node determines that the number of sending channels supported by the sending interface included in the third node port is equal to the number of receiving channels supported by the first node port indicated by the number of channel indication, then the third node agrees to the link switching. It should be clear that the embodiment does not limit the conditions under which the third node determines whether to agree to the link switching according to the third request data stream. In step 510, the Retimer is in the connection state shown in FIG. 3, so in the case where the third node determines to agree to the link switching, the sending interface included in the third node port of the third node sends the third response data stream to the sixth interface included in the third port of the Retimer.
[0100] The third response data stream shown in the embodiment is changed from the third request data stream by the third node. It can be understood that the third response data stream is changed from the third request data stream. The difference between the third response data stream and the third request data stream is that the value of the switching state field is different. In the third request data stream, the value of the switching state field is the second value, and the third node changes the value of the switching state field, so that the value of the switching state field is the third value. The switching state field with the third value is used as a switching preparation completion indication to indicate that the third node has prepared for the link switching. In the embodiment, the third node agrees to the link switching is taken as an example. If the third node does not agree to the link switching, the third node can change the value of the switching state field to the fifth value. The switching state field with the fifth value is used to indicate that the third node does not agree to the link switching. For another example, if the third node does not agree to the link switching, the third node sends indication information to the management node to indicate that it does not agree to the link switching, and the specific implementation is not limited.
[0101] This embodiment illustrates how a third node's port changes a third request data stream into a third response data stream. This is not a limitation; for example, in other examples, when the third node's port receives a third request data stream, it can send the third request data stream to the third node's control device. If the control device determines that it agrees to the link switch, it changes the third request data stream into a third response data stream and sends the third response data stream to the third node's port. The control device can be the third node's CPU, chip, logic module, or software, etc., and is not specifically limited.
[0102] Step 511: The fourth node sends the second response data stream to the Retimer.
[0103] In step 505, the fourth node's fourth node port receives the second request data stream from the Retimer and determines whether to agree to a link switch based on the handover request carried in the second request data stream. For an explanation of the fourth node's determination of whether to agree to a link switch, please refer to the explanation of the third node's determination of whether to agree to a link switch shown in step 510; details will not be repeated here. In step 511, the Retimer is in the connected state shown in Figure 3. Therefore, if the fourth node agrees to the link switch, the sending interface included in the fourth node's fourth node port sends the second response data stream to the eighth interface included in the fourth port of the Retimer. The fourth node changes the second request data stream into a second response data stream. For an explanation of the change, please refer to the explanation of the third node changing the third request data stream into a third response data stream shown in step 510; details will not be repeated here. It can be understood that in the second response data stream, the handover status field takes the third value. Therefore, the handover status field with the third value serves as a handover preparation completion indicator, used to indicate that the fourth node has completed preparation for the link switch. This embodiment illustrates how the fourth node's port changes the second request data stream into a second response data stream. This is not a limitation; for example, in other examples, if the fourth node's port receives the second request data stream, it can send the second request data stream to the fourth node's control device. If the control device determines that it agrees to the link switch, it sends the second response data stream to the fourth node's port. For a description of the control device, please refer to the description of the control device of the third node shown in step 510. Specific details are not limited. This embodiment uses the fourth node's agreement to the link switch as an example. If the fourth node does not agree to the link switch, please refer to the description of the third node's disagreement to the link switch shown in step 510. Specific details are not elaborated here.
[0104] Step 512: The first node sends the first response data stream to the Retimer.
[0105] Via step 507, the first node port of the first node receives the first request data stream from the Retimer, and determines whether to agree to perform the link switching according to the switching request carried by the first request data stream. The description of the first node determining whether to agree to perform the link switching can be found in the description of the third node determining whether to agree to perform the link switching shown in step 510, and will not be repeated here. In step 512, the Retimer is in the connection state shown in FIG. 3. If the first node determines to agree to perform the link switching, the sending interface included in the first node port of the first node sends the first interface included in the first port of the Retimer the first response data stream. The description of the first node changing the first request data stream into the first response data stream can be found in the description of the third node changing the third request data stream into the third response data stream shown in step 510, and will not be repeated here. It can be understood that the switching state field in the third response data stream has the third value. The switching state field with the third value is used as a switching preparation completion indication to indicate that the first node has prepared for the link switching. The embodiment shown herein takes the first node port of the first node changing the first request data stream into the first response data stream as an example, but the application is not limited thereto. For example, in another example, the first node port receives the first request data stream, and sends the first request data stream to the control device of the first node. If the control device determines to agree to perform the link switching, the first response data stream is sent to the first node port. The description of the control device can be found in the description of the control device of the third node shown in step 510, and will not be repeated here. The embodiment shown herein takes the first node agreeing to perform the link switching as an example. If the first node does not agree to perform the link switching, the description can be found in the description of the third node not agreeing to perform the link switching shown in step 510, and will not be repeated here.
[0106] Step 513, the second node sends the fourth response data stream to the Retimer.
[0107] Via step 509, the second node port of the second node receives the fourth request data stream from the Retimer, and determines whether to agree to the link switching according to the switching request carried by the fourth request data stream. Wherein, the description of the first node determining whether to agree to the link switching is shown in step 510, and is not described in detail. In step 513, the Retimer is in the connection state shown in FIG. 3. Then, in the case that the first node determines to agree to the link switching, the sending interface included in the second node port of the second node sends the fourth response data stream to the third interface included in the second port of the Retimer. The description of the first node changing the fourth request data stream into the fourth response data stream is shown in the description of the third node changing the third request data stream into the third response data stream shown in step 510, and is not described in detail. It can be understood that the switching state field in the fourth response data stream takes the third value. Then, the switching state field taking the third value is used as the switching preparation completion indication to indicate that the second node has prepared for the link switching. The embodiment shown herein takes the second node port changing the fourth request data stream into the fourth response data stream as an example, and is not limited thereto. For example, in other examples, in the case that the second node port receives the fourth request data stream, the second node port can send the fourth request data stream to the control device of the second node. In the case that the control device determines to agree to the link switching, the control device sends the fourth response data stream to the second node port. Wherein, the description of the control device is shown in the description of the control device of the third node shown in step 510, and is not limited.
[0108] Step 514, the Retimer sends the third negotiation data stream to the first node.
[0109] In the embodiment, in the case that the Retimer receives the first response data stream, the second response data stream, the third response data stream and the fourth response data stream, it can be determined that the first node port of the first node, the second node port of the second node, the third node port of the third node and the fourth node port of the fourth node all agree to perform the link switching. Then, the Retimer obtains the third negotiation data stream from the third response data stream from the third node, and sends the third negotiation data stream to the receiving interface included in the first node port of the first node through the second interface of the Retimer. In the step 514, the Retimer is in the connection state shown in FIG. 3, and then in the case that the Retimer receives the third response data stream from the third node, the Retimer changes the third response data stream into the third negotiation data stream. The difference between the third negotiation data stream and the third response data stream is that the values of the switching state fields are different. In the third response data stream, the value of the switching state field is the third value, and the Retimer changes the value of the switching state field, so that the value of the switching state field is the fourth value. The switching state field with the fourth value is used as a negotiation indication to indicate that the negotiation process is triggered. It can be understood that the value of the switching state field in the third negotiation data stream is the fourth value. The Retimer sends the third negotiation data stream to the first node port of the first node through the second interface 212 and the receiving interface 202 in sequence, to instruct the first node port of the first node to perform the negotiation process.
[0110] In the step 515, the Retimer sends the second negotiation data stream to the second node.
[0111] In the embodiment, when the Retimer receives the first response data stream, the second response data stream, the third response data stream and the fourth response data stream, it can be determined that the first node port of the first node, the second node port of the second node, the third node port of the third node and the fourth node port of the fourth node all agree to perform the link switching. Then, the Retimer obtains the second negotiation data stream from the second response data stream from the fourth node, and sends the second negotiation data stream to the receiving interface included in the second node port of the second node through the fourth interface of the Retimer. In step 515, the Retimer is in the connection state shown in FIG. 3, and then when the Retimer receives the second response data stream from the fourth node, the Retimer changes the second response data stream into the second negotiation data stream. For the change, please refer to the description of changing the third response data stream into the third negotiation data stream in step 514, which will not be repeated here. It can be understood that the value of the switching state field in the second negotiation data stream is the fourth value, and then the switching state field with the fourth value is used as a negotiation indication to indicate triggering the negotiation process. The Retimer sends the second negotiation data stream to the second node port of the second node through the fourth interface 214 and the receiving interface 204 in sequence to instruct the second node port of the second node to perform the negotiation process.
[0112] In step 516, the Retimer sends the first negotiation data stream to the third node.
[0113] In the embodiment, when the Retimer receives the first response data stream, the second response data stream, the third response data stream and the fourth response data stream, it can be determined that the first node port of the first node, the second node port of the second node, the third node port of the third node and the fourth node port of the fourth node all agree to perform link switching. Then, the Retimer obtains the first negotiation data stream according to the first response data stream, and sends the first negotiation data stream to the receiving interface included in the third node port of the third node through the fifth interface of the Retimer. In step 516, the Retimer is in the connection state shown in FIG. 3, and then the Retimer changes the first response data stream received from the first node port of the first node into the first negotiation data stream. For details of the change, please refer to the description of changing the third response data stream into the third negotiation data stream in step 514. It can be understood that the value of the switching state field in the first negotiation data stream is the fourth value, and the switching state field with the fourth value is used as a negotiation indication to indicate triggering of the negotiation process. The Retimer sends the first negotiation data stream to the third node port of the third node through the fifth interface 215 and the receiving interface 222 in sequence, so as to instruct the third node port of the third node to perform the negotiation process.
[0114] In step 517, the Retimer sends the fourth negotiation data stream to the fourth node.
[0115] In the embodiment, when the Retimer receives the first response data stream, the second response data stream, the third response data stream and the fourth response data stream, it can be determined that the first node port of the first node, the second node port of the second node, the third node port of the third node and the fourth node port of the fourth node all agree to perform link switching. Then, the Retimer obtains the first negotiation data stream according to the first response data stream, and sends the first negotiation data stream to the receiving interface included in the third node port of the third node through the fifth interface of the Retimer. In step 516, the Retimer is in the connection state shown in FIG. 3, and then the Retimer changes the first response data stream received from the first node port of the first node into the first negotiation data stream. For details of the change, please refer to the description of changing the third response data stream into the third negotiation data stream in step 514. It can be understood that the value of the switching state field in the first negotiation data stream is the fourth value, and the switching state field with the fourth value is used as a negotiation indication to indicate triggering of the negotiation process. The Retimer sends the first negotiation data stream to the third node port of the third node through the fifth interface 215 and the receiving interface 222 in sequence, so as to instruct the third node port of the third node to perform the negotiation process.
[0116] Step 518, the Retimer switches from the source link connection state to the target link connection state.
[0117] When the Retimer successfully sends the first negotiation data stream, the second negotiation data stream, the third negotiation data stream and the fourth negotiation data stream, the Retimer switches its link from the source link connection state to the target link connection state. For the description of the Retimer in the target link connection state, please refer to the corresponding description of FIG. 4, which will not be repeated here. For example, as shown in FIG. 4, the Retimer disconnects the circuit between the first interface 211 and the fifth interface 215, and connects the circuit between the first interface 211 and the seventh interface 217, and disconnects the circuit between the second interface 212 and the sixth interface 216, and connects the circuit between the second interface 212 and the eighth interface 218. Then, the link between the first node port 101 of the first node, the first port 111 of the Retimer, the third port 113 of the Retimer and the third node port 121 of the third node is in a disconnected state, and the link between the first node port 101 of the first node, the first port 111 of the Retimer, the fourth port 114 of the Retimer and the fourth node port 131 of the fourth node is in a connected state. Moreover, the Retimer disconnects the circuit between the third interface 213 and the seventh interface 219, and connects the circuit between the third interface 213 and the fifth interface 215, and the Retimer also disconnects the circuit between the fourth interface 214 and the eighth interface 218, and connects the circuit between the fourth interface 214 and the sixth interface 216. Then, the second node port 141 of the second node, the second port 112 of the Retimer, the third port 113 of the Retimer and the third node port 121 of the third node are in a connected state. For example, the Retimer includes a printed circuit board (PCB), and each interface in each port included in the Retimer is packaged on the PCB. Then, the circuits between different interfaces are formed by the conductive traces on the PCB. The Retimer can realize the connection or disconnection of the circuits between different interfaces by any means such as digital circuits, which will not be limited here.
[0118] Step 519, the first node sends a third negotiation response data stream to the Retimer.
[0119] After the first node receives the third negotiation data stream, it can determine that the Retimer has been switched from the source link connection state to the target link connection state. Then, the first node returns a third negotiation response data stream to the Retimer according to the third negotiation data stream. The third negotiation response data stream can be a training data stream block (TSB). For example, the TSB can include a discovery training set block (DTSB), a configuration training set block (CTSB), an equalization training set block (ETSB), a retrain training set block (RTSB), and a unified training set block (UTSB). For example, the TSB includes a TSB type indication field, which is used to identify the third negotiation response data stream, so that the Retimer can identify the third negotiation response data stream according to the TSB type indication field after receiving the third negotiation response data stream. For example, as shown in FIG. 4, the sending interface 201 included in the first node port 101 of the first node sends the third negotiation response data stream to the first interface 211 included in the first port 111 of the Retimer.
[0120] Optionally, after the first node port of the first node receives the third negotiation data stream, the first node interrupts the service data stream transmitted by the first node port. For example, the buffer space corresponding to the first node port includes a data queue, and the data queue stores the service data stream. The first node port sends the service data stream according to the order of the data queue. In the case that the first node port receives the third negotiation data stream, the first node port sends an interrupt instruction to the data queue, so that the data queue is interrupted according to the interrupt instruction, thereby preventing the first node port from continuing to send the service data stream in the task queue. The first node port can also interrupt the service data stream received from the switching module according to the third negotiation data stream.
[0121] Step 520: The Retimer sends a third negotiation response data stream to the fourth node.
[0122] In the case that the Retimer receives the third negotiation response data stream from the first node, the Retimer is in the target link connection state, and then the first interface 211 of the Retimer sends the third negotiation response data stream to the seventh interface 217, and then the fourth node port of the fourth node receives the third negotiation response data stream through the receiving interface 232, so that the Retimer determines that the data stream sent by the sending interface 201 of the first node is transmitted to the fourth node through the first interface 211, the seventh interface 217 and the receiving interface 232 of the Retimer in sequence. Optionally, in the case that the fourth node receives the third negotiation response data stream, a response message for responding to the third negotiation response data stream can be sent to the Retimer.
[0123] Step 521, the second node sends a second negotiation response data stream to the Retimer.
[0124] After the second node receives the second negotiation data stream, it can be determined that the Retimer has switched from the source link connection state to the target link connection state, and then the second node returns a second negotiation response data stream to the Retimer according to the second negotiation data stream. The description of the second negotiation response data stream is the same as that of the third negotiation response data stream shown in step 519, and will not be repeated here. For example, as shown in FIG. 4, the sending interface 203 included in the second node port 141 of the second node sends the second negotiation response data stream to the third interface 213 included in the second port 112 of the Retimer. Optionally, after the second node port of the second node receives the second negotiation data stream, the second node interrupts the service data stream transmitted by the second node port. The specific description is the same as that of the first node interrupting the service data stream transmitted by the first node port shown in step 519, and will not be repeated here.
[0125] Step 522, the Retimer sends a second negotiation response data stream to the third node.
[0126] In the case that the Retimer receives the second negotiation response data stream from the second node, and the Retimer is in the target link connection state, the third interface 213 of the Retimer sends the second negotiation response data stream to the fifth interface 215, and then the third node port of the third node receives the second negotiation response data stream through the receiving interface 222, so that the Retimer determines that the data stream sent by the sending interface 203 of the second node is transmitted to the third node in sequence through the third interface 213, the fifth interface 215 and the receiving interface 222 of the third node. Optionally, in the case that the third node receives the second negotiation response data stream, a response message for responding to the second negotiation response data stream can be sent to the Retimer.
[0127] In step 523, the third node sends a first negotiation response data stream to the Retimer.
[0128] After the third node receives the first negotiation data stream, it can be determined that the Retimer has switched from the source link connection state to the target link connection state, and then the third node returns a first negotiation response data stream to the Retimer according to the first negotiation data stream. The first negotiation response data stream is described in the third negotiation response data stream described in step 519, and details are not described. For example, as shown in FIG. 4, the sending interface 221 included in the third node port 121 of the third node sends the first negotiation response data stream to the sixth interface 216 included in the third port 113 of the Retimer. Optionally, after the third node port of the third node receives the first negotiation data stream, the third node interrupts the service data stream transmitted by the third node port. Details are described in the description of the first node interrupting the service data stream transmitted by the first node port in step 519, and details are not described.
[0129] In step 524, the Retimer sends a first negotiation response data stream to the second node.
[0130] In the case that the Retimer receives the first negotiation response data stream from the third node, and the Retimer is in the target link connection state, the sixth interface 216 of the Retimer sends the first negotiation response data stream to the fourth interface 214, and then the second node port of the second node receives the first negotiation response data stream through the receiving interface 204, so that the Retimer determines that the data stream sent by the sending interface 221 of the third node is transmitted to the second node through the sixth interface 216, the fourth interface 214 and the receiving interface 204 of the Retimer in sequence. Optionally, in the case that the second node receives the first negotiation response data stream, a response message for responding to the first negotiation response data stream can be sent to the Retimer.
[0131] Step 525, the fourth node sends a fourth negotiation response data stream to the Retimer.
[0132] After the fourth node receives the fourth negotiation data stream, it can be determined that the Retimer has switched from the source link connection state to the target link connection state, and then the fourth node returns a fourth negotiation response data stream to the Retimer according to the fourth negotiation data stream. The description of the fourth negotiation response data stream is the same as that of the third negotiation response data stream shown in step 519, and will not be repeated here. For example, as shown in FIG. 4, the sending interface 231 included in the fourth node port 131 of the fourth node sends the fourth negotiation response data stream to the eighth interface 218 included in the fourth port 114 of the Retimer. Optionally, after the fourth node port of the fourth node receives the fourth negotiation data stream, the fourth node interrupts the service data stream transmitted by the fourth node port. The specific description is the same as that of the first node interrupting the service data stream transmitted by the first node port shown in step 519, and will not be repeated here.
[0133] Step 526, the Retimer sends a fourth negotiation response data stream to the first node.
[0134] In the case that the Retimer receives the fourth negotiation response data stream from the fourth node, the Retimer is in the target link connection state, and the eighth interface 218 of the Retimer sends the fourth negotiation response data stream to the second interface 212, and then the first node port of the first node receives the fourth negotiation response data stream through the receiving interface 202, so that the Retimer determines that the data stream sent by the sending interface 231 of the fourth node is transmitted to the first node in sequence through the eighth interface 218, the second interface 212, and the receiving interface 202 of the first node. Optionally, in the case that the first node receives the fourth negotiation response data stream, a response message for responding to the fourth negotiation response data stream can be sent to the Retimer.
[0135] In step 527, the Retimer returns the switching response information to the management node.
[0136] After the steps 519 to 526, the Retimer determines that the switching from the source link connection state to the target link connection state is successful, and the data transmission between the first node port and the fourth node port and the data transmission between the second node port and the third node port can be performed, and then the Retimer determines that the transmission of the service data stream can be performed based on the target link connection state. The Retimer returns the switching response information to the management node. In the case that the management node receives the switching response information, it is determined that the target link connection state shown in Table 2 is created and completed, and then the management node can schedule the services of the communication system based on Table 2.
[0137] With the method shown in the embodiment, when the Retimer receives a service data stream from the first node, the second node, the third node or the fourth node, the Retimer can balance the service data stream, increase the transmission energy of the service data stream through the internal clock reconstruction signal, compensate for the channel loss in the transmission process of the service data stream, eliminate signal jitter, thereby improving the transmission distance and the transmission quality of the service data stream. Moreover, the Retimer shown in the embodiment can realize the switching of the link between different node ports in the case of cable connection between different nodes. Specifically, between different node ports in the connected state, there is always a trigger data stream transmitted through the Retimer. For example, the first node continuously sends a trigger data stream to the third node through the Retimer, and for example, the second node continuously sends a trigger data stream to the fourth node through the Retimer. When the management node determines that link switching is needed, the management node sends switching indication information indicating the target link connection state to the Retimer, and then the Retimer directly changes the trigger data stream to a request data stream according to the switching indication information, and the request data stream is used to request the link switching of each node port. Since the request data stream shown in the embodiment is directly changed from the trigger data stream, it is not necessary to generate a new data stream for requesting switching, thereby effectively reducing the delay of the Retimer in sending the request data stream to the node port. Moreover, with the method shown in the embodiment, the Retimer requests each node port whether to agree to the link switching through the request data stream, the Retimer receives the response data stream returned by each node port, and then switches the source link connection state to the target link connection state, thereby improving the reliability of the link switching and ensuring the success rate of the transmission of each service data stream in the target link connection state.
[0138] The structure of the switching module shown in FIGS. 3-5 is described below in conjunction with FIG. 6, which is a structure example diagram of a switching module provided by the present application. FIG. 6 continues to take the Retimer as an example. The Retimer shown in the embodiment specifically includes a first serializer-deserializer (SerDes) 601, a first cross module 602, a second cross module 620, and a second SerDes 931. The first SerDes 601 is connected between the first node and the first cross module 602, and is also connected between the second node and the first cross module 602. The first cross module 602 specifically includes pins 611, 612, 613, 614, 615, 616, 617, and 618. The pins 611 and 612 are connected to the transmission interface 201 and the reception interface 202 of the first node, respectively, through the first SerDes 601. The pins 613 and 614 are connected to the transmission interface 203 and the reception interface 204 of the second node, respectively, through the first SerDes 601. The Retimer shown in FIG. 6 is in the source link connection state shown in FIG. 3, so the pin 611 is connected to the pin 615, the pin 612 is connected to the pin 616, the pin 613 is connected to the pin 617, and the pin 617 is connected to the pin 618. The second cross module 620 specifically includes pins 621, 622, 623, 624, 625, 626, 627, and 628. The pins 625 and 626 are connected to the reception interface 222 and the transmission interface 221 of the third node, respectively, through the second SerDes 931. The pins 627 and 628 are connected to the reception interface 232 and the transmission interface 231 of the fourth node, respectively, through the second SerDes 931. The Retimer shown in FIG. 6 is in the source link connection state shown in FIG. 3, so the pin 625 is connected to the pin 612, the pin 626 is connected to the pin 622, the pin 627 is connected to the pin 623, and the pin 628 is connected to the pin 624. The first channel 631 is connected between the pin 615 and the pin 612, the second channel 632 is connected between the pin 616 and the pin 622, the third channel 633 is connected between the pin 617 and the pin 623, and the fourth channel 634 is connected between the pin 618 and the pin 627. The Retimer further includes a control module 660 connected to the first channel 631, the second channel 632, the third channel 633, and the fourth channel 634, respectively. The control module 660 is connected to a management node and can communicate with the management node.
[0139] The first channel 631 shown in FIG. 7 is described as an example. The first channel 631 includes an alignment de-scrambler 701 connected to the pin 615, an elastic buffer 702 connected to the alignment de-scrambler 701, a deskew module 704 and a listening module 705 connected to the elastic buffer 702, respectively, a distribution module 706 connected to the deskew module 704, a link control module 707 connected to the listening module 705, a first selection module (MUX) 708 connected to the distribution module 706 and the link control module 707, respectively, a scrambling module 709 connected to the first selection module 708, and a second selection module 710 connected to the scrambling module 709 and the pin 612. The first channel 631 further includes a polarity inverter 703, one end of which is connected between the pin 615 and the alignment de-scrambler 701, and the other end of which is connected to the second selection module 710. The link control module 707 is further connected to the control module 660. The first channel 631 includes a service channel for transmitting and processing service data streams, and a switching channel for transmitting and processing trigger data streams, or response data streams, or negotiation response data streams. Specifically, the service channel includes the alignment de-scrambler 701, the elastic buffer 702, the deskew module 704, the distribution module 706, the first selection module 708, the scrambling module 709, the second selection module 710, and the polarity inverter 703. The switching channel includes the alignment de-scrambler 701, the elastic buffer 702, the listening module 705, the link control module 707, the first selection module 708, and the scrambling module 709. The first channel 631 is used to transmit data streams from the first node to the third node. Specifically, the first SerDes 601 receives data streams from the sending interface 201. The first SerDes 601 converts the high-speed serial data streams from the sending interface of the first node into low-speed parallel data streams. The first cross module 602 is connected between the pin 611 and the pin 615, and sends the low-speed parallel data streams to the alignment de-scrambler 701 of the first channel 631. The alignment de-scrambler 701 performs frame delimiting and descrambling on the received data streams, and sends the processed data streams to the elastic buffer 702. The elastic buffer 702 performs frequency offset processing between the remote clock and the local clock, and sends the processed data streams to the deskew module 704. The listening module 705 listens to the data streams from the elastic buffer 702. If the listening module 705 detects data streams for link switching (such as trigger data streams, response data streams, negotiation response data streams, etc. shown in FIG. 5), the listening module 705 obtains the data streams for link switching from the elastic buffer 702.For example, the listening module 705 identifies whether the data stream is a switch data stream for link switching by switching data stream identification. The switching data stream identification is shown in Table 3, and a detailed description is not repeated. The listening module 705 performs steps 503, 516, and 522 based on the identified data stream. The skew module 704 is used to eliminate the skew between the physical lanes for the data stream from the elastic buffer 702. The distribution module 706 distributes the service data stream from the skew module 704 to each lane. The control module 660 performs step 501 and sends the switching indication information to the link control module 707. The link control module 707 sends the switching instruction to the link control module 707, which switches the source link connection state to the target link connection state according to the switching instruction. The first selection module MUX 708 selects one of the data streams output from the distribution module 706 and the data stream output from the link control module 707 to transmit to the scrambling module 709. The polarity inverter 703 is used to correct the errors by changing the polarity of the signal when the data stream received from the pin 615 is disturbed or attenuated during transmission, thereby recovering the original, correct signal. The second selection module 710 selects one of the data stream from the scrambling module 709, the data stream from the link control module 707, and the data stream from the polarity inverter 703 to send to the pin 612. Then, when the pin 612 receives the data stream from the first lane 631, it is sent to the pin 625 to convert the multiple parallel data streams to a serial high-speed data stream when the second Serdes 631 receives the multiple data streams, and transmit to the third node. The structures of the second lane 632, the third lane 633, and the fourth lane 634 are described in the description of the first lane 631, and a detailed description is not repeated.
[0140] Figure 6 illustrates the Retimer in the source link connection state, the link control module 707 is connected with the control module 660, the first cross module 602 and the second cross module 620 respectively. In order to realize the Retimer switching from the source link connection state to the target link connection state, the link control module included in each channel sends a switching command to the first cross module 602 and the second cross module 620, so that the first cross module 602 and the second cross module 620 change the connection relationship between the pins, thereby realizing the switching from the source link connection state (as shown in Figure 6) to the target link connection state as shown in Figure 8. In Figure 8, the first cross module 602 switches the connection relationship between each pin to pin 611 connected to pin 617, pin 612 connected to pin 618, pin 613 connected to pin 615, and pin 617 connected to pin 616. The second cross module 620 switches the connection relationship between each pin to pin 612 connected to pin 627, pin 622 connected to pin 628, pin 623 connected to pin 625, and pin 624 connected to pin 626. The description of the target link connection state is specifically referred to the corresponding description of Figure 4, and will not be repeated here.
[0141] For example, the first cross module 602 can be a module in the Retimer, or a chip, module or single board independent of the Retimer, and the specific implementation is not limited. The first cross module 602 in the embodiment does not limit the way of turning on or turning off the circuit between different pins, for example, the first cross module 602 can include a register and a cross array. The register is connected to the cross array. The cross array includes each pin of the first cross module 602. The register is connected to the cross array and controls the turning on or turning off of the circuit between each pin in the cross array through software configuration. Specifically, the register includes a plurality of bits, and the bits are used to turn on or turn off the circuit between the pins. The description of the second cross module 620 is specifically referred to the description of the first cross module 602, and will not be repeated here.
[0142] The method for switching links provided in the embodiments of the present application can also be applied to a node failure scenario. FIG. 9 is an example diagram of a connection in which the communication system of FIG. 1 is in a source link connection state and a failure occurs. The communication system shown in FIG. 9 is in a source link connection state. For a specific description of the source link connection state, refer to the corresponding description of FIG. 3, and details are not repeated. In the embodiments shown in the present application, the third node and / or the third node port fail, and therefore the third node and the Retimer cannot perform data stream transceiving. To this end, the Retimer switches the source link connection state shown in FIG. 9 to the target link connection state shown in FIG. 10. FIG. 10 is an example diagram of a connection in which the communication system of FIG. 1 is in a target link connection state and a failure occurs. In the example shown in FIG. 10, the first node port is switched to the fourth node through the Retimer to ensure that the first node port of the first node can normally perform data stream transceiving.
[0143] The process of switching the source link connection state shown in FIG. 9 to the target link connection state shown in FIG. 10 is described in combination with the implementation of the Retimer shown in FIG. 11. FIG. 11 is a step flowchart of a second embodiment of the method for switching links provided in the present application.
[0144] In step 1101, the management node sends switching indication information to the Retimer.
[0145] In the case where the management node detects that the third node fails, the management node sends the switching indication information to the Retimer. The switching indication information is used to indicate the second link and also used to indicate that the third node fails. The manner in which the management node determines that the third node fails is not limited in the embodiments of the present application. For example, if the data stream sent by the first node to the third node through the first link does not receive a response from the third node for more than a preset time period, the first node sends failure indication information to the management node. The failure indication information is used to indicate that the third node fails. For another example, the third node port of the third node fails, but the link between the third node and the management node is normal, and therefore the third node directly sends failure indication information to the management node. The switching indication information shown in the embodiments of the present application is used to indicate the second link between the first port 111 and the fourth port 114 in the Retimer, so that the Retimer turns on the second link between the first port 111 and the fourth port 114 in the Retimer according to the switching indication information, to make the communication system in a target link connection state. The target link connection state indicated by the switching indication information shown in the embodiments of the present application can be seen from Table 4:
[0146] Table 4
[0147] It can be understood that the target link connection state is used to indicate the correspondence between the ID of the first node port, the ID of the first port, the ID of the fourth port and the ID of the fourth node port, and specific description can be referred to the corresponding description in Table 2, and details are not described herein.
[0148] In step 1102, the second node sends a second trigger data stream to the Retimer.
[0149] In step 1103, the Retimer sends a second request data stream to the fourth node.
[0150] The description of the execution process of steps 1102 to 1103 in the embodiment is shown in steps 504 to 505 in FIG. 5, and details are not described herein.
[0151] In step 1104, the Retimer sends a first request data stream to the first node.
[0152] In the embodiment, the third node has failed, and thus the third node cannot send a trigger data stream to the Retimer. Therefore, the Retimer can generate the first request data stream according to the switching indication information from the management node, and send the first request data stream to the Retimer. The description of the content of the first request data stream is shown in step 507 in FIG. 5, and details are not described herein. It can be understood that the Retimer sends the first request data stream to the first node port of the first node through the second interface 212 and the receiving interface 202 in sequence, to request the first node to perform link switching.
[0153] In step 1105, the fourth node sends a fourth trigger data stream to the Retimer.
[0154] In step 1106, the Retimer sends a fourth request data stream to the second node.
[0155] The description of the execution process of steps 1105 to 1106 in the embodiment is shown in steps 508 to 509 in FIG. 5, and details are not described herein.
[0156] In step 1107, the fourth node sends a second response data stream to the Retimer.
[0157] The description of the execution process of step 1107 in the embodiment is shown in step 511 in FIG. 5, and details are not described herein.
[0158] In step 1108, the first node sends a first response data stream to the Retimer.
[0159] The step 1108 shown in this embodiment performs the process, which is shown in the corresponding step 512 in FIG. 5, and details are not repeated here.
[0160] The step 1109 shown in this embodiment performs the process, which is shown in the corresponding step 513 in FIG. 5, and details are not repeated here.
[0161] The step 1109 shown in this embodiment performs the process, which is shown in the corresponding step 513 in FIG. 5, and details are not repeated here.
[0162] The step 1110 shown in this embodiment performs the process, which is shown in the corresponding step 514 in FIG. 5, and details are not repeated here.
[0163] In this embodiment, when the Retimer receives the first response data stream, the second response data stream, and the fourth response data stream, it can be determined that the first node port of the first node, the second node port of the second node, and the fourth node port of the fourth node all agree to perform link switching. Then, the Retimer generates the third negotiation data stream and sends it to the receiving interface included in the first node port of the first node through the second interface of the Retimer. The third negotiation data stream is shown in the corresponding step 514 in FIG. 5, and details are not repeated here.
[0164] The step 1111 shown in this embodiment performs the process, which is shown in the corresponding step 515 in FIG. 5, and details are not repeated here.
[0165] In this embodiment, when the Retimer receives the first response data stream, the second response data stream, and the fourth response data stream, it can be determined that the first node port of the first node, the second node port of the second node, and the fourth node port of the fourth node all agree to perform link switching. Then, the Retimer obtains the second negotiation data stream from the second response data stream from the fourth node. The second negotiation data stream is shown in the corresponding step 515 in FIG. 5, and details are not repeated here.
[0166] The step 1112 shown in this embodiment performs the process, which is shown in the corresponding step 517 in FIG. 5, and details are not repeated here.
[0167] In this embodiment, when the Retimer receives the first response data stream, the second response data stream, and the fourth response data stream, it can be determined that the first node port of the first node, the second node port of the second node, and the fourth node port of the fourth node all agree to perform link switching. Then, the Retimer obtains the fourth negotiation data stream from the fourth response data stream. The fourth negotiation data stream is shown in the corresponding step 517 in FIG. 5, and details are not repeated here.
[0168] Step 1113, the Retimer switches from the source link connection state to the target link connection state.
[0169] When the Retimer successfully sends the second negotiation data stream, the third negotiation data stream and the fourth negotiation data stream, the Retimer switches the link from the source link connection state to the target link connection state. For the description of the Retimer in the target link connection state, please refer to the corresponding description of FIG. 10, and details are not described herein.
[0170] Step 1114, the first node sends the third negotiation response data stream to the Retimer.
[0171] For the description of the process of step 1114 shown in the embodiment, please refer to the description of step 519 shown in FIG. 5, and details are not described herein.
[0172] Step 1115, the Retimer sends the third negotiation response data stream to the fourth node.
[0173] For the description of the process of step 1115 shown in the embodiment, please refer to the description of step 520 shown in FIG. 5, and details are not described herein.
[0174] Step 1116, the fourth node sends the fourth negotiation response data stream to the Retimer.
[0175] For the description of the process of step 1116 shown in the embodiment, please refer to the description of step 525 shown in FIG. 5, and details are not described herein.
[0176] Step 1117, the Retimer sends the fourth negotiation response data stream to the first node.
[0177] For the description of the process of step 1117 shown in the embodiment, please refer to the description of step 526 shown in FIG. 5, and details are not described herein.
[0178] Step 1118, the Retimer returns the switching response information to the management node.
[0179] After the above steps 1114 to 1117, the Retimer determines that the switching from the source link connection state to the target link connection state is successful, and the data transmission between the first node port and the fourth node port can be performed. Then, the Retimer determines that the service data stream transmission can be performed based on the target link connection state. The Retimer returns the switching response information to the management node. When the management node receives the switching response information, it is determined that the target link connection state shown in Table 4 has been created, and then the management node can schedule the services of the communication system based on Table 4.
[0180] Even if the third node fails, the Retimer can switch the connection relationship between the first node and the third node, and connect the first node to the fourth node, so that the first node can normally transmit and receive data, and the reliability of data transmission of the first node through the Retimer is improved.
[0181] The above embodiments show that the first node and the Retimer, the second node and the Retimer, the third node and the Retimer, and the fourth node and the Retimer are connected by cables. The nodes and the Retimer in the embodiments can also be connected by optical fibers. FIG. 12 is a structure diagram of a second embodiment of a communication system provided by the present application. The communication system in the embodiment includes a first node 1200, a second node 1210, a Retimer 1220, a third node 1230, and a fourth node 1240. The first node 1200, the second node 1210, the Retimer 1220, the third node 1230, and the fourth node 1240 are described in FIG. 1 and FIG. 2, and the description is not repeated. The difference between FIG. 12 and FIG. 1 is that the communication system in the embodiment further includes an optical module 1221 and an optical module 1222, the third node 1230 further includes an optical module 1232 connected between the third node port 1231 and the optical module 1221, and the fourth node 1240 further includes an optical module 1242 connected between the fourth node port 1241 and the optical module 1222. The third port of the Retimer 1220 is connected to the optical module 1221 by a cable, and the fourth port of the Retimer 1220 is connected to the optical module 1222 by a cable. The optical module 1221 is connected to the optical module 1232 by an optical fiber 1251. The optical module 1222 is connected to the optical module 1242 by an optical fiber 1252. It can be understood that the embodiment shown in FIG. 12 realizes that the nodes can be connected by optical fibers. The optical modules in the embodiment can also be called optical-electric conversion modules or optical transceiver modules, etc., which are used to realize electrical-optical conversion. For example, the optical module 1221 performs electrical-optical conversion on the electrical signal from the Retimer 1220 to transmit the converted optical signal to the optical module 1232 of the third node 1230 via the optical fiber 1251. The optical module 1232 performs optical-electric conversion on the optical signal from the optical module 1221 to transmit the converted electrical signal to the third node port 1231. The description of the communication system in the embodiment realizing the switching of the link connection state is described in the above embodiments, and the description is not repeated. The third node 1230 and the Retimer 1220 are connected by the optical module in the embodiment, and in other examples, the third node 1230 and the Retimer 1220 can also be connected by a cable, the first node 1200 and the Retimer 1220 are connected by an optical module, and the connection is described in the description of the connection between the third node 1230 and the Retimer 1220 by the optical module, and the description is not repeated.
[0182] Figure 13 is a diagram illustrating an example of a third embodiment of a communication system according to the present application. The communication system of the embodiment shown in Figure 13 comprises a first node 1200, a second node 1210, a Retimer 1220, a third node 1230, and a fourth node 1240. For the first node 1200, the second node 1210, the Retimer 1220, the third node 1230, and the fourth node 1240, refer to the corresponding descriptions of Figure 1 and Figure 2, and no further description is provided herein. The difference between Figure 13 and Figure 12 is that the communication system of the embodiment shown in Figure 13 further comprises an optical module 1303 and an optical module 1304, the first node 1200 further comprises an optical module 1301 connected between the first node port 1201 and the optical module 1303, and the second node 1210 further comprises an optical module 1302 connected between the second node port 1211 and the optical module 1304. The optical module 1301 and the optical module 1303 are connected through an optical fiber 1311. The optical module 1302 and the optical module 1304 are connected through an optical fiber 1312. It can be understood that the embodiment shown in Figure 13 enables the different nodes and the Retimer 1220 to be connected through optical fibers. For the optical modules shown in the embodiment, refer to the corresponding descriptions of Figure 12, and no further description is provided herein.
[0183] The embodiment of the present application provides a switching module. For the structure of the switching module, refer to Figures 6 to 8, and no further description is provided herein.
[0184] The embodiment of the present application provides a node. The node comprises a processor, a system bus, and a node port. The processor is connected to the node port through the system bus. The node of the embodiment can be the first node, the second node, the third node, or the fourth node of the above-mentioned embodiments, and no further description is provided herein. Optionally, the node can further comprise a memory and a DAMC, and for the specific description, refer to the corresponding description of Figure 2, and no further description is provided herein.
[0185] The embodiment of the present application provides a node. The node comprises a processor, a system bus, a node port, and a Retimer. The processor is connected to the node port through the system bus, and the node port is connected to the Retimer.
[0186] The embodiment of the present application provides a node. The node comprises a processor, a system bus, a node port, a Retimer, and an optical module. The processor is connected to the node port through the system bus, and the node port is connected to the Retimer. The port of the Retimer is connected to the optical module.
[0187] The embodiment of the present application provides a node. The node comprises a processor, a system bus, a node port, and an optical module. The processor is connected to the node port through the system bus, and the node port is connected to the optical module.
[0188] The embodiment of the present application further provides a digital processing chip, comprising a processing chip and a memory, the memory and the processing chip are interconnected through a circuit, the memory stores instructions, and the processing chip is used for executing the process performed by the first node, the second node, the third node, the fourth node or the Retimer in any method embodiment.
[0189] The embodiment of the present application further provides a computer storage medium, comprising instructions, when the instructions are executed on a computer, the computer executes the process performed by the first node, the second node, the third node, the fourth node or the Retimer in any method embodiment.
[0190] The embodiment of the present application further provides a computer program product comprising instructions, when the instructions are executed on a computer, the computer executes the process performed by the first node, the second node, the third node, the fourth node or the Retimer in any method embodiment.
[0191] The embodiment of the present application further provides a communication system, comprising a node and a switching module, the node comprises a node port connected with the switching module, the node can be at least one of the first node, the second node, the third node and the fourth node shown in Fig. 1, and the description of the switching module can be referred to the corresponding description of Fig. 1, and details are not described herein.
[0192] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiments, and details are not described herein.
[0193] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0194] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment.
Claims
1. A method of link switching, characterized by, The method is applied to a switching module, the switching module comprising a first port, a second port, a third port and a fourth port, a first link of the switching module being in an on state, the first link comprising the first port and the third port, the first port being connected to a first node, the third port being connected to a third node, the method comprising: The switching module receives switching indication information, the switching indication information being used to turn on a second link, the second link comprising the first port and the fourth port, the fourth port being connected to a fourth node; The switching module receives a first trigger data stream from the third node through the third port and a second trigger data stream from a second node through the second port, the first trigger data stream and the second trigger data stream being respectively used to trigger link switching, the second port being connected to the second node; The switching module changes the first trigger data stream and the second trigger data stream into a first request data stream and a second request data stream respectively according to the switching indication information, and sends the first request data stream to the first node through the first port and the second request data stream to the fourth node through the fourth port, the first request data stream and the second request data stream being respectively used to request link switching; The switching module turns on the second link.
2. The method of claim 1, wherein, After the switching module changes the first trigger data stream and the second trigger data stream into the first request data stream and the second request data stream respectively according to the switching indication information, the method further comprises: The switching module receives a first response data stream from the first node through the first port and a second response data stream from the fourth node through the fourth port, the first response data stream being changed from the first request data stream, the first response data stream being used to respond to the first request data stream, the second response data stream being changed from the second request data stream, the second response data stream being used to respond to the second request data stream; The switching module turns on the second link comprises: The switching module turns on the second link according to the switching indication information, the first response data stream and the second response data stream.
3. The method according to claim 1 or 2, characterized in that, Before the switching module turns on the second link, the method further comprises: The switching module receives a third trigger data stream from the first node through the first port, the third trigger data stream being used to trigger link switching; The switching module changes the third trigger data stream into a third request data stream according to the switching indication information, and sends the third request data stream to the third node through the third port, the third request data stream being used to request link switching; The switching module disconnects the first link according to the switching indication information.
4. The method of claim 3, wherein, The switching module changes the first trigger data stream into a first request data stream according to the switching indication information, and sends the first request data stream to the first node through the first port, and the method further comprises: The switching module receives a third response data stream from the third node through the third port, the third response data stream being changed from the third request data stream, and the third response data stream is used for responding to the third request data stream. The switching module disconnects the first link comprises: The switching module disconnects the first link according to the switching indication information, the first response data stream and the third response data stream, wherein the first response data stream is a response data stream from the first node.
5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: The switching module changes the third response data stream into a negotiation data stream, and sends the negotiation data stream to the first node through the first port, wherein the third response data stream is a response data stream from the third node. The method further comprises: The switching module receives a negotiation response data stream from the first node through the first port, wherein the negotiation response data stream is used for responding to the negotiation data stream. The switching module sends the negotiation response data stream to the fourth node through the fourth port.
6. The method of claim 5, wherein, The negotiation data stream is used for instructing the first node to interrupt the transmission of service data stream between the first node and the switching module.
7. The method according to any one of claims 1 to 6, characterized in that, The first trigger data stream, the first request data stream, the first response data stream and the first negotiation data stream each comprise a switching state field, the first response data stream being changed from the first request data stream, the first negotiation data stream being changed from the first response data stream, and the values of the switching state field in the first trigger data stream, the first request data stream, the first response data stream and the first negotiation data stream being different from each other, wherein the first response data stream is a response data stream from the first node, and the first negotiation data stream is a negotiation data stream sent to the third node.
8. The method according to any one of claims 1 to 7, characterized in that, The switching indication information at least comprises a correspondence between the identity of the first node and the identity of the fourth node.
9. The method according to any one of claims 1 to 8, characterized in that, The switching indication information is also used for indicating that the third node is faulty, and the method further comprises: The switching module generates the second request data stream according to the switching indication information, and sends the second request data stream to the fourth node through the fourth port.
10. The method according to any one of claims 1 to 9, characterized in that, The first trigger data stream comprises a switching data stream identity and a channel number indication, wherein the switching data stream identity is used for identifying the first trigger data stream, and the channel number indication is used for indicating the number of channels supported by the third node.
11. The method according to any one of claims 1 to 10, characterized in that, The switching module is a Retimer, which transmits a first trigger data stream and a service data stream from the third node through different channels.
12. A method of link switching, characterized by, The method is applied to a node connected to a switching module, and the method comprises: The node sends a trigger data stream to the switching module, the trigger data stream being used to trigger link switching; The node receives a request data stream from the switching module, the request data stream being changed from another trigger data stream by the switching module, and the request data stream being used to request link switching.
13. The method of claim 12, wherein, After the node receives the request data stream from the switching module, the method further comprises: The node changes the request data stream into a response data stream, the response data stream being used to respond to the request data stream; The node sends the response data stream to the switching module.
14. The method according to claim 12 or 13, characterized in that, After the node receives the request data stream from the switching module, the method further comprises: The node receives a negotiation data stream from the switching module; The node interrupts transmission of a service data stream between the node and the switching module according to the negotiation data stream.
15. A switching module, characterized by The switching module comprises a processing module, a first port, a second port, a third port and a fourth port, wherein the processing module is connected to the first port, the second port, the third port and the fourth port respectively, a first link of the switching module is in an on state, the first link comprises the first port and the third port, the first port is connected to a first node, and the third port is connected to a third node. The processing module is configured to: receive switching indication information, the switching indication information being used to turn on a second link, the second link comprising the first port and the fourth port, and the fourth port being connected to a fourth node; receive a first trigger data stream from the third node through the third port and a second trigger data stream from a second node through the second port, the first trigger data stream and the second trigger data stream being used to trigger link switching respectively, and the second port being connected to the second node; change the first trigger data stream and the second trigger data stream into a first request data stream and a second request data stream respectively according to the switching indication information, and send the first request data stream to the first node through the first port and send the second request data stream to the fourth node through the fourth port, the first request data stream and the second request data stream being used to request link switching respectively; and turn on the second link.
16. A node, characterized by The node comprises a processor and a node port, and the node port is used to connect a switching module. The processor is configured to send a trigger data stream to the switching module through the node port, the trigger data stream being used to trigger link switching. The processor receives a request data stream from the switching module through the node port, the request data stream being changed from another trigger data stream by the switching module, and the request data stream being used to request link switching.
17. The node of claim 16, wherein, The node further comprises an optical module connected to the node port.
18. A chip system, characterized by The chip system comprises a processor and an input / output interface for receiving data and transmitting to the processor, or sending data from the processor to another chip system, the processor being configured to perform the method of any one of claims 1 to 11, or the method of any one of claims 12 to 14.
19. A computer-readable storage medium, characterized in that, A computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 14.
20. A communication system, characterized by A node comprising a node port connected to a switching module as claimed in claim 15, the node being as claimed in claim 16.