Data sending method, communication device and storage medium
By automatically detecting and closing the luminescence of abnormal channels when the optical module fails, and using the remaining channels to form a low-rate port, the connection disconnection problem between NPU/GPU caused by optical module failure is solved, and the continuity and stability of AI training tasks are achieved.
Patent Information
- Application Number
- CN202410119488.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-27
- Publication Date
- 2025-07-29
AI Technical Summary
When the optical module fails, the device cannot perceive, resulting in the disconnection of the RDMA connection between the NPU/GPU. The optical module needs to be replaced manually to restore the training task, affecting the continuity of the AI training task.
The abnormal channel of the optical module is obtained through the first communication device, and the control information is sent using the remaining channel to instruct the optical module to turn off the light emission of the abnormal channel, notify the counter channel to fail, and form a low-rate port through the remaining channel to achieve the speed reduction effect.
Without interrupting AI training tasks, automatically detect optical module failures and slow down to avoid manual intervention and ensure the continuity and stability of the training tasks.
Smart Images

Figure CN120389797A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of communication technologies, and in particular, to a data sending method, a communication device, and a storage medium. Background Art
[0002] Currently, optical modules are widely used in high-speed interconnections between equipment rooms in data centers. In the current parameter plane network of artificial intelligence (AI) training, mainstream AI servers, neural network processing units (NPUs), or graphics processing units (GPUs) need to be interconnected through optical modules or copper cables.
[0003] Since copper cables support short distances and cannot be deployed across racks, currently, optical modules are mainly used to access servers. And due to the limitations of NPU / GPU capabilities and cost-performance considerations, most NPUs / GPUs can only have one 200-gigabit (G) or 400G network card port. Therefore, as long as the optical module inserted on the NPU / GPU network card port fails, the remote direct memory access (RDMA) connection between the NPU / GPU and other NPUs / GPUs will be disconnected, which will further cause the entire training task to time out and interrupt. It is necessary to manually replace the optical module and then resume training from the previous checkpoint.
[0004] Since a light-emitting device cannot sense when a channel of the light-emitting device fails, while a light-receiving device can sense it, the problem of fault notification between devices needs to be solved urgently. Summary of the Invention
[0005] Embodiments of the present application provide a data sending method, a communication device, and a storage medium for notifying the peer end that a channel has failed when a port fails.
[0006] In a first aspect of the embodiments of the present application, a data sending method is provided. In this method, a first communication device obtains a first channel exception corresponding to a first optical module. The first channel is a channel between the first optical module and a second optical module, and the first optical module is connected to the first communication device.
[0007] The first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data. The M channels are channels between the first optical module and the first communication device. The N channels do not include a second channel, and the second channel is at least one channel corresponding to the first channel among the M channels. N is less than M.
[0008] The first communication device sends control information to the first optical module, and the control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
[0009] In this embodiment, by turning off the light emission corresponding to the first channel, the first communication device causes an abnormal signal to appear in the first channel of the peer end, thereby informing the peer end of a transmission failure in the first channel.
[0010] In some possible embodiments, the channels among the M channels other than the N channels are not used for sending and / or receiving data.
[0011] Specifically, the first communication device shields the channels among the M channels other than the N channels and does not process the data of these channels.
[0012] In some possible embodiments, the port of the first optical module is a 400G port, M is 8, and N is 4, that is, the remaining 4 channels can form a 200G port.
[0013] In some possible embodiments, the control information is further used to instruct the first optical module to turn off the light emission corresponding to the third channel, and the third channel is the channel between the first optical module and the second optical module.
[0014] In some possible embodiments, when an abnormality occurs in the fourth channel, the fourth channel is the channel between the first optical module and the second optical module, and the first communication device uses N channels among the M channels corresponding to the first optical module to send and / or receive data according to the first abnormality information, including:
[0015] If the first channel and the fourth channel meet the speed reduction condition, the first communication device uses N channels among the M channels corresponding to the first optical module to send and / or receive data, and the N channels do not include the fifth channel, and the fifth channel is at least one channel among the M channels corresponding to the fourth channel.
[0016] In this embodiment, the first communication device shields the faulty port and uses the remaining non-abnormal channels to form a low-rate port, so as to achieve the speed reduction effect without interrupting the AI training task.
[0017] In a second aspect of the embodiments of the present application, a data sending method is provided. In this method, the first communication device obtains an abnormality in the first channel corresponding to the first optical module, the first channel is the channel between the first optical module and the second optical module, and the first optical module is connected to the first communication device;
[0018] The first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module, where the M channels are the channels between the first optical module and the first communication device, the N channels do not include a second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M; the first communication device sends a fault message to a controller according to the first exception information, and the fault message is used to indicate that an exception has occurred in the first channel.
[0019] In some possible implementation manners, the fault message includes at least one of the following: first port information, second port information, the number of channels of the first port, and the fault information of the first channel. The first port information includes the port number and the Internet Protocol (IP) address of the first port, the second port information includes the port number and the IP address of the second port, the first port is the local port, and the second port is the peer port.
[0020] In some possible implementation manners, the channels other than the N channels among the M channels are not used for sending and / or receiving data.
[0021] In some possible implementation manners, an exception occurs in a fourth channel, where the fourth channel is the channel between the first optical module and the second optical module. The first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module according to the first exception information, including:
[0022] If the first channel and the fourth channel meet the speed reduction condition, the first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module, and the N channels do not include a fifth channel, where the fifth channel is at least one channel corresponding to the fourth channel among the M channels.
[0023] In a third aspect of the embodiments of the present application, a data sending method is provided. In this method, a second communication device obtains that a second channel corresponding to a second optical module is abnormal, where the first channel is the channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device; the second communication device obtaining that the first channel corresponding to the second optical module is abnormal includes: the second communication device does not receive an optical signal sent by the first optical module through the first channel, and the first optical module actively turns off the light emission corresponding to the first channel.
[0024] The second communication device sends and / or receives data using N channels out of M channels corresponding to the second optical module. The M channels are channels between the second optical module and the second communication device. The N channels do not include the second channel, and the second channel is at least one channel among the M channels corresponding to the first channel. N is less than M.
[0025] In some possible implementation manners, the channels among the M channels other than the N channels are not used for sending and / or receiving data.
[0026] In some possible implementation manners, an exception occurs in the fourth channel. The fourth channel is a channel between the first optical module and the second optical module. The first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data according to the first exception information, including:
[0027] If the first channel and the fourth channel meet the speed reduction condition, the first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data. The N channels do not include the fifth channel, and the fifth channel is at least one channel among the M channels corresponding to the fourth channel.
[0028] In a fourth aspect of the embodiments of the present application, a data sending method is provided. In this method, a second communication device receives fault information from a controller. The fault information is used to indicate that an exception occurs in a first channel. The first channel is a channel between a first optical module and a second optical module. The second optical module is connected to the second communication device;
[0029] The second communication device uses N channels out of M channels corresponding to the second optical module to send and / or receive data according to the fault information. The M channels are channels between the second optical module and the second communication device. The N channels do not include the second channel, and the second channel is at least one channel among the M channels corresponding to the first channel. N is less than M. 13. The method according to claim 12, wherein the fault information includes at least one of the following: first port information, second port information, the number of channels of the first port, and the fault information of the first channel. The first port information includes the port number and the Internet Protocol (IP) address of the first port. The second port information includes the port number and the IP address of the second port. The first port is the local port, and the second port is the peer port.
[0030] In some possible embodiments, the fault information includes at least one of the following: first port information, second port information, the number of channels of the first port, and the fault information of the first channel. The first port information includes the port number and Internet Protocol (IP) address of the first port. The second port information includes the port number and IP address of the second port. The first port is the local port, and the second port is the peer port.
[0031] In some possible embodiments, the channels other than the N channels among the M channels are not used for sending and / or receiving data.
[0032] In some possible embodiments, an exception occurs in the fourth channel, where the fourth channel is the channel between the first optical module and the second optical module. The first communication device uses N channels among the M channels corresponding to the first optical module to send and / or receive data according to the first exception information, including:
[0033] If the first channel and the fourth channel meet the speed reduction condition, the first communication device uses N channels among the M channels corresponding to the first optical module to send and / or receive data, and the N channels do not include the fifth channel, where the fifth channel is at least one channel among the M channels corresponding to the fourth channel.
[0034] In a fifth aspect of the embodiments of the present application, a data sending method is provided. In this method, the first optical module turns off the signal of the second channel, or sends the signal received through the first channel to the first communication device through the second channel. The first channel is the channel between the first optical module and the second optical module. The first optical module is connected to the first communication device. The second channel is at least one channel among the M channels corresponding to the first channel, and the M channels are the channels between the first optical module and the first communication device;
[0035] The first optical module uses N channels among the M channels to receive and / or send data, and the N channels do not include the second channel, where N is less than M;
[0036] The first optical module receives control information from the first communication device, and the second control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
[0037] In a sixth aspect of the embodiments of the present application, a data sending method is provided. In this method, the second optical module turns off the signal of the second channel, or sends the signal received through the first channel to the second communication device through the second channel. The first channel is the channel between the first optical module and the second optical module, the second optical module is connected to the second communication device, the second channel is at least one channel corresponding to the first channel among M channels, and the M channels are the channels between the second optical module and the second communication device;
[0038] The second optical module uses N channels among the M channels to receive and / or send data, the N channels do not include the second channel, and N is less than M.
[0039] In some possible implementation manners, the channels among the M channels other than the N channels are not used for sending and / or receiving data.
[0040] In a seventh aspect of the embodiments of the present application, a data sending method is provided. In this method, the controller receives fault information from the first communication device, and the fault information is used to indicate that the first channel has an abnormality. The controller sends the fault information to the second communication device.
[0041] In an eighth aspect of the embodiments of the present application, a communication device is provided, including:
[0042] An obtaining unit, configured to obtain that the first channel corresponding to the first optical module has an abnormality. The first channel is the channel between the first optical module and the second optical module, and the first optical module is connected to the first communication device;
[0043] A processing unit, configured to use N channels among the M channels corresponding to the first optical module to send and / or receive data. The M channels are the channels between the first optical module and the first communication device, the N channels do not include the second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M;
[0044] A sending unit, configured to send control information to the first optical module, and the control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
[0045] In a ninth aspect of the embodiments of the present application, a communication device is provided, including:
[0046] An obtaining unit, configured to obtain that the first channel corresponding to the first optical module has an abnormality. The first channel is the channel between the first optical module and the second optical module, and the first optical module is connected to the first communication device;
[0047] A processing unit is configured to send and / or receive data using N channels out of M channels corresponding to the first optical module, where the M channels are channels between the first optical module and the first communication device, the N channels do not include a second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M; the first communication device sends a fault message to a controller according to the first exception information, and the fault message is used to indicate that an exception has occurred in the first channel.
[0048] A tenth aspect of the embodiments of the present application provides a communication device, including:
[0049] An acquisition unit is configured to acquire an exception of a second channel corresponding to a second optical module, where the first channel is a channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device; the second communication device acquiring an exception of the first channel corresponding to the second optical module includes: the second communication device does not receive an optical signal sent by the first optical module through the first channel, and the first optical module actively turns off the light emission corresponding to the first channel.
[0050] A processing unit is configured to send and / or receive data using N channels out of M channels corresponding to the second optical module, where the M channels are channels between the second optical module and the second communication device, the N channels do not include the second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M.
[0051] An eleventh aspect of the embodiments of the present application provides a communication device, including:
[0052] A receiving unit is configured to receive a fault message from a controller, where the fault message is used to indicate that an exception has occurred in a first channel, the first channel is a channel between a first optical module and a second optical module, and the second optical module is connected to the second communication device;
[0053] A processing unit is configured to send and / or receive data using N channels out of M channels corresponding to the second optical module according to the fault message, where the M channels are channels between the second optical module and the second communication device, the N channels do not include a second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M.
[0054] A twelfth aspect of the embodiments of the present application provides an optical module, including:
[0055] A processing unit, configured to turn off the signal of the second channel, or send the signal received through the first channel to a first communication device through the second channel, where the first channel is a channel between the first optical module and the second optical module, the first optical module is connected to the first communication device, the second channel is at least one channel corresponding to the first channel among M channels, and the M channels are channels between the first optical module and the first communication device;
[0056] An interface unit, configured to receive and / or send data using N channels among the M channels, where the N channels do not include the second channel, and N is less than M;
[0057] The interface unit is further configured to receive control information from the first communication device, where the second control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
[0058] A thirteenth aspect of the embodiments of the present application provides an optical module, including:
[0059] A processing unit, configured to turn off the signal of the second channel, or send the signal received through the first channel to a second communication device through the second channel, where the first channel is a channel between the first optical module and the second optical module, the second optical module is connected to the second communication device, the second channel is at least one channel corresponding to the first channel among M channels, and the M channels are channels between the second optical module and the second communication device;
[0060] An interface unit, configured to receive and / or send data using N channels among the M channels, where the N channels do not include the second channel, and N is less than M.
[0061] A fourteenth aspect of the embodiments of the present application provides a communication device, including:
[0062] A processor, configured to execute a program, so that the communication device executes the method described in the first aspect, the second aspect, the third aspect, or the fourth aspect and any possible implementation manner thereof in the foregoing claims.
[0063] Optionally, the communication device further includes a memory, and the processor is coupled to the memory; the memory is used to store a program.
[0064] A fifteenth aspect of the embodiments of the present application provides an optical module, including:
[0065] A processor, configured to execute a program, so that the optical module executes the method described in the fifth aspect or the sixth aspect and any possible implementation manner thereof in the foregoing claims.
[0066] Optionally, the optical module further includes a memory, and the processor is coupled to the memory; the memory is used for storing programs.
[0067] The sixteenth aspect of the embodiments of the present application provides a data sending system, including a communication device that executes the communication device described in the foregoing first aspect and any one of its possible implementation manners, and a communication device that executes the communication device described in the foregoing third aspect and any one of its possible implementation manners, and a communication device that executes the communication device described in the foregoing fifth aspect and any one of its possible implementation manners, and a communication device that executes the communication device described in the foregoing sixth aspect and any one of its possible implementation manners;
[0068] Or,
[0069] a communication device that executes the communication device described in the foregoing second aspect and any one of its possible implementation manners, and a communication device that executes the communication device described in the foregoing fourth aspect and any one of its possible implementation manners, and a communication device that executes the communication device described in the foregoing seventh aspect and any one of its possible implementation manners.
[0070] The seventeenth aspect of the embodiments of the present application provides a computer-readable storage medium, including instructions, when the instructions run on a computer, causing the computer to execute the method described in the foregoing first aspect, or causing the computer to execute the method described in the foregoing second aspect, or causing the computer to execute the method described in the foregoing third aspect, or causing the computer to execute the method described in the foregoing fourth aspect, or causing the computer to execute the method described in the foregoing fifth aspect, or causing the computer to execute the method described in the foregoing sixth aspect.
[0071] The eighteenth aspect of the embodiments of the present application provides a computer program product containing instructions, when it runs on a computer, causing the computer to execute the method described in the foregoing first aspect, or causing the computer to execute the method described in the foregoing second aspect, or causing the computer to execute the method described in the foregoing third aspect, or causing the computer to execute the method described in the foregoing fourth aspect, or causing the computer to execute the method described in the foregoing fifth aspect, or causing the computer to execute the method described in the foregoing sixth aspect. Description of the Drawings
[0072] Figure 1 It is a system architecture diagram in the embodiments of the present application;
[0073] Figure 2 It is a schematic diagram of an embodiment of the interaction of optical modules in the embodiments of the present application;
[0074] Figure 3 It is a schematic diagram of an embodiment of the data sending method in the embodiments of the present application;
[0075] Figure 4 It is a schematic diagram of an embodiment of the first optical module in the embodiments of the present application;
[0076] Figure 5 Another schematic diagram of an embodiment of the data sending method in the embodiments of the present application;
[0077] Figure 6 A schematic diagram of an embodiment of a communication device in the embodiments of the present application;
[0078] Figure 7 Another schematic diagram of an embodiment of a communication device in the embodiments of the present application;
[0079] Figure 8 A schematic diagram of an embodiment of a neural network processing unit in the embodiments of the present application;
[0080] Figure 9 Another schematic diagram of an embodiment of a communication device in the embodiments of the present application. Detailed implementation manners
[0081] The embodiments of the present application provide a data sending method, a communication device, and a storage medium, which are applied to the field of communication technologies and are used to notify the peer end that a channel fails when a port fails.
[0082] The embodiments of the present application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art can understand that with the development of technologies and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0083] Terms such as "first" and "second" in the specification, claims, and drawings of the present application are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing objects with the same attributes when describing the embodiments of the present application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product, or device including a series of units does not necessarily have to be limited to those units, but may include other units that are not clearly listed or are inherent to these processes, methods, products, or devices.
[0084] In the present application, "for indicating" may include for directly indicating and for indirectly indicating. When it is described that a certain indication information is used to indicate A, it may include that the indication information directly indicates A or indirectly indicates A, and it does not mean that A must be carried in the indication information.
[0085] In addition, the specific indication method can also be various existing indication methods, such as, but not limited to, the above-mentioned indication methods and their various combinations, etc. The specific details of various indication methods can refer to the prior art and will not be elaborated herein. As can be seen from the above description, for example, when multiple pieces of information of the same type need to be indicated, it may occur that the indication methods of different pieces of information are different. In the specific implementation process, the required indication method can be selected according to specific needs. The embodiments of the present application do not limit the selected indication method. In this way, the indication methods involved in the embodiments of the present application should be understood to cover various methods that can enable the party to be indicated to obtain the information to be indicated.
[0086] In the embodiments of the present application, descriptions such as "when...", "in the case of...", "if", and "when" all refer to that the device will perform corresponding processing under a certain objective situation, which does not limit the time, and does not require the device to have a judgment action during implementation, nor does it mean the existence of other limitations.
[0087] Please refer to Figure 1 , and the system architecture on which the data sending method in the embodiments of the present application is based will be briefly described below:
[0088] In this system architecture, the communication device 101 is connected to multiple communication devices 102. The communication device 101 and the communication device 102 are interconnected through optical modules. Specifically, the communication device 101 includes multiple interfaces, and the optical module 104 can be inserted into any one of the multiple interfaces to realize the connection between the communication device 101 and the optical module 104. The communication device 102 includes one interface, and the optical module 103 can be inserted into this interface to realize the connection between the communication device 101 and the optical module 103. The optical module 103 and the optical module 104 are connected through an optical fiber, so as to realize the interconnection between the communication device 101 and the communication device 102 through the optical module.
[0089] It should be understood that after the optical module is inserted into the interface of the communication device 101, the optical module and the communication device 101 have a connection relationship, and it is the optical module connected by the communication device 101, which is hereinafter referred to as the "optical module of the communication device 101" for short.
[0090] It should be understood that the optical module may itself be a part of the components of the communication device 101. At this time, the meaning of the "optical module of the communication device 101" in the following text is that the communication device 101 includes the component optical module.
[0091] It should be understood that the communication device 101 can be a network device such as a switch, a router, a virtual switch, a virtual router, a packet transport network (PTN) device, or an optical transport network (OTN) device. The present application does not limit the device form of the communication device 101.
[0092] It should be understood that the communication device 102 can be an NPU, a GPU, a network card in a server, or the server itself carried by an NPU or a GPU. The present application does not limit the device form of the communication device 102.
[0093] It should be understood that the communication device 102 may also be a network device such as a switch, a router, a virtual switch, a virtual router, a packet transport network (PTN) device, or an optical transport network (OTN) device. For example, in a data center network, the communication device 101 can be a spine switch, and the communication device 102 can be a leaf switch.
[0094] In a possible implementation, the communication device 101 and the communication device 102 can be interconnected using other communication devices, which can perform the functions of optical - electrical conversion and / or data transmission. The specific details are not limited here.
[0095] Please refer to Figure 2 , Figure 2A scenario of interconnection between optical module 103 and optical module 104 is shown. Among them, the optical module 103 includes a transmitter optical subassembly (TOSA), a receiver optical subassembly (ROSA), and an optical digital signal processing (oDSP) module. The main function of the TOSA is to convert an electrical signal into an optical signal, and usually includes optical devices such as a laser. The main function of the ROSA is to convert the optical signal transmitted from the peer TOSA into an electrical signal. It consists of a photodiode, an optical interface, a metal or plastic housing, and an electrical interface. Similar to the TOSA, the specific components of the ROSA depend on the specific functions and applications of the optical module, and it may also have other components such as an amplifier, which is designed to recover the input signal deteriorated due to long-distance transmission. The oDSP module can be used to modulate and demodulate the laser signal, thereby improving the data transmission speed.
[0096] Based on the above architecture, the present application proposes a data transmission method. Hereinafter, taking the optical module of the communication device 101 failing as an example for introduction, when one or more channels in the optical module of the communication device 101 fail, the communication device 102 senses the abnormality. The communication device 102 uses N channels out of the M channels between the optical modules to receive and / or transmit data, and indicates that there is an abnormal channel at the peer end (for the communication device 102, the peer end is the communication device 101; for the communication device 101, the peer end is the communication device 102).
[0097] It should be understood that in the data transmission method proposed by the present application, it can also be that one or more channels in the optical module of the communication device 102 fail. After the communication device 101 senses the abnormality, the communication device 101 indicates that there is an abnormal channel at the peer end. That is to say, the solution implemented by the communication device 101 can also be implemented by the communication device 102. At this time, the solution implemented by the communication device 102 is implemented by the communication device 101.
[0098] In the embodiments of the present application, there are two ways to indicate that there is an abnormal channel at the peer end, which will be described separately below:
[0099] It should be understood that the steps executed by the first communication device, the second communication device, the first optical module, and the second optical module in this method can also be executed by some of the components (such as a processor, a chip, or a chip system, etc.), or this method can also be implemented by a logic module or software that can implement all or part of the functions.
[0100] The first communication device in this method can be Figure 1The communication device 102 therein. At this time, the first optical module is the optical module 103, and the second communication device can be Figure 1 The communication device 101 therein. At this time, the second optical module is the optical module 104.
[0101] 1. Indicate by turning off the light emission corresponding to the abnormal channel;
[0102] Please refer to Figure 3 , a data sending method in an embodiment of the present application includes:
[0103] 301. The first communication device obtains that a first channel corresponding to the first optical module is abnormal. The first channel is a channel between the first optical module and the second optical module, and the first optical module is connected to the first communication device;
[0104] In this embodiment, the second communication device sends data to the first communication device through the second optical module, and the first communication device receives the data sent by the second communication device through the first optical module. Specifically, multiple channels are established between the first optical module and the second optical module for sending and / or receiving data. For example, 8 channels are established between the first optical module and the second optical module (for example, it can be Figure 2(The channel between the TOSA of the communication device 101 and the ROSA of the communication device 102) can achieve data transmission at a rate of 400 Gbps. For the first channel among them, the first channel connects a first optical module and a second optical module. The second optical module includes an interface connecting to the first channel, and the first optical module includes an interface connecting to the first channel. The second optical module can control the light emission corresponding to the first channel through a laser to achieve data transmission, that is to say, control data transmission. The first optical module, as the other end of the first channel, can also receive the optical signal transmitted through the first channel to achieve data reception. Of course, for one channel, it can both achieve data sending and data reception. That is to say, the second optical module can send data to the first optical module through the first channel. At this time, the first optical module receives the data sent by the second optical module through the first channel. The first optical module can also send data to the second optical module through the same first channel. At this time, the second optical module receives the data sent by the first optical module through the first channel. If for one channel, it can only achieve data sending, it does not affect the implementation of the embodiments of the present application. In a specific implementation, there will be a corresponding other channel to achieve data reception. For example, the second optical module sends data to the first optical module through the first channel, and the first optical module receives the data sent by the second optical module through the first channel. The first optical module sends data to the second optical module through another channel corresponding to the first channel, and the second optical module receives the data sent by the first optical module through this channel.
[0105] There are various implementation manners for the first communication device to obtain that the first channel corresponding to the first optical module is abnormal:
[0106] The first implementation manner: When an abnormality occurs in the second optical module connected to the second communication device, for example, the laser ages and fails, resulting in a decrease in the light emission power corresponding to the first channel or no light emission. At this time, the first optical module connected to the first communication device will sense that the corresponding first channel is abnormal and turn off the signal sent to the first communication device. Specifically, turn off the signal of the channel corresponding to the first channel between the first communication device and the first optical module. If the first communication device does not receive the signal of the channel corresponding to the first channel between the first communication device and the first optical module, it is determined that the first channel is abnormal. This step can be implemented by the Figure 2 oDSP module in.
[0107] The second implementation method: when an abnormality occurs in the second optical module connected to the second communication device, for example, a laser aging failure, which causes the optical emission power corresponding to the first channel to decrease. At this time, the signal received by the first optical module connected to the first communication device is transparently transmitted to the first communication device. Specifically, the transparent transmission here includes an optoelectronic conversion operation. Specifically, it is transmitted through the channel corresponding to the first channel between the first communication device and the first optical module. After the first communication device receives the signal and determines that the signal quality is poor, it determines that the first channel is abnormal. This step can be implemented by Figure 2 the oDSP module in
[0108] In a specific implementation method, after the first communication device obtains the abnormality of the first channel corresponding to the first optical module, the port corresponding to the first optical module in the first communication device enters the DOWN state.
[0109] 302. The first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data. The M channels are the channels between the first optical module and the first communication device. The N channels do not include the second channel, and the second channel is at least one channel corresponding to the first channel among the M channels. N is less than M;
[0110] After the first communication device obtains the abnormality of the first channel corresponding to the first optical module, it determines that the first channel corresponding to the first optical module it is connected to has an abnormality and cannot use all the channels between the first optical module and the second optical module, such as 8 channels, to perform data transmission. Therefore, it uses some channels that do not include the abnormal channel to perform data transmission.
[0111] In a specific implementation method, there are M channels between the first communication device and the first optical module (for example, it can be the channels between the TOSA of communication device 101 and the ROSA of communication device 102 in Figure 2 ), and there are X channels between the first optical module and the second optical module (for example, it can be the channels between the ODSP chip and the ASIC chip of communication device 102 in Figure 2 ). In one implementation method, X = M. In another implementation method, X may not be equal to M. There is a corresponding relationship between the M channels between the first communication device and the first optical module and the X channels between the first optical module and the second optical module. For example, X = 8 and M = 16. At this time, 2 channels between the first communication device and the first optical module correspond to one channel between the first optical module and the second optical module. The present application does not limit the numbers of X and M.
[0112] In a specific implementation, the first communication device sends and / or receives data using N out of M channels corresponding to the first optical module. In other words, the first communication device does not send and / or receive data using the channels among the M channels other than the N channels. The specific implementation is that the first communication device shields the channels among the M channels corresponding to the first optical module other than the N channels, and does not shield the N channels. The N channels do not include the second channel, and the second channel is at least one channel among the M channels corresponding to the first channel. The N is less than the M. That is to say, the first communication device sends data to the first optical module through the N channels, and the first optical module receives data through the N channels. At this time, the first communication device uses some channels to send data to the first optical module. Then, the data is sent to the second optical module through Y channels corresponding to the N channels, and the Y channels are the channels between the first optical module and the second optical module. The Y channels do not include the first channel, thereby realizing that the first optical module sends data using some channels that do not include the abnormal first channel.
[0113] In a specific implementation, the third channel also has an abnormality. The third channel is the channel between the first optical module and the second optical module. The first communication device uses N out of M channels corresponding to the first optical module to send and / or receive data according to the first abnormality information, including:
[0114] The first communication device uses N out of M channels corresponding to the first optical module to send and / or receive data. The N channels do not include the fourth channel, and the fourth channel is at least one channel among the M channels corresponding to the third channel.
[0115] In a specific implementation, the method also needs to perform a judgment on the speed reduction condition. The speed reduction condition includes determining whether the rate corresponding to the non-abnormal channels meets the first rate. The first rate is a predefined port rate that is compatible with the standard, such as 200 Gbps. Meeting means that the rate corresponding to the non-abnormal channels is greater than or equal to the first rate.
[0116] Specifically, after the first communication device obtains the anomaly of the first channel corresponding to the first optical module, it will determine whether the rate corresponding to the remaining non-anomalous channels meets the first rate. Among them, the non-anomalous channels are the channels other than the first channel. The non-anomalous channels can be all channels other than the first channel, or can be some channels other than the first channel. For example, the rate of the port of the first communication device is 400 Gbps. It can also be said that the rate of the first optical module is 400 Gbps. In the case of X = 8, which includes channels 0 to 7, and the first channel is channel 6. At this time, one channel corresponds to a rate of 50 Gbps. The non-anomalous channels can be all channels other than the first channel, that is, the remaining 7 channels, and the corresponding rate is 350 Gbps, which meets the requirement of the first rate of 200 Gbps. For another example, the non-anomalous channels can be some channels other than the first channel, which can be 4 channels other than the first channel. For example, they can be channels 0, 1, 2, and 3. At this time, the rate corresponding to these 4 channels is 200 Gbps, which also meets the requirement of the first rate of 200 Gbps.
[0117] Specifically, after the first communication device obtains the anomalies of both the first channel and the third channel corresponding to the first optical module, it will determine whether the rate corresponding to the remaining non-anomalous channels meets the first rate. Among them, the non-anomalous channels are the channels other than the first channel and the third channel. The non-anomalous channels can be all channels other than the first channel and the third channel, or can be some channels other than the first channel and the third channel. Specifically, the method for determining whether the rate corresponding to the remaining non-anomalous channels meets the first rate is the same as the method determined after only the first channel is anomalous, and will not be elaborated here. Optionally, the non-anomalous channels are multiple adjacent channels in position. It can also be said that the non-anomalous channels are multiple channels with consecutive channel numbers. Optionally, the non-anomalous channels include the first channel or the last channel. Here, the first or the last can represent the head or the tail of the position, or can represent the smallest or the largest of the numbers. For example, in the case of 8 channels, the first channel can be channel 0, and the last channel can be channel 7.
[0118] It should be understood that in the above implementation method, when determining that the rate corresponding to the non-anomalous channels meets the first rate, it can also be determined whether the rate corresponding to the non-anomalous channels in the channels between the first communication device and the first optical module meets the first rate. The specific implementation can refer to the above implementation method and will not be elaborated here.
[0119] Exemplarily, since a 200 Gbps port requires 4 channels for data transmission, the first optical module allows at most 4 channels to fail, and the remaining 4 channels can form a 200 Gbps port. As Figure 4As shown, if the first channel is channel 6 and the third channel is channel 5, the first channel and the third channel meet the speed reduction condition, and the first communication device may instruct the first optical module to reduce the speed.
[0120] Exemplarily, when the first communication device is an NPU, the rate of the NPU port is 400 Gbps. In other words, the rate of the first optical module connected to the NPU is 400 Gbps. After the NPU obtains that the first channel corresponding to the first optical module is abnormal, the NPU switches the port rate from 400 Gbps to 200 Gbps. There are 8 channels between the first optical module and the second optical module, including channels 0 to 7, and the first channel is channel 6. There are 8 channels between the NPU and the first optical module. For example, channels A to H, where channel 6 corresponds to channel G. The NPU shields channels E, F, G, and H among channels A to H, and uses channels A, B, C, D to send data. The port rate is reduced from 400 Gbps to 200 Gbps, and the first optical module also uses channels 0, 1, 2, and 3 corresponding to channels A, B, C, D to send data, reducing the transmission rate of the optical module to 200 Gbps.
[0121] 303. The first communication device sends control information to the first optical module, which is used to instruct the first optical module to turn off the light emission corresponding to the first channel, or actively adjust the optical signal corresponding to the first channel to a first abnormal signal.
[0122] Wherein, the first abnormal signal includes a signal with low luminous power.
[0123] For example, in the above example, the NPU sends control information to the first optical module, which is used to instruct the first optical module to turn off the light emission corresponding to channel 7.
[0124] In a possible implementation manner, the control information may further instruct the first optical module to turn off the light emission corresponding to the third channel among the M channels, and the third channel does not belong to any of the N channels. For example, the control information may instruct the first optical module to turn off the light emissions corresponding to channels 6 and 7 in the above example, where channel 7 is the third channel and channel 6 is the first channel.
[0125] It should be understood that the control information may of course also instruct the first optical module to turn off the light emissions corresponding to other channels among the M channels, as long as turning off the light emissions of the channels does not affect data transmission, it is within the protection scope of this application. For example, in the above example, it is feasible to turn off channels 4, 5, 6, 7. This step may be implemented by Figure 2 the oDSP module in.
[0126] It should be noted that the control information can be included in the message sent by the first communication device to the first optical module, or carried in the signal or instruction sent by the first communication device to the first optical module. Specifically, it is not limited here.
[0127] It should be understood that in the embodiments of the present application, the ports corresponding to the first optical module and the second optical module are 200Gbps / 400Gbps. In some possible implementation manners, the ports of the optical module can also support other rates. Specifically, it is not limited here.
[0128] 304. The second communication device obtains that the first channel corresponding to the second optical module is abnormal. The first channel is the channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device. The second communication device obtaining that the first channel corresponding to the second optical module is abnormal includes: the second communication device does not receive the optical signal sent by the first optical module through the first channel, the first optical module actively turns off the light emission corresponding to the first channel, or the second communication device receives the first abnormal signal sent by the first optical module through the first channel.
[0129] Wherein, the first abnormal signal includes a signal with low luminous power.
[0130] 305. The second communication device uses N channels out of M channels corresponding to the second optical module to send and / or receive data. The M channels are the channels between the second optical module and the second communication device. The N channels do not include the second channel, and the second channel is at least one channel corresponding to the first channel among the M channels. N is less than M.
[0131] For the specific implementation manner of step 305, reference can be made to step 302. At this time, the steps implemented by the first communication device in step 302 are implemented by the second communication device, and the steps implemented by the first optical module are implemented by the second optical module. Specifically, it will not be elaborated here.
[0132] Optionally, 306. The second communication device sends control information to the second optical module to instruct the second optical module to turn off the light emission corresponding to the first channel, or actively adjust the optical signal corresponding to the first channel to the first abnormal signal. This step can be implemented by Figure 2 the oDSP module and the TOSA module in
[0133] After both the first communication device and the second communication device use N normal channels to transmit data, that is to say, after both the first communication device and the second communication device use non-abnormal channels to transmit data, the two communication devices negotiate normally to make the ports of the communication devices resume the UP state and work properly.
[0134] In the embodiments of the present application, since the first communication device and the second communication device can send data by using some channels in the optical module to reduce the speed, it is possible to avoid the interruption of the AI training task caused by the DOWN state of the port and the unavailable link between the ports due to the failure of one or more channels, thereby improving the training performance and the performance of the AI service.
[0135] In a possible implementation manner, after the first communication device or the second communication device obtains that the corresponding optical module is abnormal, it will feedback the abnormal information to the user. After the training task ends or the relevant training content is saved, the first communication device or the second communication device can prompt the user to replace the optical module. Exemplarily, when the second optical module of the switch is removed, all channels of the first optical module of the NPU cannot receive optical signals and an abnormality occurs. At this time, the NPU restores multiple shielded channels. When the second optical module is reinstalled to the switch and then initialized, the light emission corresponding to all channels in the second optical module is turned on, and all channels of the first optical module can receive optical signals, and the two ends negotiate to resume the UP state.
[0136] Second, indicate by sending a fault message to the controller;
[0137] Please refer to Figure 5 , a data sending method in the embodiments of the present application. In this method, for the connection relationship between the first communication device and the first optical module, the connection relationship between the second communication device and the second optical module, the description of the channels between the first optical module and the second optical module, the description of the channels between the first communication device and the first optical module, and the description of the channels between the second communication device and the second optical module, all can refer to the relevant parts in the above embodiments. The method includes:
[0138] 501. The first communication device obtains that the first channel corresponding to the first optical module is abnormal. The first channel is the channel between the first optical module and the second optical module, and the first optical module is connected to the first communication device; this step can be implemented by Figure 2 the oDSP module in
[0139] 502. The first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module. The M channels are the channels between the first optical module and the first communication device. The N channels do not include the second channel, where the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M.
[0140] For the specific implementation manners of steps 501 and 502 in this embodiment, reference may be made to the implementation manners of steps 301 and 302 in the foregoing Figure 3 illustrated embodiment, and details are not described herein again.
[0141] 503. The first communication device sends fault information to the controller, where the fault information is used to indicate that the first channel has an abnormality.
[0142] The first communication device generates fault information and reports it to the controller. The fault information includes one or more of the first port information, the second port information, the number of channels of the first port, and the fault information of the first channel. Among them, the first port information includes the port number and IP address of the local port, and the second port information includes the port number and IP address of the peer port. It should be understood that the fault information may also include other information for indicating the port or the first channel, and details are not limited herein.
[0143] In a possible implementation manner, the link layer discovery protocol (LLDP) is enabled between the first communication device and the second communication device. This protocol is used to enable devices in the network to discover each other and announce the device and port information of other connected devices to the devices.
[0144] In a possible implementation manner, the first communication device and the second communication device are connected to the controller through the management plane or the service plane network. The fault information is sent through the service plane or the management plane network.
[0145] 504. The second communication device receives the fault information from the controller, where the fault information is used to indicate that the first channel has an abnormality. The first channel is the channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device.
[0146] The controller notifies the second communication device of the fault information through the management plane or the service plane network, and the second communication device receives the fault information from the controller.
[0147] Specifically, after the second communication device receives the fault information from the controller, the second communication device determines that the first channel is abnormal.
[0148] 505. The second communication device uses N channels out of M channels corresponding to the second optical module to send and / or receive data according to the fault information. The M channels are channels between the second optical module and the second communication device. The N channels do not include a second channel, and the second channel is at least one channel in the M channels corresponding to the first channel. N is less than M.
[0149] The specific implementation manner of step 505 in this embodiment may refer to the implementation manner of step 305 in the foregoing Figure 3 illustrated embodiment, and will not be specifically described herein.
[0150] The data sending method in the embodiments of the present application has been described above. Next, the communication device in the embodiments of the present application will be described. In a possible implementation manner, Figure 6 the illustrated communication device 600 may execute the method steps performed by the first communication device as Figure 3 illustrated. The communication device 600 includes:
[0151] An interface unit 601, configured to obtain an abnormality of a first channel corresponding to a first optical module. The first channel is a channel between the first optical module and a second optical module, and the first optical module is connected to the first communication device;
[0152] A processing unit 602, configured to use N channels out of M channels corresponding to the first optical module to send and / or receive data. The M channels are channels between the first optical module and the first communication device. The N channels do not include a second channel, and the second channel is at least one channel in the M channels corresponding to the first channel. N is less than M;
[0153] The interface unit 601 is further configured to send control information to the first optical module, and the control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
[0154] In a possible implementation manner, Figure 6 the illustrated communication device 600 may execute the method steps performed by the second communication device as Figure 3 illustrated. The communication device 600 includes:
[0155] An interface unit 601, configured to obtain an abnormality of a first channel corresponding to a first optical module. The first channel is a channel between the first optical module and a second optical module, and the first optical module is connected to the first communication device;
[0156] A processing unit 602 is configured to send and / or receive data using N channels out of M channels corresponding to the first optical module, where the M channels are channels between the first optical module and the first communication device, the N channels do not include a second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M; the first communication device sends a fault message to a controller according to the first exception information, and the fault message is used to indicate that an exception has occurred in the first channel.
[0157] In a possible implementation manner, Figure 6 the shown communication device 600 may execute the method steps performed by the first communication device as Figure 5 shown. The communication device 600 includes:
[0158] An interface unit 601 is configured to obtain an exception of a second channel corresponding to a second optical module, where the first channel is a channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device; the second communication device obtaining an exception of the first channel corresponding to the second optical module includes: the second communication device does not receive an optical signal sent by the first optical module through the first channel, and the first optical module actively turns off the light emission corresponding to the first channel.
[0159] A processing unit 602 is configured to send and / or receive data using N channels out of M channels corresponding to the second optical module, where the M channels are channels between the second optical module and the second communication device, the N channels do not include the second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M.
[0160] In a possible implementation manner, Figure 6 the shown communication device 600 may execute the method steps performed by the second communication device as Figure 5 shown. The communication device 600 includes:
[0161] An interface unit 601 is configured to receive a fault message from a controller, where the fault message is used to indicate that an exception has occurred in the first channel, the first channel is a channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device;
[0162] A processing unit 602 is configured to send and / or receive data using N channels out of M channels corresponding to the second optical module according to the fault message, where the M channels are channels between the second optical module and the second communication device, the N channels do not include the second channel, the second channel is at least one channel corresponding to the first channel among the M channels, and N is less than M.
[0163] In a possible implementation, Figure 7 the illustrated optical module 700 can perform the method steps executed by the first optical module as Figure 3 or Figure 5 illustrated. The optical module 700 includes:
[0164] A processing unit 702, configured to turn off the signal of the second channel, or send the signal received through the first channel to a first communication device through the second channel, where the first channel is a channel between the first optical module and the second optical module, the first optical module is connected to the first communication device, the second channel is at least one channel corresponding to the first channel among M channels, and the M channels are channels between the first optical module and the first communication device;
[0165] An interface unit 701, configured to receive and / or send data using N channels among the M channels, where the N channels do not include the second channel, and N is less than M;
[0166] The interface unit 701 is further configured to receive control information from the first communication device, where the second control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
[0167] In a possible implementation, Figure 7 the illustrated optical module 700 can perform the method steps executed by the second optical module as Figure 3 or Figure 5 illustrated. The optical module 700 includes:
[0168] A processing unit 702, configured to turn off the signal of the second channel, or send the signal received through the first channel to a second communication device through the second channel, where the first channel is a channel between the first optical module and the second optical module, the second optical module is connected to the second communication device, the second channel is at least one channel corresponding to the first channel among M channels, and the M channels are channels between the second optical module and the second communication device;
[0169] An interface unit 701, configured to receive and / or send data using N channels among the M channels, where the N channels do not include the second channel, and N is less than M.
[0170] An embodiment of the present application includes a data sending system, including a communication device that executes steps 301 to 303 as Figure 3 and a communication device that executes steps 304 to 306 as Figure 3 illustrated;
[0171] Or,
[0172] A communication device that executes steps 501 to 503 as in Figure 5 and a communication device that executes steps 504 to 505 as in Figure 5 .
[0173] Exemplarily, please refer to Figure 8 , Figure 8 which is a schematic structural diagram of an NPU provided by an embodiment of the present application, and may specifically be embodied as a neural network processor NPU 800. The NPU 800 is mounted on a main CPU (Host CPU) as a coprocessor, and tasks are allocated by the Host CPU. The core part of the NPU is an arithmetic circuit 803, and the arithmetic circuit 803 is controlled by a controller 804 to extract matrix data from a memory and perform a multiplication operation.
[0174] In some implementations, the arithmetic circuit 803 includes multiple processing units (process engines, PEs) inside. In some implementations, the arithmetic circuit 803 is a two-dimensional systolic array. The arithmetic circuit 803 may also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 803 is a general matrix processor.
[0175] For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit fetches the corresponding data of matrix B from the weight memory 802 and caches it on each PE in the arithmetic circuit. The arithmetic circuit fetches the data of matrix A from the input memory 801 and performs a matrix operation with matrix B, and the partial result or the final result of the obtained matrix is stored in an accumulator 808.
[0176] The unified memory 806 is used to store input data and output data. The weight data is directly transported through a direct memory access controller (DMAC) 805, and the DMAC transports it to the weight memory 802. The input data is also transported to the unified memory 806 through the DMAC.
[0177] A bus interface unit (BIU) 810 is used for the interaction between the AXI bus, the DMAC, and an instruction fetch buffer (IFB) 809.
[0178] The bus interface unit 810 (bus interface unit, BIU) is used for the instruction fetch buffer 809 to obtain instructions from an external memory, and is also used for the storage unit access controller 805 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0179] The DMAC is mainly used to transfer the input data in the external memory DDR to the unified memory 806, or transfer the weight data to the weight memory 802, or transfer the input data to the input memory 801.
[0180] The vector calculation unit 807 includes multiple arithmetic processing units, which further process the output of the arithmetic circuit as needed, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolution / full connection layer network calculations in neural networks, such as batch normalization, pixel-level summation, upsampling of the feature plane, etc.
[0181] In some implementations, the vector calculation unit 807 can store the processed output vector in the unified memory 806. For example, the vector calculation unit 807 can apply a linear function and / or a non-linear function to the output of the arithmetic circuit 803, such as linear interpolation of the feature plane extracted by the convolutional layer, or for example, a vector of accumulated values to generate activation values. In some implementations, the vector calculation unit 807 generates normalized values, pixel-level summation values, or both. In some implementations, the processed output vector can be used as an activation input to the arithmetic circuit 803, for example, for use in subsequent layers in a neural network.
[0182] The instruction fetch buffer 809 connected to the controller 804 is used to store the instructions used by the controller 804;
[0183] The unified memory 806, the input memory 801, the weight memory 802, and the instruction fetch memory 809 are all On-Chip memories. The external memory is private to this NPU hardware architecture.
[0184] Wherein, the processor mentioned anywhere above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the above Figure 3 or Figure 5 steps of the method.
[0185] Figure 9 This is a schematic structural diagram of a communication device provided by an embodiment of the present application. The communication device is implemented by a general bus architecture.
[0186] The communication device includes at least one processor 901, a communication bus 902, a memory 903, and at least one communication interface 904.
[0187] Optionally, the processor 901 is a general-purpose CPU, NP, microprocessor, or one or more integrated circuits for implementing the solution of this application. For example, it can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0188] The communication bus 902 is used to transfer information between the above components. The communication bus 902 is divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0189] Optionally, the memory 903 is a read-only memory (ROM) or other types of static storage devices that can store static information and instructions. Alternatively, the memory 903 is a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions. Alternatively, the memory 903 is an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. Optionally, the memory 903 exists independently and is connected to the processor 901 through the communication bus 902. Optionally, the memory 903 and the processor 901 are integrated together.
[0190] The communication interface 904 uses any transceiver-like device for communicating with other devices or communication networks. The communication interface 904 includes a wired communication interface. Optionally, the communication interface 904 further includes a wireless communication interface. Among them, the wired communication interface is, for example, an Ethernet interface. The Ethernet interface is an optical interface, an electrical interface, or a combination thereof. The wireless communication interface is a wireless local area networks (WLAN) interface, a cellular network communication interface, or a combination thereof, etc.
[0191] In a specific implementation, as an example, the processor 901 includes one or more CPUs, such as Figure 9 the CPU0 and CPU1 shown in
[0192] In a specific implementation, as an example, the communication device includes multiple processors, such as Figure 9 the processor 901 and the processor 905 shown in
[0193] In some embodiments, the memory 903 is used to store the program code 906 for executing the solution of this application, and the processor 901 executes the program code 906 stored in the memory 903. That is to say, the communication device realizes the above method embodiments through the processor 901 and the program code 906 in the memory 903.
[0194] In addition, it should be noted that the device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines.
[0195] The embodiment of this application also provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the method in the foregoing embodiments.
[0196] The embodiment of this application also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the method in the foregoing embodiments.
[0197] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0198] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0199] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0201] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, read-only memory), random access memories (RAM, random access memory), magnetic disks, or optical discs that can store program codes.
[0202] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a high-density digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.
Claims
1. A data sending method, characterized in that, Including: A first communication device obtains a first channel anomaly corresponding to a first optical module, where the first channel is a channel between the first optical module and a second optical module, and the first optical module is connected to the first communication device; The first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module, where the M channels are channels between the first optical module and the first communication device, the N channels do not include a second channel, the second channel is at least one channel among the M channels corresponding to the first channel, and N is less than M; The first communication device sends control information to the first optical module, and the control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
2. The method according to claim 1, characterized in that, The channels other than the N channels among the M channels are not used for sending and / or receiving data.
3. The method according to claim 1 or 2, characterized in that, The control information is further used to instruct the first optical module to turn off the light emission corresponding to a third channel, where the third channel is a channel between the first optical module and the second optical module.
4. The method according to any one of claims 1 to 3, characterized in that, A fourth channel has an anomaly, where the fourth channel is a channel between the first optical module and the second optical module, and the first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module according to the first anomaly information, including: If the first channel and the fourth channel meet the speed reduction condition, the first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module, and the N channels do not include a fifth channel, where the fifth channel is at least one channel among the M channels corresponding to the fourth channel.
5. A data sending method, characterized in that, Including: A first communication device obtains a first channel anomaly corresponding to a first optical module, where the first channel is a channel between the first optical module and a second optical module, and the first optical module is connected to the first communication device; The first communication device sends and / or receives data using N channels out of M channels corresponding to the first optical module, where the M channels are channels between the first optical module and the first communication device, the N channels do not include a second channel, the second channel is at least one channel among the M channels corresponding to the first channel, and N is less than M; The first communication device sends fault information to a controller according to the first anomaly information, and the fault information is used to indicate that the first channel has an anomaly.
6. The method according to claim 5, characterized in that The fault information includes at least one of the following: first port information, second port information, the number of channels of the first port, and the fault information of the first channel. The first port information includes the port number and Internet Protocol (IP) address of the first port, the second port information includes the port number and IP address of the second port, the first port is the local port, and the second port is the peer port.
7. The method according to claim 5 or 6, characterized in that, The channels other than the N channels among the M channels are not used for sending and / or receiving data.
8. The method according to any one of claims 5 to 7, characterized in that, An abnormality occurs in the fourth channel, where the fourth channel is the channel between the first optical module and the second optical module. The first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data according to the first abnormality information, including: If the first channel and the fourth channel meet the speed reduction condition, the first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data, and the N channels do not include the fifth channel, where the fifth channel is at least one channel in the M channels corresponding to the fourth channel.
9. A data sending method, characterized in that, Including: The second communication device obtains a second channel abnormality corresponding to the second optical module. The first channel is the channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device. The second communication device obtaining the first channel abnormality corresponding to the second optical module includes: the second communication device does not receive the optical signal sent by the first optical module through the first channel, and the first optical module actively turns off the light emission corresponding to the first channel. The second communication device uses N channels out of M channels corresponding to the second optical module to send and / or receive data. The M channels are the channels between the second optical module and the second communication device, and the N channels do not include the second channel, where the second channel is at least one channel in the M channels corresponding to the first channel, and N is less than M.
10. The method according to claim 9, characterized in that, The channels other than the N channels in the M channels are not used for sending and / or receiving data.
11. The method according to claim 9 or 10, characterized in that, An abnormality occurs in the fourth channel, where the fourth channel is the channel between the first optical module and the second optical module. The first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data according to the first abnormality information, including: If the first channel and the fourth channel meet the speed reduction condition, the first communication device uses N channels out of M channels corresponding to the first optical module to send and / or receive data, and the N channels do not include the fifth channel, where the fifth channel is at least one channel in the M channels corresponding to the fourth channel.
12. A data sending method, characterized in that, Including: The second communication device receives fault information from the controller, where the fault information is used to indicate that an abnormality occurs in the first channel. The first channel is the channel between the first optical module and the second optical module, and the second optical module is connected to the second communication device. The second communication device uses N channels out of M channels corresponding to the second optical module to send and / or receive data according to the fault information. The M channels are the channels between the second optical module and the second communication device, and the N channels do not include the second channel, where the second channel is at least one channel in the M channels corresponding to the first channel, and N is less than M.
13. The method according to claim 12, wherein The fault information includes at least one of the following: first port information, second port information, the number of channels of the first port, and the fault information of the first channel. The first port information includes the port number and Internet Protocol (IP) address of the first port. The second port information includes the port number and IP address of the second port. The first port is the local port, and the second port is the peer port.
14. The method according to claim 12 or 13, characterized in that, The channels other than the N channels among the M channels are not used for sending and / or receiving data.
15. The method according to any one of claims 12 to 14, characterized in that An exception occurs in the fourth channel, where the fourth channel is the channel between the first optical module and the second optical module. The first communication device uses N channels among the M channels corresponding to the first optical module to send and / or receive data according to the first exception information, including: If the first channel and the fourth channel meet the speed reduction condition, the first communication device uses N channels among the M channels corresponding to the first optical module to send and / or receive data. The N channels do not include the fifth channel, and the fifth channel is at least one of the M channels corresponding to the fourth channel.
16. A data sending method, characterized in that, Including: The first optical module turns off the signal of the second channel, or sends the signal received through the first channel to the first communication device through the second channel. The first channel is the channel between the first optical module and the second optical module. The first optical module is connected to the first communication device. The second channel is at least one of the M channels corresponding to the first channel. The M channels are the channels between the first optical module and the first communication device. The first optical module uses N channels among the M channels to receive and / or send data. The N channels do not include the second channel, and N is less than M. The first optical module receives control information from the first communication device. The second control information is used to instruct the first optical module to turn off the light emission corresponding to the first channel.
17. The method according to claim 16, characterized in that The channels other than the N channels among the M channels are not used for sending and / or receiving data.
18. The method according to claim 16 or 17, characterized in that, The control information is further used to instruct the first optical module to turn off the light emission corresponding to the second channel. The second channel is the channel between the first optical module and the second optical module. The M channels include the second channel, and the N channels do not include the second channel.
19. A data sending method, characterized in that, Including: The second optical module turns off the signal of the second channel, or sends the signal received through the first channel to the second communication device through the second channel. The first channel is the channel between the first optical module and the second optical module. The second optical module is connected to the second communication device. The second channel is at least one of the M channels corresponding to the first channel. The M channels are the channels between the second optical module and the second communication device. The second optical module uses N channels among the M channels to receive and / or send data. The N channels do not include the second channel, and N is less than M.
20. The method according to claim 19, wherein, The channels other than the N channels among the M channels are not used for sending and / or receiving data.
21. A communication device, characterized in that, For performing the method according to any one of claims 1 to 4.
22. A communication device, characterized in that, For performing the method according to any one of claims 5 to 8.
23. A communication device, characterized in that, For performing the method according to any one of claims 9 to 11.
24. A communication device, characterized in that, For performing the method according to any one of claims 12 to 15.
25. An optical module, characterized in that, For performing the method according to any one of claims 16 to 18.
26. An optical module, characterized in that, For performing the method according to any one of claims 19 to 20.
27. A communication device, characterized in that, Comprising: A processor for executing a program to cause the communication device to perform the method according to any one of claims 1 to 4.
28. A communication device, characterized in that, Comprising: A processor for executing a program to cause the communication device to perform the method according to any one of claims 5 to 8.
29. A communication device, characterized in that, Comprising: A processor for executing a program to cause the communication device to perform the method according to any one of claims 9 to 11.
30. A communication device, characterized in that, Comprising: A processor for executing a program to cause the communication device to perform the method according to any one of claims 12 to 15.
31. An optical module, characterized in that, Comprising: A processor for executing a program to cause the optical module to perform the method according to any one of claims 16 to 18.
32. An optical module, characterized in that, Comprising: A processor for executing a program to cause the optical module to perform the method according to any one of claims 19 to 20.
33. A computer-readable storage medium comprising instructions that, when run on a computer, cause the computer to perform the method according to any one of claims 1 to 4, or cause the computer to perform the method according to any one of claims 5 to 8, or cause the computer to perform the method according to any one of claims 9 to 11, or cause the computer to perform the method according to any one of claims 12 to 15, or cause the computer to perform the method according to any one of claims 16 to 18, or cause the computer to perform the method according to any one of claims 19 to 20.
34. A computer program product comprising instructions that, when run on a computer, cause the computer to perform the method according to any one of claims 1 to 4, or cause the computer to perform the method according to any one of claims 5 to 8, or cause the computer to perform the method according to any one of claims 9 to 11, or cause the computer to perform the method according to any one of claims 12 to 15, or cause the computer to perform the method according to any one of claims 16 to 18, or cause the computer to perform the method according to any one of claims 19 to 20.
Citation Information
Cited By
Data sending method, communication apparatus, and storage medium
WO2025157114A1