CN110213176B - Message processing method, device, equipment and medium of switch - Google Patents
Message processing method, device, equipment and medium of switch Download PDFInfo
- Publication number
- CN110213176B CN110213176B CN201910578146.7A CN201910578146A CN110213176B CN 110213176 B CN110213176 B CN 110213176B CN 201910578146 A CN201910578146 A CN 201910578146A CN 110213176 B CN110213176 B CN 110213176B
- Authority
- CN
- China
- Prior art keywords
- message
- output port
- sent
- working
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 16
- 238000000034 method Methods 0.000 claims abstract description 31
- 238000001514 detection method Methods 0.000 claims description 21
- 238000011084 recovery Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 6
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 239000000523 sample Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/30—Peripheral units, e.g. input or output ports
- H04L49/3027—Output queuing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/55—Prevention, detection or correction of errors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention discloses a message processing method, a device, equipment and a medium of a switch. The method comprises the following steps: when the fault of a working output port of the switch is detected, caching a target message to be sent, which is matched with the working output port, according to a message sending and processing sequence; and if the protection output port corresponding to the working output port is determined to normally operate, controlling the cached target message to be sent through the protection output port. According to the technical scheme, the message discarding operation does not exist in the link switching time period of the network switching equipment, so that the packet loss quantity in the link switching time period is greatly reduced, even the packet loss phenomenon in the link switching time period is avoided, and the integrity of the service data transmitted by the network switch is further ensured.
Description
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a message processing method, a message processing device, message processing equipment and a message processing medium for an exchanger.
Background
The existing link protection method generally provides a backup link for a working link, and when the working link fails or deteriorates, the working link is switched to the backup link as soon as possible for data forwarding, so as to reduce data loss.
The switching time for the network device to successfully switch from the working link to the backup link is generally tens to hundreds of milliseconds, and the length of the switching time mainly depends on the complexity of the communication service and the link switching speed. At present, in this switching time, the packets in the queue to be forwarded still continue to dequeue, and the forwarding path is searched for forwarding. However, during this switching time, the message is discarded because it cannot be forwarded correctly.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for processing a packet of a switch, so as to reduce the number of packet losses caused by link switching in a network switching device.
In a first aspect, an embodiment of the present invention provides a method for processing a packet by a switch, where the method includes:
when the fault of a working output port of the switch is detected, caching a target message to be sent, which is matched with the working output port, according to a message sending and processing sequence;
and if the protection output port corresponding to the working output port is determined to normally operate, controlling the cached target message to be sent through the protection output port.
In a second aspect, an embodiment of the present invention further provides a message processing apparatus for a switch, including:
the message caching module is used for caching a target message to be sent, which is matched with a working output port of the switch, according to a message sending and processing sequence when the fault of the working output port of the switch is detected;
and the message recovery sending module is used for controlling the cached target message to be sent through the protection output port if the protection output port corresponding to the working output port is determined to normally operate.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the message processing method of the switch according to any embodiment of the present invention when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a message processing method of a switch according to any embodiment of the present invention.
In the embodiment of the invention, the switch is provided with an inlet port, a working outlet port and a protection outlet port corresponding to the working outlet port, specifically, a message is received through the inlet port, the message is sent out through the working outlet port, when a fault of one working outlet port of the switch is detected, a target message to be sent matched with the working outlet port is cached according to the sending processing sequence of the message, and the cached target message is controlled to be sent through the protection outlet port until the protection outlet port corresponding to the working outlet port is determined to be completely available. Therefore, the network switching equipment does not have the operation of discarding the message in the link switching time period, the packet loss number in the link switching time period is greatly reduced, even the packet loss phenomenon in the link switching time period is avoided, and the integrity of the service (especially the service sensitive to packet loss) data transmitted by the network switch is further ensured.
Drawings
Fig. 1 is a flowchart of a message processing method of a switch according to a first embodiment of the present invention;
fig. 2 is a flowchart of a message processing method of a switch in the second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a message processing apparatus of a switch in a third embodiment of the present invention;
fig. 4 is a schematic hardware configuration diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
To clearly introduce the technical solutions of the embodiments of the present invention, a port of a switch is explained first.
A network device, such as a switch, includes an ingress port and an egress port, where the ingress port is used to receive a message, the egress port is used to send the message to the outside, and different messages may be sent to the outside through different egress ports.
In order to provide a backup link for the working link, the output port is divided into a working output port and a protection output port corresponding to the working output port, the working link is a link from the input port to the working output port, and the backup link is a link from the input port to the protection output port.
Specifically, the protection output port may be a working output port which corresponds to the protection output port individually. For example, the switch includes an ingress port a, a working egress port B, a working egress port C, a protection egress port E, and a protection egress port F, where the protection egress port E corresponds to the working egress port B and is used as a backup egress port of the working egress port B when the working egress port B fails, and the protection egress port F corresponds to the working egress port C and is used as a backup egress port of the working egress port C when the working egress port C fails.
Specifically, the protection output port may also correspond to a plurality of working output ports. For example, the switch includes an ingress port a, a working egress port B, a working egress port C, and a protection egress port E, where the protection egress port E corresponds to two working egress ports, i.e., the working egress port B and the working egress port C, and is used to serve as a backup egress port of the working egress port B and/or the working egress port C when the working egress port B and/or the working egress port C fails.
Example one
Fig. 1 is a flowchart of a method for processing a message of a switch according to an embodiment of the present invention, where the embodiment is applicable to a situation where a switch needs to perform link switching due to a working link failure, and the method can be executed by a message processing apparatus of a switch according to an embodiment of the present invention, and the apparatus can be implemented in a software and/or hardware manner and can be generally integrated in a processor.
As shown in fig. 1, the method of this embodiment specifically includes:
s110, when the fault of the working output port of the switch is detected, caching the target message to be sent which is matched with the working output port according to the message sending processing sequence.
After the switch receives the messages through the input port in sequence, the switch sends and processes the messages according to the message sending and processing sequence, wherein the working ports for sending the messages are not necessarily the same. The message sending processing sequence may be determined according to the receiving sequence of each message, for example, the message is sent first, or the message is sent with priority higher than the sending priority of each message.
When a failure of a working output port of the switch is detected, which is generally a physical failure, such as a port drop, and if the working output port B fails, a message to be sent through the working output port B is cached, that is, a target message to be sent, which is matched with the failed working port, is cached.
Specifically, when one message is sequentially acquired according to the message sending processing sequence for processing, if it is determined that the message needs to be sent through the working output port B, the message is cached, and if it is determined that the message does not need to be sent through the working output port B, the message is normally sent through other working output ports matched with the message.
Typically, a failure detection unit may be configured to detect a working state of each working output port, and notify the processor when a failed output port is detected, so that the processor caches a message when processing the message that needs to be sent by the failed output port, instead of discarding the message due to abnormal sending.
And S120, if the protection output port corresponding to the working output port is determined to normally operate, controlling the cached target message to be sent through the protection output port.
After detecting the fault of the working output port B, randomly detecting whether a protection output port E corresponding to the working output port B can normally operate or not until the protection output port E is completely available, sequentially taking out the cached target messages needing to be sent by the working output port B, and sending the target messages through the protection output port E.
As a specific implementation manner of this embodiment, after S110, the method further includes:
and constructing a detection message, wherein the detection message is used for detecting whether the protection output port corresponding to the working output port normally operates.
The detection message is a special type of information, has no substantial message content, is only used for detecting whether the egress port is available, can detect whether the protection egress port is available, and can detect whether the working egress port is available after the working egress port is recovered from a fault.
After receiving the detection information, the device at the next node of the network switch may identify the message type and then perform an ignore discard process, or may return a receipt confirmation feedback to the network switch, which is not specifically limited in this embodiment.
Further, it may be determined that the protection output port corresponding to the working output port operates normally, specifically: the control detection message is sent through the protection output port; and if the detection message is successfully sent, determining that the protection output port corresponding to the working output port normally operates.
And after the detection message is subjected to format encapsulation, detecting whether a forwarding table entry is available or not, further searching a protection output port corresponding to the working output port with the fault, and controlling the detection message to be sent through the protection output port. If the probe message is determined to be successfully sent, for example, after a signal indicating that the message is successfully sent by the physical layer is detected, the protection output port is considered to be available at the physical layer, and no physical fault exists, so that the protection output port is determined to be fully available when operating normally.
After confirming that the protection output port corresponding to the working output port with the fault is completely available, the cached target messages can be sequentially taken out, and the target messages are controlled to be sent through the protection output port.
In the embodiment of the invention, the switch is provided with an inlet port, a working outlet port and a protection outlet port corresponding to the working outlet port, specifically, a message is received through the inlet port, the message is sent out through the working outlet port, when a fault of one working outlet port of the switch is detected, a target message to be sent matched with the working outlet port is cached according to the sending processing sequence of the message, and the cached target message is controlled to be sent through the protection outlet port until the protection outlet port corresponding to the working outlet port is determined to be completely available. Therefore, the network switching equipment does not have the operation of discarding the message in the link switching time period, the packet loss number in the link switching time period is greatly reduced, even the packet loss phenomenon in the link switching time period is avoided, and the integrity of the service (especially the service sensitive to packet loss) data transmitted by the network switch is further ensured.
Example two
Fig. 2 is a flowchart of a message processing method of an exchange according to a second embodiment of the present invention. The embodiment is optimized based on the above embodiment, wherein the caching of the target packet to be sent, which is matched with the working output port, according to the packet sending processing sequence specifically includes: according to the dequeue sequence of the messages, sequentially acquiring a message to be sent in a message queue to be sent as a current processing message; and if the current processing message is matched with the working output port, determining that the current processing message is the target message and sequentially adding the current processing message to a target message cache queue.
Correspondingly, the sending of the target packet controlling the cache through the protection output port specifically includes: and sequentially acquiring a target message in the target message cache queue, and controlling the target message to be sent through the protection output port.
As shown in fig. 2, the method of this embodiment specifically includes:
s210, when detecting that the working output port of the switch is in fault, sequentially acquiring a message to be sent in a message queue to be sent as a current processing message according to the message dequeuing sequence.
In this embodiment, the switch receives a new message to be sent in real time through the ingress port, and sequentially adds the message to be sent to the message queue to be sent.
No matter whether a faulty working output port exists in the switch, the operation of receiving a new message to be sent in real time through the input port and sequentially adding the message to be sent to a message queue to be sent is not affected. For example, even if the working output port B in the switch fails, a new message to be sent is still received through the input port in real time, and the message to be sent may be sent through the working output port B, or may be sent through other working output ports.
And the switch acquires a message to be sent as a current processing message for sending according to the dequeuing sequence of the messages in the message queue to be sent, which is generally just opposite to the sequence of the messages in the message queue.
S220, if the current processing message is matched with the working output port, determining that the current processing message is the target message, and sequentially adding the current processing message to a target message cache queue.
Judging whether the current processing message is a message to be sent through the failed working output port or not, if not, controlling the current processing message to be sent through other working output ports matched with the current processing message; if so, the current processing message is a message needing to be cached, and the current processing message is sequentially added to the target message cache queue.
The target message cache queue is a queue for temporarily caching the target message corresponding to the failed working output port. When the number of the failed working output ports is more than one, the target messages corresponding to the failed working output ports may be all cached in the same target message cache queue, or the target messages corresponding to the failed working output ports may be cached in different target message cache queues, that is, one failed working output port corresponds to one target message cache queue, and the target message cache queue may be pre-created or newly created after the failed working output port is detected, which is not specifically limited in this embodiment.
And S230, constructing a detection message, and controlling the detection message to be sent through the protection output port.
And S240, if the detection message is determined to be successfully sent, determining that the protection output port corresponding to the working output port normally operates.
And S250, sequentially obtaining a target message in the target message buffer queue, and controlling the target message to be sent through the protection output port.
And according to the sequence of adding the target messages to the target cache queue, sequentially dequeuing one target message, and sending the target message based on the protection output port.
It is worth pointing out that, under the condition that the switch includes at least two working output ports, when it is determined that the protection output port is completely available and the sending operation can be performed on the target message in the target cache queue, the message to be sent in the message queue to be sent also needs to be performed, at this time, the messages in the two queues can be sent according to a preset rule sequence, for example, the messages in the two queues can be processed in turn, and after one message in the message queue to be sent is processed, one message in the target message queue is processed again, so that the messages in turn are processed.
For those parts of this embodiment that are not explained in detail, reference is made to the aforementioned embodiments, which are not repeated herein.
In the above technical solution, there is no operation of discarding packets in the link switching time period in the network switching device, which greatly reduces the packet loss amount in the link switching time period, even avoids the packet loss phenomenon in the link switching time period, and further ensures the integrity of the service (especially the service sensitive to packet loss) data transmitted by the network switch.
Further, the method for processing a packet by using an exchange provided in this embodiment further includes:
and when the fault recovery of the working output port is detected, controlling the target message to be sent through the working output port according to a preset rule, or controlling the target message to be sent through a protection output port corresponding to the working output port.
Whether the failure of the working output port is recovered or not is detected, and whether the failure of the working output port is recovered or not can be determined by detecting the detection information, which is not described herein again.
When determining that the fault of the working output port is recovered, the target message corresponding to the working output port may still be sent through the protection output port corresponding to the working output port, or may also be recovered to the target message sent through the working output port, which may be specifically set according to an actual situation, and this embodiment does not specifically limit this.
Specifically, when it is detected that the working output port has recovered from the failure, for example, the communication link may be switched from the protection output port to the working output port again after a preset time period elapses. That is, when the preset time period is reached, not only the message corresponding to the working output port acquired in the message queue to be sent is sent through the working output port, but also the target message acquired in the target message queue is sent through the working output port.
And the protection output port and the working output port can be set to send the target message corresponding to the working output port, and the communication link is completely switched from the protection output port to the working output port until the target message cached in the target message queue is completely processed. That is, when the current processing message obtained from the message queue to be sent corresponds to the working output port, the current processing message is directly sent through the working output port, and meanwhile, the target message obtained from the target message queue is still sent through the protection output port.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a message processing apparatus of a switch according to a third embodiment of the present invention, which is applicable to a situation that a switch needs to perform link switching due to a working link failure, and the apparatus can be implemented in a software and/or hardware manner and can be generally integrated in a processor.
As shown in fig. 3, the message processing apparatus of the switch specifically includes: a message caching module 310 and a message recovery sending module 320. Wherein,
the message caching module 310 is configured to, when a failure of a working output port of the switch is detected, cache a target message to be sent that matches the working output port according to a message sending processing sequence;
a message recovery sending module 320, configured to control the cached target message to be sent through the protection egress port if it is determined that the protection egress port corresponding to the working egress port operates normally.
In the embodiment of the invention, the switch is provided with an inlet port, a working outlet port and a protection outlet port corresponding to the working outlet port, specifically, a message is received through the inlet port, the message is sent out through the working outlet port, when a fault of one working outlet port of the switch is detected, a target message to be sent matched with the working outlet port is cached according to the sending processing sequence of the message, and the cached target message is controlled to be sent through the protection outlet port until the protection outlet port corresponding to the working outlet port is determined to be completely available. Therefore, the network switching equipment does not have the operation of discarding the message in the link switching time period, the packet loss number in the link switching time period is greatly reduced, even the packet loss phenomenon in the link switching time period is avoided, and the integrity of the service (especially the service sensitive to packet loss) data transmitted by the network switch is further ensured.
Further, the message caching module is specifically configured to, when a failure of a working output port of the switch is detected, sequentially obtain, according to a message dequeuing sequence, one to-be-sent message in a to-be-sent message queue as a current processing message; if the current processing message is matched with the working output port, determining that the current processing message is the target message and sequentially adding the current processing message to a target message cache queue;
correspondingly, the message recovery sending module is specifically configured to, if it is determined that the protection output port corresponding to the working output port operates normally, sequentially obtain one of the target messages in the target message cache queue, and control the target message to be sent through the protection output port.
Further, the message processing apparatus of the switch further includes:
and the message receiving module to be sent is used for receiving a new message to be sent in real time through an input port and adding the message to be sent to the message queue to be sent in sequence.
Further, the message processing apparatus of the switch further includes:
a detection message construction module, configured to construct a detection message, where the detection message is used to detect whether a protection output port corresponding to the working output port operates normally;
correspondingly, the message recovery sending module 320 is specifically configured to control the probe message to be sent through the protection output port; and if the detection message is successfully sent, determining that a protection output port corresponding to the working output port normally operates, and controlling the cached target message to be sent through the protection output port.
Further, the message processing apparatus of the switch further includes:
and the fault recovery processing module is used for controlling the target message to be sent through the working output port according to a preset rule when the fault recovery of the working output port is detected, or controlling the target message to be sent through a protection output port corresponding to the working output port.
Specifically, in an embodiment, the protection output port and the working output port correspond to each other separately; or, the protection output port corresponds to a plurality of working output ports.
The message processing device of the switch can execute the message processing method of the switch provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executed message processing method of the switch.
Example four
Fig. 4 is a schematic diagram of a hardware structure of a computer device according to a fourth embodiment of the present invention, and as shown in fig. 4, the computer device includes:
one or more processors 410, one processor 410 being illustrated in FIG. 4;
a memory 420;
the computer device may further include: an input device 430 and an output device 440.
The processor 410, the memory 420, the input device 430 and the output device 440 in the computer apparatus may be connected by a bus or other means, and fig. 4 illustrates the connection by a bus as an example.
The memory 420, which is a non-transitory computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the message processing method of the switch in the embodiment of the present invention (for example, the message caching module 310 and the message recovery transmitting module 320 shown in fig. 3). The processor 410 executes various functional applications and data processing of the computer device by executing the software programs, instructions and modules stored in the memory 420, that is, implements the message processing method of the switch in the above method embodiment.
The memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 420 may optionally include memory located remotely from processor 410, which may be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 440 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a message processing method for a switch, where the method includes:
when the fault of a working output port of the switch is detected, caching a target message to be sent, which is matched with the working output port, according to a message sending and processing sequence;
and if the protection output port corresponding to the working output port is determined to normally operate, controlling the cached target message to be sent through the protection output port.
Optionally, the computer executable instruction, when executed by the computer processor, may be further used to implement a technical solution of a message processing method of a switch provided in any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the message processing apparatus of the switch, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (8)
1. A message processing method of a switch is characterized by comprising the following steps:
when the fault of a working output port of the switch is detected, caching a target message to be sent, which is matched with the working output port, according to a message sending and processing sequence;
if the protection output port corresponding to the working output port is determined to normally operate, the target message cached is controlled to be sent through the protection output port;
according to the message sending and processing sequence, caching the target message to be sent which is matched with the working output port, comprising the following steps:
according to the dequeue sequence of the messages, sequentially acquiring a message to be sent in a message queue to be sent as a current processing message;
if the current processing message is matched with the working output port, determining that the current processing message is the target message and sequentially adding the current processing message to a target message cache queue;
the controlling the cached target packet to be sent through the protection output port includes:
sequentially acquiring one target message in the target message cache queue, and controlling the target message to be sent through the protection output port;
after detecting the failure of the working output port of the switch, the method further comprises the following steps: and randomly detecting whether a protection output port corresponding to the working output port can normally operate or not, and sequentially taking out the cached target messages which need to be sent by the working output port until the protection output port can be completely available, and sending the target messages through the protection output port.
2. The method of claim 1, further comprising:
and receiving a new message to be sent in real time through an ingress port, and sequentially adding the message to be sent to the message queue to be sent.
3. The method according to claim 1, further comprising, after caching the target packet to be sent that matches the working egress port:
constructing a detection message, wherein the detection message is used for detecting whether a protection output port corresponding to the working output port normally operates;
determining that the protection output port corresponding to the working output port normally operates, including:
controlling the detection message to be sent through the protection output port;
and if the detection message is determined to be successfully sent, determining that the protection output port corresponding to the working output port normally operates.
4. The method according to any one of claims 1-3, further comprising:
when the fault recovery of the working output port is detected, the target message is controlled to be sent through the working output port according to a preset rule,
or controlling the target message to be sent through a protection output port corresponding to the working output port.
5. The method according to any one of claims 1-3, further comprising:
the protection output port and the working output port are independently corresponding; or, the protection output port corresponds to a plurality of working output ports.
6. A message processing apparatus of a switch, comprising:
the message caching module is used for caching a target message to be sent, which is matched with a working output port of the switch, according to a message sending and processing sequence when the fault of the working output port of the switch is detected;
a message recovery sending module, configured to control the cached target message to be sent through the protection output port if it is determined that the protection output port corresponding to the working output port operates normally;
the message caching module is specifically configured to, when a failure of a working output port of the switch is detected, sequentially acquire, according to a message dequeuing sequence, one to-be-sent message in a to-be-sent message queue as a current processing message; if the current processing message is matched with the working output port, determining that the current processing message is the target message and sequentially adding the current processing message to a target message cache queue;
the message recovery sending module is specifically configured to, if it is determined that a protection output port corresponding to the working output port operates normally, sequentially obtain one target message in the target message cache queue, and control the target message to be sent through the protection output port;
after detecting the failure of the working output port of the switch, the method further comprises the following steps: and randomly detecting whether a protection output port corresponding to the working output port can normally operate or not, and sequentially taking out the cached target messages which need to be sent by the working output port until the protection output port can be completely available, and sending the target messages through the protection output port.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-5 when executing the program.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910578146.7A CN110213176B (en) | 2019-06-28 | 2019-06-28 | Message processing method, device, equipment and medium of switch |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910578146.7A CN110213176B (en) | 2019-06-28 | 2019-06-28 | Message processing method, device, equipment and medium of switch |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110213176A CN110213176A (en) | 2019-09-06 |
CN110213176B true CN110213176B (en) | 2022-03-29 |
Family
ID=67795456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910578146.7A Active CN110213176B (en) | 2019-06-28 | 2019-06-28 | Message processing method, device, equipment and medium of switch |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110213176B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113193995A (en) * | 2021-04-22 | 2021-07-30 | 深圳市信锐网科技术有限公司 | Communication apparatus, control method thereof, and computer-readable storage medium |
CN115695343B (en) * | 2022-09-21 | 2024-05-31 | 华北电力大学(保定) | Method for realizing dynamic energy saving of equipment by intelligent perception of network service flow |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102238069A (en) * | 2010-04-29 | 2011-11-09 | 杭州华三通信技术有限公司 | Data processing method and device for link switching process |
CN104618266A (en) * | 2015-02-09 | 2015-05-13 | 浪潮集团有限公司 | Method and device for transferring messages among a plurality of ports |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102104489A (en) * | 2009-12-16 | 2011-06-22 | 中兴通讯股份有限公司 | Method, device and system for protecting communication link |
CN103888303A (en) * | 2014-04-21 | 2014-06-25 | 国家电网公司 | Method and device for controlling data messages |
CN103957155B (en) * | 2014-05-06 | 2018-01-23 | 华为技术有限公司 | Message transmitting method, device and interconnecting interface |
-
2019
- 2019-06-28 CN CN201910578146.7A patent/CN110213176B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102238069A (en) * | 2010-04-29 | 2011-11-09 | 杭州华三通信技术有限公司 | Data processing method and device for link switching process |
CN104618266A (en) * | 2015-02-09 | 2015-05-13 | 浪潮集团有限公司 | Method and device for transferring messages among a plurality of ports |
Also Published As
Publication number | Publication date |
---|---|
CN110213176A (en) | 2019-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3541027A1 (en) | Method and device for determining transmission path | |
EP2667553B1 (en) | Packet processing method, device and system | |
WO2017215441A1 (en) | Self-recovery method and apparatus for board configuration in distributed system | |
CN107800663B (en) | Method and device for detecting flow offline file | |
CN110740072A (en) | fault detection method, device and related equipment | |
CN110430135B (en) | Message processing method and device | |
CN110213176B (en) | Message processing method, device, equipment and medium of switch | |
US8675498B2 (en) | System and method to provide aggregated alarm indication signals | |
CN113315665B (en) | Message sending method, device, equipment and medium of dual-network-card terminal equipment | |
JP2006352259A (en) | Device and method for detecting network failure | |
CN112217658A (en) | Stacking and splitting processing method and device | |
JP4964666B2 (en) | Computer, program and method for switching redundant communication paths | |
CN110417761B (en) | Communication method and device based on dual-computer redundancy | |
CN112217718A (en) | Service processing method, device, equipment and storage medium | |
US10887241B2 (en) | Communication device, communication system, and communication method | |
CN111224756B (en) | Method and device for determining data transmission abnormity, storage medium and electronic equipment | |
EP2908483A1 (en) | Communication node, communication system, control device, packet transfer method, and program | |
US9559857B2 (en) | Preprocessing unit for network data | |
EP4447390A1 (en) | Packet loss processing method and apparatus, switch, sending device and data transmission system | |
CN112612670B (en) | Session information statistical method, device, exchange equipment and storage medium | |
CN114070799B (en) | Processing method and processing device of priority pause frame and target network equipment | |
US10666553B2 (en) | Method for quick reconfiguration of routing in the event of a fault in a port of a switch | |
US20150256469A1 (en) | Determination method, device and storage medium | |
CN107707492B (en) | Method and device for reporting and issuing message | |
CN115002020B (en) | OSPF-based data processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |