CN110730035A - Optical interface connection detection method, exchange single board and computer storage medium - Google Patents

Optical interface connection detection method, exchange single board and computer storage medium Download PDF

Info

Publication number
CN110730035A
CN110730035A CN201810779006.1A CN201810779006A CN110730035A CN 110730035 A CN110730035 A CN 110730035A CN 201810779006 A CN201810779006 A CN 201810779006A CN 110730035 A CN110730035 A CN 110730035A
Authority
CN
China
Prior art keywords
optical port
detected
position information
target
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810779006.1A
Other languages
Chinese (zh)
Inventor
李昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201810779006.1A priority Critical patent/CN110730035A/en
Priority to PCT/CN2019/089242 priority patent/WO2020015467A1/en
Publication of CN110730035A publication Critical patent/CN110730035A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/07Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
    • H04B10/075Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal
    • H04B10/079Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal using measurements of the data signal
    • H04B10/0791Fault location on the transmission path
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/07Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
    • H04B10/075Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal
    • H04B10/079Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal using measurements of the data signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0005Switch and router aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/0079Operation or maintenance aspects
    • H04Q2011/0083Testing; Monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects
    • H04Q2011/009Topology aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Signal Processing (AREA)
  • Mechanical Coupling Of Light Guides (AREA)
  • Optical Communication System (AREA)

Abstract

The embodiment of the invention discloses an optical port connection detection method, which comprises the following steps: the method comprises the steps that a switching single board where an optical port to be detected is located obtains position information of the optical port to be detected; and the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected. The embodiment of the invention also discloses a switch single board and a computer storage medium.

Description

Optical interface connection detection method, exchange single board and computer storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to an optical interface connection detection method, a switch board, and a computer storage medium.
Background
The cluster router is generally composed of a plurality of machine frames in a cascade connection mode, optical cables used in the cascade connection mode are dozens or even hundreds, the optical cables cannot be connected randomly, and the optical cables need to be connected according to a specified topological relation according to networking conditions. Once the optical cable connection is wrong, the service packet can be lost and even the service can be interrupted. The connection relationship between the optical ports in the cluster router is usually indicated by manufacturers in a specification or an operation manual, and users are relied on to ensure the accuracy of the connection between the optical ports. However, when the number of optical ports is large, not only the complexity of connection increases, but also the accuracy of connection between the optical ports is difficult to ensure. In view of this situation, some methods are used to detect the accuracy of the connection between the optical ports of the cluster router, for example, the cluster router master board receives the optical port information of each optical port reported on each switching board in real time and checks the information to determine whether the connection between the optical ports is correct. However, the above method will increase the complexity of detecting the optical port connection and decrease the reliability.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide an optical interface connection detection method, an exchange board, and a computer storage medium, which can reduce detection complexity and improve reliability.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an optical interface connection detection method, including:
the method comprises the steps that a switching single board where an optical port to be detected is located obtains position information of the optical port to be detected;
and the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected.
In the above scheme, after the switch board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected, the method further includes:
the exchange single board where the optical port to be detected is located acquires position information of a target optical port, wherein the target optical port is the optical port which receives the position information of the optical port to be detected;
and the exchange single board where the optical port to be detected is located determines whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
In the above scheme, the method further comprises:
when the exchange single board where the optical port to be detected is located determines that the connection between the target optical port and the optical port to be detected is wrong, an alarm message is sent out; or,
when the exchange single board where the optical port to be detected is located determines that the connection between the target optical port and the optical port to be detected is wrong, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the switching single board where the optical port to be detected is located determines that the target optical port is correctly connected with the optical port to be detected, sending a link establishment request through the target optical port.
In the above scheme, the sending out, by the switch board where the optical port to be detected is located through the optical port to be detected, the position information of the optical port to be detected includes:
when the exchange single board where the optical port to be detected is located determines that the optical port to be detected has the optical cable access, the exchange single board sends out the position information of the optical port to be detected through the optical port to be detected; or,
and the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected at set time intervals.
In the above scheme, the sending out, by the switch board where the optical port to be detected is located through the optical port to be detected, the position information of the optical port to be detected includes:
the exchange single board where the optical port to be detected is located encapsulates the position information of the optical port to be detected to a set detection message, and the detection message is sent out through the optical port to be detected; or,
and the exchange single board where the optical port to be detected is located encodes the position information of the optical port to be detected according to a set encoding mode to generate a code stream, and the code stream is sent out through the optical port to be detected.
In a second aspect, an embodiment of the present invention provides an optical interface connection detection method, including:
the method comprises the steps that a switching single board where a target optical port is located obtains position information of an optical port to be detected and position information of the target optical port, wherein the target optical port is the optical port which receives the position information of the optical port to be detected;
and the exchange single board where the target optical port is located determines whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
In the above scheme, after the switch board where the target optical port is located acquires the position information of the optical port to be detected and the position information of the target optical port, the method further includes:
and the exchange single board where the target optical port is located sends out the position information of the target optical port through the target optical port.
In the above scheme, the method further comprises:
when the exchange single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is wrong, an alarm message is sent out; or,
when the exchange single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is wrong, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the exchange single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is correct, sending a link establishment request through the target optical port.
In the above scheme, the obtaining, by the switch board where the target optical port is located, the position information of the optical port to be detected includes:
the switch single board where the target optical port is located analyzes the received detection message sent by the switch single board where the optical port to be detected is located, and obtains the position information of the optical port to be detected; or,
and the exchange single board where the target optical port is located decodes the received code stream sent by the exchange single board where the optical port to be detected is located, so as to obtain the position information of the optical port to be detected.
In a third aspect, an embodiment of the present invention provides an exchange board, including:
the first acquisition unit is used for acquiring the position information of the optical port to be detected;
and the first sending unit is used for sending the position information of the optical port to be detected through the optical port to be detected.
In a fourth aspect, an embodiment of the present invention provides an exchange board, including:
a second obtaining unit, configured to obtain position information of an optical port to be detected and position information of a target optical port, where the target optical port is an optical port that receives the position information of the optical port to be detected;
and the detection unit is used for determining whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
In a fifth aspect, an embodiment of the present invention provides a switch board, where the switch board includes a processor and a memory, where the memory is used to store a computer program that can be run on the processor; wherein,
the processor is configured to execute the steps of the optical interface connection detection method according to the first aspect when the computer program is executed.
In a sixth aspect, an embodiment of the present invention provides a switch board, where the switch board includes a processor and a memory, where the memory is used to store a computer program that can be run on the processor; wherein,
the processor is configured to execute the steps of the optical interface connection detection method according to the second aspect when running the computer program.
In a seventh aspect, an embodiment of the present invention provides a computer storage medium, where a computer program is stored in the computer storage medium, and the computer program, when executed by a processor, implements the steps of the optical interface connection detection method according to the first aspect or the second aspect.
In the optical port connection detection method, the switch board, and the computer storage medium provided in the above embodiments, the switch board where the optical port to be detected is located acquires the position information of the optical port to be detected, and sends the position information of the optical port to be detected to the target optical port through the optical port to be detected, so that the switch board where the target optical port is located or the switch board where the optical port to be detected is located can detect whether the connection between the optical port to be detected and the target optical port is correct according to the received position information of the optical port to be detected and the optical port connection topology relationship, that is, the switch board can complete the detection on whether the connection between the optical port to be detected and the target optical port is correct, thereby reducing the complexity of detecting the optical port connection and improving the reliability of detecting the optical port connection.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for detecting an optical interface connection according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for detecting an optical connection according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a switch board according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a switch board according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a switch board according to another embodiment of the present invention;
FIG. 6 is a schematic flow chart illustrating a method for detecting an optical connection according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an optical port connection detection apparatus according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further elaborated by combining the drawings and the specific embodiments in the specification. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, an optical interface connection detection method provided in the embodiment of the present invention is applied to a switch board, and includes the following steps:
s101: the method comprises the steps that a switching single board where an optical port to be detected is located obtains position information of the optical port to be detected;
it can be understood that the cluster router generally includes a plurality of core routers and a central connection router, and each router includes one or more switch boards (also referred to as switch boards), and each switch board also includes one or more optical ports. The optical cable connection between each optical port can ensure that the cluster router can normally work only if the specified topological relation is met. When optical cable connection detection needs to be performed on an optical port (referred to as an optical port to be detected for short) of a certain switching board in a certain router, the switching board (referred to as the switching board where the optical port to be detected is located for short) acquires position information of the optical port to be detected. The frame number of the optical port to be detected represents a machine frame where the optical port to be detected is located, and the machine frame comprises a service core frame consisting of a core router and a central switching frame consisting of a central connection router; the slot position number of the optical port to be detected represents the exchange single board where the optical port to be detected is located; and the optical port number of the optical port to be detected represents the identifier of the optical port to be detected on the exchange single board where the optical port to be detected is located. Because each optical port has unique address information, that is, the position information of each optical port has a unique corresponding relationship with the optical port, the optical port to be detected can be uniquely determined according to the position information of the optical port to be detected.
Here, the exchange board where the optical port to be detected is located acquires the position information of the optical port to be detected, which may be that the exchange board where the optical port to be detected is located detects that the optical cable is connected to the optical port to be detected, that is, when the exchange board where the optical port to be detected is located detects that the optical port to be detected has a signal, the exchange board triggers a position information collection process of the optical port to be detected, that is, acquires the position information of the optical port to be detected; or the exchange single board where the optical port to be detected is located may trigger the position information collection process of the optical port to be detected at a set time interval. It should be noted that the optical port to be detected may be one optical port or may be multiple optical ports, and in this embodiment, the optical port to be detected is taken as one optical port as an example.
S102: and the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected.
Here, the exchange board where the optical port to be detected is located sends the position information of the optical port to be detected through the optical port to be detected, where the exchange board where the optical port to be detected is located may send the position information of the optical port to be detected to the target optical port through the optical port to be detected when detecting that a set sending condition is met, and the set sending condition may be that an optical cable is connected to the optical port to be detected or that a difference between times of sending the position information of the optical port to be detected last time at the current time is equal to a set time interval. When the optical port to be detected is accessed by an optical cable, the exchange veneer where the optical port to be detected is located sends the position information of the optical port to be detected to a target optical port through the optical port to be detected, which can be understood as that the exchange veneer where the optical port to be detected is located sends the position information of the optical port to be detected outwards through the optical cable with one end inserted into the optical port to be detected, and the target optical port is an optical port connected with the other end of the optical cable.
It should be noted that the optical port to be detected and the target optical port may be located on the same switch board of the same router, the optical port to be detected and the target optical port may also be located on different switch boards of the same router, respectively, and the optical port to be detected and the target optical port may also be located on switch boards of different routers, respectively. That is to say, the switch board where the optical port to be detected is located and the switch board where the target optical port is located may be the same switch board or different switch boards in different application scenarios.
In summary, in the optical interface connection detection method provided in the above embodiment, the exchange board where the optical interface to be detected is located sends the position information of the optical interface to be detected to the target optical interface, so that the exchange board where the target optical interface is located or the exchange board where the optical interface to be detected is located can detect whether the connection between the optical interface to be detected and the target optical interface is correct according to the position information of the optical interface to be detected, that is, the exchange board can complete the detection of whether the connection between the optical interface to be detected and the target optical interface is correct, thereby reducing the complexity of detecting the optical interface connection and improving the reliability of detecting the optical interface connection.
In an optional embodiment, the sending out, by the exchange board where the optical port to be detected is located through the optical port to be detected, the position information of the optical port to be detected includes:
when the exchange single board where the optical port to be detected is located determines that the optical port to be detected has the optical cable access, the exchange single board sends out the position information of the optical port to be detected through the optical port to be detected; or,
and the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected at set time intervals.
Specifically, when the switching board where the optical port to be detected is located determines that the optical cable is connected to the optical port to be detected, that is, when the optical port to be detected is detected to have a signal, the switching board sends out the position information of the optical port to be detected through the optical port to be detected; or, according to a set time interval, the exchange board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected by taking the set time interval as a cycle.
Therefore, when the switching single board where the optical port to be detected is located detects that the optical port to be detected has the optical cable access, the position information of the optical port to be detected is sent out through the optical port to be detected, and timeliness and rapidity of detection of optical port connection are improved. And the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected at set time intervals, so that the periodic detection of the optical port connection is realized, and particularly, the detection of the optical port connection can be automatically carried out again after the connection of the optical port is changed. In addition, the diversity of the way of detecting the optical port connection is also enhanced.
In an optional embodiment, the sending out, by the exchange board where the optical port to be detected is located through the optical port to be detected, the position information of the optical port to be detected includes:
the exchange single board where the optical port to be detected is located encapsulates the position information of the optical port to be detected to a set detection message, and the detection message is sent out through the optical port to be detected; or,
and the exchange single board where the optical port to be detected is located encodes the position information of the optical port to be detected according to a set encoding mode to generate a code stream, and the code stream is sent out through the optical port to be detected.
Therefore, the exchange single board where the optical port to be detected is located can accelerate the speed of outward transmission of the position information of the optical port to be detected by packaging the position information of the optical port to be detected to the set detection message or encoding the position information of the optical port to be detected and sending the position information of the optical port to be detected in a detection message or code stream mode, so that the transmission time is saved, and the interference of the external environment can be effectively avoided.
In an optional embodiment, after the switch board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected, the method further includes:
the exchange single board where the optical port to be detected is located acquires the position information of the target optical port, wherein the target optical port is the optical port which receives the position information of the optical port to be detected;
and the exchange single board where the optical port to be detected is located determines whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
Specifically, the switching board where the optical port to be detected is located acquires position information of a target optical port, acquires position information of an expected optical port corresponding to the target optical port according to a set optical port connection topology relationship, and determines that the target optical port and the optical port to be detected are correctly connected when the position information of the optical port to be detected is consistent with the position information of the expected optical port corresponding to the target optical port; and when the position information of the optical port to be detected is inconsistent with the position information of the expected optical port corresponding to the target optical port, determining that the target optical port is connected with the optical port to be detected in a wrong way. Or, the switching board where the optical port to be detected is located acquires the position information of the target optical port, and acquires the position information of the expected optical port corresponding to the optical port to be detected according to the set optical port connection topology relation, and when the position information of the expected optical port corresponding to the optical port to be detected is consistent with the position information of the target optical port, it is determined that the target optical port is correctly connected with the optical port to be detected; and when the position information of the expected optical port corresponding to the optical port to be detected is inconsistent with the position information of the target optical port, determining that the target optical port is connected with the optical port to be detected in a wrong way.
Here, if the position information of the optical port to be detected includes a frame number, a slot number, and an optical port number of the optical port to be detected, the position information of the optical port to be detected and the position information of the desired optical port corresponding to the target optical port are consistent in a one-to-one correspondence that the frame number, the slot number, and the optical port number of the optical port to be detected are the same as the frame number, the slot number, and the optical port number of the desired optical port corresponding to the target optical port, and the position information of the optical port to be detected and the position information of the desired optical port corresponding to the target optical port are inconsistent in a one-to-one correspondence that at least one of the frame number, the slot number, and the optical port number of the desired optical port corresponding to the target optical port is not the same as the frame number, the slot number, and the optical; correspondingly, the position information of the expected optical port corresponding to the optical port to be detected and the position information of the target optical port are consistent, namely, the frame number, the slot number and the optical port number of the expected optical port corresponding to the optical port to be detected are in one-to-one correspondence with the frame number, the slot number and the optical port number of the target optical port, and the position information of the expected optical port corresponding to the optical port to be detected and the position information of the target optical port are inconsistent, namely, at least one of the frame number, the slot number and the optical port number of the expected optical port corresponding to the optical port to be detected is in one-to-one correspondence with the frame number, the slot number and the optical port number of the target optical port.
It should be noted that the connections between the optical ports are in one-to-one correspondence, that is, a desired optical port corresponding to each optical port is specified in the optical port connection topological relation, that is, each optical port should be connected to the desired optical port corresponding to the optical port. In practical application, the optical interface connection topological relation can be described in a table mode. For example, if the optical port a is an expected optical port uniquely corresponding to the optical port B, the frame number, the slot number, and the optical port number of the optical port a may be bound to the frame number, the slot number, and the optical port number of the optical port B to form a connection topology relationship between the optical port a and the optical port B, and the connection topology relationship may be stored in a table manner. The optical port connection topology relation can be preset according to actual conditions and stored in the switch board. For the switching board where the optical port to be detected is located, the connection topology relations corresponding to all the optical ports of the switching board can be stored, and the connection topology relations corresponding to the optical ports of other switching boards can also be stored. When the optical port to be detected and the target optical port are located in the same exchange single board, the exchange single board can actively acquire the position information of the target optical port after acquiring the target optical port receiving the position information of the optical port to be detected. It should be noted that, when the optical port to be detected and the target optical port are located in different switch boards, and the switch board where the target optical port is located determines that the target optical port has an optical cable access, that is, when it is detected that the target optical port has a signal, the switch board where the target optical port is located may send the position information of the target optical port to the optical port to be detected through the target optical port, so that the switch board where the optical port to be detected is located obtains the position information of the target optical port.
Thus, when the optical port to be detected and the target optical port are located on the same switch board, the same switch board can determine whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topology relationship, the position information of the target optical port and the position information of the optical port to be detected, and the detection of the connection between the optical ports can be completed on the same switch board; when the optical port to be detected and the target optical port are located in different switch boards, the switch board where the optical port to be detected is located or the switch board where the target optical port is located can also complete detection, and the switch board directly realizes detection of optical port connection, so that the problems of delay and external interference caused by introducing a third party for detection are avoided, and the detection process is simple, the detection speed is high, and the reliability is high.
In an optional embodiment, the method further comprises:
when the exchange single board where the optical port to be detected is located determines that the connection between the target optical port and the optical port to be detected is wrong, an alarm message is sent out; or,
when the exchange single board where the optical port to be detected is located determines that the connection between the target optical port and the optical port to be detected is wrong, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the switching single board where the optical port to be detected is located determines that the target optical port is correctly connected with the optical port to be detected, sending a link establishment request through the target optical port.
Here, the sending of the alarm message may be that the switch board where the optical port to be detected is located sends a connection error message between the target optical port and the optical port to be detected in a manner of a command line, so that the connection error message between the target optical port and the optical port to be detected is displayed on a display interface of a user telnet cluster router. The sending of the warning message may also be directly sending a warning message to a user to inform that the connection between the target optical port and the optical port to be detected is wrong. The sending of the warning message may also be triggering of a set indicator light to light up so as to inform that the connection between the target optical port and the optical port to be detected is wrong. For example, suppose that a connection status indicator lamp is correspondingly arranged on each optical port on the switch board, and when the optical ports are correctly connected, the connection status indicator lamp corresponding to the optical port is not turned on; and when the connection of the light port is wrong, the connection state indicator lamp corresponding to the light port is lightened. The switching board where the optical port to be detected is located sends a link establishment request through the target optical port, which can be understood as that the switching board where the optical port to be detected is located sends a set high-flow message to the optical port to be detected through the target optical port, so as to inform that the connection between the target optical port and the optical port to be detected is correct. The switch board where the optical port to be detected is located sends out a link establishment request through the target optical port, which may be regarded as controlling the optical cable link establishment between the target optical port and the optical port to be detected. And when the exchange single board where the optical port to be detected is located determines that the target optical port is connected with the optical port to be detected in a wrong way, sending a prompt message carrying the position information of the expected optical port corresponding to the target optical port or the position information of the expected optical port corresponding to the optical port to be detected so as to inform a user of realizing correct connection between the optical ports according to the prompt message. In addition, when the switch board where the optical port to be detected is located determines that the connection between the target optical port and the optical port to be detected is incorrect, a link establishment request is not sent through the target optical port, which may be regarded as controlling the optical cable link between the target optical port and the optical port to be detected to reset, so as to avoid the situation that the optical cable is inserted incorrectly and the optical cable is lost or the service is interrupted after the optical cable link establishment is successful.
Therefore, when the target optical port is connected with the optical port to be detected in a wrong way, namely the optical cable is inserted in a wrong way, the optical cable is prompted to be inserted in a wrong way by sending an alarm, a prompt message and the like, the prompt mode is visual, and the prompt effect is good. When the connection between the target optical port and the optical port to be detected is correct, namely the optical cable is not inserted in a wrong way, the optical cable link is controlled to be established, and when the connection between the target optical port and the optical port to be detected is wrong, namely the optical cable is inserted in a wrong way, the optical cable link is controlled to be reset, so that the situations of packet loss or service interruption after the optical cable link is established successfully due to the optical cable insertion in a wrong way are avoided, and the detection flexibility is improved.
Referring to fig. 2, the method for detecting an optical interface connection provided in the embodiment of the present invention is applied to a switch board, and includes the following steps:
s201: the method comprises the steps that a switching single board where a target optical port is located obtains position information of an optical port to be detected and position information of the target optical port, wherein the target optical port is the optical port which receives the position information of the optical port to be detected;
specifically, when the optical port to be detected and the target optical port are located in different switch boards, that is, the switch board where the optical port to be detected is located and the switch board where the target optical port is located are different switch boards, the switch board where the target optical port is located receives the position information of the optical port to be detected sent by the switch board where the optical port to be detected is located, and obtains the position information of the target optical port.
S202: and the exchange single board where the target optical port is located determines whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
Specifically, the switching board where the target optical port is located acquires position information of an expected optical port corresponding to the target optical port according to a set optical port connection topology relationship, and determines that the target optical port and the to-be-detected optical port are correctly connected when the position information of the to-be-detected optical port is consistent with the position information of the expected optical port corresponding to the target optical port; and when the position information of the optical port to be detected is inconsistent with the position information of the expected optical port corresponding to the target optical port, determining that the target optical port is connected with the optical port to be detected in a wrong way. Or, the exchange board where the target optical port is located acquires the position information of the expected optical port corresponding to the optical port to be detected according to the set optical port connection topology relationship, and when the position information of the expected optical port corresponding to the optical port to be detected is consistent with the position information of the target optical port, it is determined that the target optical port is correctly connected with the optical port to be detected; and when the position information of the expected optical port corresponding to the optical port to be detected is inconsistent with the position information of the target optical port, determining that the target optical port is connected with the optical port to be detected in a wrong way.
Here, if the position information of the optical port to be detected includes a frame number, a slot number, and an optical port number of the optical port to be detected, the position information of the optical port to be detected and the position information of the desired optical port corresponding to the target optical port are consistent in a one-to-one correspondence that the frame number, the slot number, and the optical port number of the optical port to be detected are the same as the frame number, the slot number, and the optical port number of the desired optical port corresponding to the target optical port, and the position information of the optical port to be detected and the position information of the desired optical port corresponding to the target optical port are inconsistent in a one-to-one correspondence that at least one of the frame number, the slot number, and the optical port number of the desired optical port corresponding to the target optical port is not the same as the frame number, the slot number, and the optical; correspondingly, the position information of the expected optical port corresponding to the optical port to be detected and the position information of the target optical port are consistent, namely, the frame number, the slot number and the optical port number of the expected optical port corresponding to the optical port to be detected are in one-to-one correspondence with the frame number, the slot number and the optical port number of the target optical port, and the position information of the expected optical port corresponding to the optical port to be detected and the position information of the target optical port are inconsistent, namely, at least one of the frame number, the slot number and the optical port number of the expected optical port corresponding to the optical port to be detected is in one-to-one correspondence with the frame number, the slot number and the optical port number of the target optical port.
It should be noted that the connections between the optical ports are in one-to-one correspondence, that is, a desired optical port uniquely corresponding to each optical port is specified in the optical port connection topological relation, that is, each optical port must be connected to the desired optical port corresponding to the optical port. In practical application, the optical interface connection topological relation can be described in a table mode. For example, if the optical port a is the only expected optical port that can be correspondingly connected to the optical port B, the frame number, the slot number, and the optical port number of the optical port a may be bound to the frame number, the slot number, and the optical port number of the optical port B to form a connection topology relationship between the optical port a and the optical port B, and the connection topology relationship may be stored in a table manner. The optical port connection topology relation can be preset according to actual conditions and stored in the switch board. For the switching board where the target optical port is located, the connection topology relations corresponding to all the optical ports of the switching board can be stored, and the connection topology relations corresponding to the optical ports of other switching boards can also be stored.
Therefore, when the optical port to be detected and the target optical port are located in different switch boards, the switch board where the target optical port is located determines whether the connection between the target optical port and the optical port to be detected is correct according to the set optical port connection topology relation, the position information of the target optical port and the position information of the optical port to be detected, and the switch board directly detects the optical port connection, so that the problems of time delay and external interference caused by introducing a third party for detection are solved, and the switch board is simple in detection process, high in detection speed and high in reliability.
In an optional embodiment, the method further comprises:
and the exchange single board where the target optical port is located sends out the position information of the target optical port through the target optical port.
Here, the switching board where the target optical port is located sends the position information of the target optical port through the target optical port, which may be understood as that the switching board where the target optical port is located sends the position information of the target optical port to the optical port to be detected through the target optical port. The switching board where the target optical port is located sends the position information of the target optical port to the optical port to be detected through the target optical port, where the switching board where the target optical port is located sends the position information of the target optical port to the optical port to be detected through the target optical port when detecting that a set sending condition is met, and the set sending condition may be that an optical cable is connected to the target optical port or that a difference between times of sending the position information of the target optical port last time at the current time is equal to a set time interval. When the target optical port is accessed by an optical cable, the exchange single board where the target optical port is located sends the position information of the target optical port to the optical port to be detected through the target optical port, which can be understood as that the exchange single board where the target optical port is located sends the position information of the target optical port outwards through the optical cable with one end inserted into the target optical port.
Therefore, the exchange single board where the target optical port is located sends the position information of the target optical port through the target optical port, so that the exchange single board where the target optical port is located or the exchange single board where the optical port to be detected is used for detecting whether the connection between the optical port to be detected and the target optical port is correct or not according to the position information of the target optical port, that is, whether the connection between the optical port to be detected and the target optical port is correct or not can be detected through the exchange single board, the complexity of detecting the optical port connection is reduced, and the reliability of detecting the optical port connection is improved.
In an optional embodiment, the method further comprises:
when the exchange single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is wrong, an alarm message is sent out; or,
when the exchange single board where the target optical port is located determines that the target optical port is connected with the optical port to be detected incorrectly, sending a prompt message carrying position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the switching single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is correct, sending a link establishment request through the target optical port.
Here, the sending of the alarm message may be sending of a connection error message between the target optical port and the optical port to be detected in a command line manner, so as to display the connection error message between the target optical port and the optical port to be detected on a display interface of the user telnet cluster router. The sending of the warning message may also be directly sending a warning message to a user to inform that the connection between the target optical port and the optical port to be detected is wrong. The sending of the warning message may also be triggering of a set indicator light to light up so as to inform that the connection between the target optical port and the optical port to be detected is wrong. For example, suppose that a connection status indicator lamp is correspondingly arranged on each optical port on the switch board, and when the optical ports are correctly connected, the connection status indicator lamp corresponding to the optical port is not turned on; and when the connection of the light port is wrong, the connection state indicator lamp corresponding to the light port is lightened. The switching board where the target optical port is located sends a link establishment request through the target optical port, which can be understood as that the switching board where the target optical port is located sends a set large flow message to the optical port to be detected through the target optical port, so as to inform that the connection between the target optical port and the optical port to be detected is correct. The switch board where the target optical port is located sends a link establishment request through the target optical port, which may be regarded as controlling the optical cable link establishment between the target optical port and the optical port to be detected. And when the switching single board where the target optical port is located determines that the target optical port is connected with the optical port to be detected incorrectly, sending a prompt message carrying the position information of the expected optical port corresponding to the target optical port or the position information of the expected optical port corresponding to the optical port to be detected so as to inform a user of changing the connection between the optical ports according to the prompt message. In addition, when the switch board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is in error, the switch board does not send a link establishment request through the target optical port, and may be regarded as controlling the optical cable link between the target optical port and the optical port to be detected to reset, so as to avoid the situations of packet loss or service interruption after the optical cable link is successfully established due to the optical cable insertion error.
Therefore, when the target optical port and the optical port to be detected are connected in error, namely the optical cable is inserted in error, the optical cable is prompted to be inserted in error by sending out an alarm, a prompt message and the like, the prompt mode is visual, and the prompt effect is good. When the connection between the target optical port and the optical port to be detected is correct, namely the optical cable is not inserted in a wrong way, the optical cable link is controlled to be established, and when the connection between the target optical port and the optical port to be detected is wrong, namely the optical cable is inserted in a wrong way, the optical cable link is controlled to be reset, so that the situations of packet loss or service interruption after the optical cable link is established successfully due to the optical cable insertion in a wrong way are avoided, and the detection flexibility is improved.
In an optional embodiment, the obtaining, by the switch board where the target optical port is located, the position information of the optical port to be detected includes:
the switch single board where the target optical port is located analyzes the received detection message sent by the switch single board where the optical port to be detected is located, and obtains the position information of the optical port to be detected; or,
and the exchange single board where the target optical port is located decodes the received code stream sent by the exchange single board where the optical port to be detected is located, so as to obtain the position information of the optical port to be detected.
Here, when the switch board where the optical port to be detected is located encapsulates the position information of the optical port to be detected to the set detection message or encodes the position information of the optical port to be detected, and sends the position information of the optical port to be detected to the target optical port through the optical port to be detected in a detection message or code stream manner, the switch board where the target optical port is located correspondingly analyzes the received detection message or decodes the code stream, thereby obtaining the position information of the optical port to be detected. Therefore, the interference of the external environment can be effectively avoided.
In order to implement the foregoing method, an embodiment of the present invention further provides an exchange board, as shown in fig. 3, where the exchange board includes: a first acquisition unit 10 and a first transmission unit 11; wherein,
the first obtaining unit 10 is configured to obtain position information of an optical port to be detected;
the first sending unit 11 is configured to send the position information of the optical port to be detected through the optical port to be detected.
In summary, in the switch board provided in the above embodiment, the switch board where the target optical port is located or the switch board where the optical port to be detected is located detects whether the connection between the optical port to be detected and the target optical port is correct according to the position information of the optical port to be detected by sending the position information of the optical port to be detected to the target optical port, that is, the switch board can complete the detection whether the connection between the optical port to be detected and the target optical port is correct, thereby reducing the complexity of detecting the optical port connection and improving the reliability of detecting the optical port connection.
In an optional embodiment, the switch board further includes: a judgment unit 12; wherein,
the first obtaining unit 10 is further configured to obtain position information of a target optical port, where the target optical port is an optical port that receives the position information of the optical port to be detected;
the determining unit 12 is configured to determine whether the connection between the target optical port and the optical port to be detected is correct according to a set optical port connection topology relationship, the position information of the target optical port, and the position information of the optical port to be detected.
Therefore, the optical port connection detection is directly realized by the exchange single board, the problems of time delay and external interference caused by introducing a third party for detection are avoided, the detection process is simple, the detection speed is high, and the reliability is high.
In an alternative embodiment of the method according to the invention,
the first sending unit 11 is further configured to send an alarm message when determining that the connection between the target optical port and the optical port to be detected is incorrect; or sending a prompt message when the connection error between the target optical port and the optical port to be detected is determined; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or, when the connection between the target optical port and the optical port to be detected is determined to be correct, a link establishment request is sent through the target optical port.
Therefore, when the connection error between the target optical port and the optical port to be detected, namely the optical cable is inserted wrongly, the optical cable is prompted to be inserted wrongly by sending out an alarm, a prompt message and the like, so that the prompt mode is visual and the prompt effect is good. When the connection between the target optical port and the optical port to be detected is correct, namely the optical cable is not inserted in error, the optical cable link is controlled to be established, and when the connection between the target optical port and the optical port to be detected is in error, namely the optical cable is inserted in error, the optical cable link is controlled to be reset, so that the situations of packet loss or service interruption after the optical cable link is established successfully due to the optical cable is inserted in error are avoided, and the detection flexibility is improved.
In an optional embodiment, the first sending unit 11 is specifically configured to:
when the optical port to be detected is accessed by the optical cable, the position information of the optical port to be detected is sent out through the optical port to be detected; or, the position information of the optical port to be detected is sent out through the optical port to be detected at set time intervals.
Therefore, when the optical port to be detected is connected with the optical cable, the position information of the optical port to be detected is sent out through the optical port to be detected, and the timeliness and the rapidity of detection of connection between the optical ports are improved. And the position information of the optical ports to be detected is sent out through the optical ports to be detected at set time intervals, so that the periodic detection of the connection between the optical ports is realized, and particularly, the detection of the connection between the optical ports can be automatically carried out again after the connection between the optical ports is changed. In addition, the diversity of the detection modes of the connection between the optical ports is enhanced.
In an optional embodiment, the switch board further includes: a first processing unit 13; wherein,
the first processing unit 13 is configured to encapsulate the position information of the optical port to be detected to a set detection message; or, coding the position information of the optical port to be detected according to a set coding mode to generate a code stream;
the first sending unit 11 is further configured to send the detection packet to a target optical port through the optical port to be detected; or, the code stream is sent to the target optical port through the optical port to be detected.
Therefore, the position information of the optical port to be detected is packaged to the set detection message or is coded and is sent out in a detection message or code stream mode, the speed of outward transmission of the position information of the optical port to be detected can be increased, the transmission time is saved, and the interference of the external environment can be effectively avoided.
In order to implement the foregoing method, an embodiment of the present invention further provides an exchange board, as shown in fig. 4, where the exchange board includes: a second acquisition unit 20 and a detection unit 21; wherein,
the second obtaining unit 20 is configured to obtain position information of an optical port to be detected and position information of a target optical port, where the target optical port is an optical port that receives the position information of the optical port to be detected;
the detection unit 21 is configured to determine whether the connection between the target optical port and the optical port to be detected is correct according to a set optical port connection topology relationship, the position information of the target optical port, and the position information of the optical port to be detected.
Therefore, when the optical port to be detected and the target optical port are located in different exchange single boards, whether the connection between the target optical port and the optical port to be detected is correct or not is determined according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected, the detection of the optical port connection is directly realized through the exchange single board, the problems of time delay and external interference caused by introducing a third party for detection are avoided, the detection process is simple, the detection speed is high, and the reliability is high.
In an optional embodiment, the switch board further includes: and a second sending unit 22, configured to send out position information of the target optical port through the target optical port.
Therefore, the position information of the target optical port is sent out through the target optical port, so that the exchange single board where the target optical port is located or the exchange single board where the optical port to be detected is located can detect whether the connection between the optical port to be detected and the target optical port is correct or not according to the position information of the target optical port, that is, the exchange single board can complete the detection whether the connection between the optical port to be detected and the target optical port is correct or not, thereby reducing the complexity of detecting the optical port connection and improving the reliability of detecting the optical port connection.
In an alternative embodiment of the method according to the invention,
the second sending unit 22 is further configured to send an alarm message when determining that the connection between the target optical port and the optical port to be detected is incorrect; or sending a prompt message carrying position information of the expected optical port corresponding to the target optical port or the optical port to be detected when the connection between the target optical port and the optical port to be detected is determined to be wrong; or, when the connection between the target optical port and the optical port to be detected is determined to be correct, a link establishment request is sent through the target optical port.
Therefore, when the target optical port and the optical port to be detected are connected in error, namely the optical cable is inserted in error, the optical cable is prompted to be inserted in error by sending out an alarm, a prompt message and the like, the prompt mode is visual, and the prompt effect is good. When the connection between the target optical port and the optical port to be detected is correct, namely the optical cable is not inserted in a wrong way, the optical cable link is controlled to be established, and when the connection between the target optical port and the optical port to be detected is wrong, namely the optical cable is inserted in a wrong way, the optical cable link is controlled to be reset, so that the situations of packet loss or service interruption after the optical cable link is established successfully due to the optical cable insertion in a wrong way are avoided, and the detection flexibility is improved.
In an optional embodiment, the switch board further includes: the second processing unit 23 is configured to analyze the received detection message sent by the switch board where the optical port to be detected is located, so as to obtain position information of the optical port to be detected; or, decoding the received code stream sent by the switch board where the optical port to be detected is located, so as to obtain the position information of the optical port to be detected.
Therefore, the interference of the external environment can be effectively avoided.
An embodiment of the present invention provides an exchange board, as shown in fig. 5, where the exchange board includes: a processor 310 and a memory 311 for storing computer programs capable of running on the processor 310; the processor 310 illustrated in fig. 5 is not used to refer to the number of the processors 310 as one, but is only used to refer to the position relationship of the processor 310 relative to other devices, and in practical applications, the number of the processors 310 may be one or more; similarly, the memory 311 shown in fig. 5 is also used in the same sense, i.e. it is only used to refer to the position relationship of the memory 311 with respect to other devices, and in practical applications, the number of the memory 311 may be one or more.
Wherein, when the processor 310 is configured to run the computer program, the following steps are executed:
acquiring the position information of the optical port to be detected;
and sending out the position information of the optical port to be detected through the optical port to be detected.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
acquiring position information of a target optical port, wherein the target optical port is the optical port receiving the position information of the optical port to be detected;
and determining whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
when the connection error between the target optical port and the optical port to be detected is determined, sending an alarm message; or,
when the connection error between the target optical port and the optical port to be detected is determined, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the connection between the target optical port and the optical port to be detected is determined to be correct, sending a link establishment request through the target optical port.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
when the optical port to be detected is accessed by the optical cable, the position information of the optical port to be detected is sent out through the optical port to be detected; or,
and sending out the position information of the optical port to be detected through the optical port to be detected at set time intervals.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
packaging the position information of the optical port to be detected to a set detection message, and sending the detection message through the optical port to be detected; or,
and coding the position information of the optical port to be detected according to a set coding mode to generate a code stream, and sending the code stream through the optical port to be detected.
The exchange single board further comprises: at least one network interface 312. The various components in the switch board are coupled together by a bus system 313. It will be appreciated that the bus system 313 is used to enable communications among the components connected. The bus system 313 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 313 in FIG. 5.
The memory 311 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 311 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
Memory 311 in embodiments of the present invention is used to store various types of data to support the operation of the switch board. Examples of such data include: any computer program for operation on the switch board, such as operating systems and application programs; contact data; telephone book data; a message; a picture; video, etc. The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs may include various application programs such as a Media Player (Media Player), a Browser (Browser), etc. for implementing various application services. Here, the program that implements the method of the embodiment of the present invention may be included in an application program.
Referring to fig. 5 again, an embodiment of the present invention provides another switch board, where the switch board includes: a processor 310 and a memory 311 for storing computer programs capable of running on the processor 310; the processor 310 illustrated in fig. 5 is not used to refer to the number of the processors 310 as one, but is only used to refer to the position relationship of the processor 310 relative to other devices, and in practical applications, the number of the processors 310 may be one or more; similarly, the memory 311 shown in fig. 5 is also used in the same sense, i.e. it is only used to refer to the position relationship of the memory 311 with respect to other devices, and in practical applications, the number of the memory 311 may be one or more.
Wherein, when the processor 310 is configured to run the computer program, the following steps are executed:
acquiring position information of an optical port to be detected and position information of a target optical port, wherein the target optical port is the optical port receiving the position information of the optical port to be detected;
and determining whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
and sending out the position information of the target light port through the target light port.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
when the connection error between the target optical port and the optical port to be detected is determined, sending an alarm message; or,
when the connection error between the target optical port and the optical port to be detected is determined, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the connection between the target optical port and the optical port to be detected is determined to be correct, sending a link establishment request through the target optical port.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
analyzing the received detection message sent by the exchange single board where the optical port to be detected is located to obtain the position information of the optical port to be detected; or,
and decoding the received code stream sent by the exchange single board where the optical port to be detected is located to obtain the position information of the optical port to be detected.
In an alternative embodiment, the processor 310 is further configured to execute the following steps when the computer program is executed:
when the connection error between the target optical port and the optical port to be detected is determined, sending an alarm message; or,
when the connection error between the target optical port and the optical port to be detected is determined, sending the prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; and/or the presence of a gas in the gas,
and when the connection between the target optical port and the optical port to be detected is determined to be correct, sending a link establishment request through the target optical port.
The embodiment further provides a computer storage medium, for example, including a memory 311 storing a computer program, where the computer program is executable by a processor 310 in a switch board to perform the steps of the foregoing method. The computer storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM; or may be a variety of devices including one or any combination of the above memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.
In one aspect, a computer storage medium having a computer program stored therein, the computer program when executed by a processor performs the steps of:
acquiring the position information of the optical port to be detected;
and sending out the position information of the optical port to be detected through the optical port to be detected.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
acquiring position information of a target optical port, wherein the target optical port is the optical port receiving the position information of the optical port to be detected;
and determining whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
when the connection error between the target optical port and the optical port to be detected is determined, sending an alarm message; or,
when the connection error between the target optical port and the optical port to be detected is determined, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the connection between the target optical port and the optical port to be detected is determined to be correct, sending a link establishment request through the target optical port.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
when the optical port to be detected is accessed by the optical cable, the position information of the optical port to be detected is sent out through the optical port to be detected; or,
and sending out the position information of the optical port to be detected through the optical port to be detected at set time intervals.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
packaging the position information of the optical port to be detected to a set detection message, and sending the detection message through the optical port to be detected; or,
and coding the position information of the optical port to be detected according to a set coding mode to generate a code stream, and sending the code stream through the optical port to be detected.
In another aspect, a computer storage medium having a computer program stored therein, the computer program when executed by a processor performs the steps of:
acquiring position information of an optical port to be detected and position information of a target optical port, wherein the target optical port is the optical port receiving the position information of the optical port to be detected;
and determining whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
and sending out the position information of the target light port through the target light port.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
when the connection error between the target optical port and the optical port to be detected is determined, sending an alarm message; or,
when the connection error between the target optical port and the optical port to be detected is determined, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the connection between the target optical port and the optical port to be detected is determined to be correct, sending a link establishment request through the target optical port.
In an alternative embodiment, the computer program, when executed by the processor, further performs the steps of:
analyzing the received detection message sent by the exchange single board where the optical port to be detected is located to obtain the position information of the optical port to be detected; or,
and decoding the received code stream sent by the exchange single board where the optical port to be detected is located to obtain the position information of the optical port to be detected.
As shown in fig. 6, the method for detecting optical interface connection provided by the embodiment of the present invention includes the following steps:
s201: the transmitting end transmits the position information of the optical port of the transmitting end to the receiving end;
here, the position information of the transmitting-end optical port includes a frame number, a slot number, and an optical port number of the transmitting-end optical port. The transmitting end can package the position information of the optical port of the transmitting end in a detection message or transmit the position information to the receiving end through an auto-negotiation code stream. In addition, the transmitting end can transmit the position information of the optical port of the transmitting end to the receiving end after the optical cable of the optical port of the transmitting end is inserted or at a certain time interval.
S202: the receiving end receives the position information of the optical port of the sending end and calculates the expected position information of the optical port of the opposite end according to the topological connection relation;
here, the topology connection relationship may be stored in a table form in a storage space of a board card where the optical port is located, that is, a switch board, according to a specific networking form of each manufacturer according to the cluster router, as shown in table 1.
Figure BDA0001732100340000231
TABLE 1
The source port represents a local port, and the desired port represents a port corresponding to the source port.
S203: comparing whether the position information of the optical port at the transmitting end is consistent with the position information of the optical port at the expected opposite end, if not, executing the step S204; if yes, go to step S206;
specifically, the receiving end compares the position information of the transmitting-end optical port sent by the transmitting end with the expected position information of the opposite-end optical port, and only when the two are completely consistent, that is, the frame number, the slot number, and the optical port number are completely the same, it is determined that the position information of the transmitting-end optical port is consistent with the expected position information of the opposite-end optical port, otherwise, the position information of the transmitting-end optical port is inconsistent with the expected position information of the opposite-end optical port.
S204: the receiving end prompts a user that the optical cable is inserted wrongly;
here, the receiving end prompting the user of the optical cable misplug includes: the receiving end prompts a user of the optical cable insertion error through a prompting lamp; or the receiving end informs the user of the wrong insertion of the optical cable through an alarm or a command line and prompts the expected opposite-end optical port position information.
S205: resetting the optical cable link at the receiving end;
here, the receiving end resets the optical cable link to prevent the occurrence of a situation that the optical cable connection is wrong and the link is normal, which causes a situation that a large amount of packet loss and even interruption of the service occur.
S206: and the receiving end initiates the optical cable link establishment.
Here, when the position information of the optical port at the transmitting end is consistent with the position information of the optical port at the expected opposite end, it is determined that the optical port is connected correctly, and the receiving end initiates optical cable link establishment.
In order to implement the above method, an embodiment of the present invention further provides an optical port connection detection apparatus, please refer to fig. 7, including:
a sending module 20, configured to send position information of the optical port to be detected to a receiving end, so that the receiving end obtains expected position information of the optical port at the opposite end according to calculation, and detects whether the optical cable is inserted incorrectly;
the position information of the optical port to be detected can be packaged in a message or sent to a receiving end through an auto-negotiation code stream.
The receiving module 21 is configured to receive position information of the optical port to be detected, which is sent by the sending end;
a determining module 22, configured to calculate to obtain the position information of the optical port at the expected opposite end according to the position information of the target optical port and the topological connection relationship of the optical ports of the cluster router, and compare the position information of the optical port to be tested obtained by the obtaining unit 10, so as to determine whether the optical cable is inserted in error;
and the processing module 23 is configured to perform further operations according to the result of whether the optical cable is inserted incorrectly obtained by the judging module 22. If the optical cable is inserted in error, prompting the user of the optical cable insertion error through an indicator lamp, prompting the user of correct position information of the opposite optical port in an alarm notification mode, and resetting an optical cable link; if so, initiating a link setup for the cable link.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. The scope of the invention is to be determined by the scope of the appended claims.

Claims (13)

1. An optical interface connection detection method, the method comprising:
the method comprises the steps that a switching single board where an optical port to be detected is located obtains position information of the optical port to be detected;
and the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected.
2. The method according to claim 1, wherein after the switch board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected, the method further comprises:
the exchange single board where the optical port to be detected is located acquires position information of a target optical port, wherein the target optical port is the optical port which receives the position information of the optical port to be detected;
and the exchange single board where the optical port to be detected is located determines whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
3. The method of claim 2, further comprising:
when the exchange single board where the optical port to be detected is located determines that the connection between the target optical port and the optical port to be detected is wrong, an alarm message is sent out; or,
when the exchange single board where the optical port to be detected is located determines that the connection between the target optical port and the optical port to be detected is wrong, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the switching single board where the optical port to be detected is located determines that the target optical port is correctly connected with the optical port to be detected, sending a link establishment request through the target optical port.
4. The method according to claim 1, wherein the step of sending the position information of the optical port to be detected by the exchange board where the optical port to be detected is located through the optical port to be detected comprises:
when the exchange single board where the optical port to be detected is located determines that the optical port to be detected has the optical cable access, the exchange single board sends out the position information of the optical port to be detected through the optical port to be detected; or,
and the exchange single board where the optical port to be detected is located sends out the position information of the optical port to be detected through the optical port to be detected at set time intervals.
5. The method according to any one of claims 1 to 3, wherein the step of sending the position information of the optical port to be detected by the exchange board where the optical port to be detected is located through the optical port to be detected comprises:
the exchange single board where the optical port to be detected is located encapsulates the position information of the optical port to be detected to a set detection message, and the detection message is sent out through the optical port to be detected; or,
and the exchange single board where the optical port to be detected is located encodes the position information of the optical port to be detected according to a set encoding mode to generate a code stream, and the code stream is sent out through the optical port to be detected.
6. An optical interface connection detection method, the method comprising:
the method comprises the steps that a switching single board where a target optical port is located obtains position information of an optical port to be detected and position information of the target optical port, wherein the target optical port is the optical port which receives the position information of the optical port to be detected;
and the exchange single board where the target optical port is located determines whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
7. The method according to claim 6, wherein after the switch board where the target optical port is located acquires the position information of the optical port to be detected and the position information of the target optical port, the method further comprises:
and the exchange single board where the target optical port is located sends out the position information of the target optical port through the target optical port.
8. The method of claim 6, further comprising:
when the exchange single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is wrong, an alarm message is sent out; or,
when the exchange single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is wrong, sending a prompt message; the prompt message carries position information of an expected optical port corresponding to the target optical port or the optical port to be detected; or,
and when the exchange single board where the target optical port is located determines that the connection between the target optical port and the optical port to be detected is correct, sending a link establishment request through the target optical port.
9. The method according to claim 6, wherein the obtaining of the position information of the optical port to be detected by the switch board where the target optical port is located includes:
the switch single board where the target optical port is located analyzes the received detection message sent by the switch single board where the optical port to be detected is located, and obtains the position information of the optical port to be detected; or,
and the exchange single board where the target optical port is located decodes the received code stream sent by the exchange single board where the optical port to be detected is located, so as to obtain the position information of the optical port to be detected.
10. A switch board, comprising:
the first acquisition unit is used for acquiring the position information of the optical port to be detected;
and the first sending unit is used for sending the position information of the optical port to be detected through the optical port to be detected.
11. A switch board, comprising:
a second obtaining unit, configured to obtain position information of an optical port to be detected and position information of a target optical port, where the target optical port is an optical port that receives the position information of the optical port to be detected;
and the detection unit is used for determining whether the connection between the target optical port and the optical port to be detected is correct or not according to the set optical port connection topological relation, the position information of the target optical port and the position information of the optical port to be detected.
12. A switch board comprising a processor and a memory for storing a computer program capable of running on the processor; wherein,
the processor is configured to execute the steps of the method for detecting an optical interface connection according to any one of claims 1 to 9 when running the computer program.
13. A computer storage medium, characterized in that a computer program is stored in the computer storage medium, which computer program, when being executed by a processor, performs the steps of the optical interface connection detection method according to any one of claims 1 to 9.
CN201810779006.1A 2018-07-16 2018-07-16 Optical interface connection detection method, exchange single board and computer storage medium Pending CN110730035A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810779006.1A CN110730035A (en) 2018-07-16 2018-07-16 Optical interface connection detection method, exchange single board and computer storage medium
PCT/CN2019/089242 WO2020015467A1 (en) 2018-07-16 2019-05-30 Optical port connection detection method and switch single board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810779006.1A CN110730035A (en) 2018-07-16 2018-07-16 Optical interface connection detection method, exchange single board and computer storage medium

Publications (1)

Publication Number Publication Date
CN110730035A true CN110730035A (en) 2020-01-24

Family

ID=69163850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810779006.1A Pending CN110730035A (en) 2018-07-16 2018-07-16 Optical interface connection detection method, exchange single board and computer storage medium

Country Status (2)

Country Link
CN (1) CN110730035A (en)
WO (1) WO2020015467A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020009269A1 (en) * 2000-05-08 2002-01-24 Mitel Semiconductor Ab Optical fiber interface device on folded circuit board
CN1728609A (en) * 2004-07-27 2006-02-01 华为技术有限公司 Method for detecting connection mode of devices with multiple frames
CN2874537Y (en) * 2006-03-15 2007-02-28 中兴通讯股份有限公司 Optical fiber connector
CN101621722A (en) * 2009-06-29 2010-01-06 中兴通讯股份有限公司 Method and system for automatically discovering node inner resource topology
CN103368643A (en) * 2012-04-01 2013-10-23 华为技术有限公司 Method, system and device for detecting optical fiber link

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6920287B1 (en) * 2000-08-01 2005-07-19 Nortel Networks Limited Smart connect
CN102594450B (en) * 2012-02-22 2015-06-03 中兴通讯股份有限公司 Method and device for preventing wrong insertion of optical cable of cluster router
CN108259260B (en) * 2017-01-24 2020-12-04 新华三技术有限公司 Link detection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020009269A1 (en) * 2000-05-08 2002-01-24 Mitel Semiconductor Ab Optical fiber interface device on folded circuit board
CN1728609A (en) * 2004-07-27 2006-02-01 华为技术有限公司 Method for detecting connection mode of devices with multiple frames
CN2874537Y (en) * 2006-03-15 2007-02-28 中兴通讯股份有限公司 Optical fiber connector
CN101621722A (en) * 2009-06-29 2010-01-06 中兴通讯股份有限公司 Method and system for automatically discovering node inner resource topology
CN103368643A (en) * 2012-04-01 2013-10-23 华为技术有限公司 Method, system and device for detecting optical fiber link

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张磊: "SDH传输设备中支路板软件的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
WO2020015467A1 (en) 2020-01-23

Similar Documents

Publication Publication Date Title
CN110752952B (en) Network fault positioning method and device, network equipment and computer storage medium
US20170163479A1 (en) Method, Device and System of Renewing Terminal Configuration In a Memcached System
CN107466079B (en) Automatic relay switching method and device
CN108512870A (en) Access method, platform of internet of things and the internet of things equipment of platform of internet of things
CN102571492B (en) Method and device for detecting failure of routing equipment
CN111263377B (en) Network configuration method, device, equipment and system and distribution network testing method and system
CN114553601B (en) Information verification method, device, equipment and medium
CN112118137A (en) Firmware upgrading method and device, computer equipment and readable storage medium
CN111541662B (en) Communication method based on binary communication protocol, electronic equipment and storage medium
CN114666097B (en) Communication method and system of Internet of things equipment
CN113261249A (en) Data transmission method, related equipment and computer storage medium
CN114363334B (en) Cloud system, network configuration method, device and equipment of cloud desktop virtual machine
CN113179295B (en) Message processing method and device
CN112769876A (en) Method, device, equipment and medium for acquiring equipment channel information
CN112600703B (en) Network equipment remote access fault positioning method and device
CN111511041B (en) Remote connection method and device
CN110730035A (en) Optical interface connection detection method, exchange single board and computer storage medium
US10079893B2 (en) M2M application request sending method, CSE and system
CN114244686B (en) Communication fault detection method, device and system
CN107547412B (en) STP calculation method and device
CN114576828B (en) Communication management method, bifurcation box, multi-split air conditioning system and storage medium
CN111130941B (en) Network error detection method and device and computer readable storage medium
CN105577427A (en) Detection method and device for communication connection between household appliance and mobile terminal
CN110635963B (en) Network state detection method and device
CN111478794B (en) Signaling message interaction method and device, terminal equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200124