WO2020015467A1 - 一种光口连接检测方法和交换单板 - Google Patents

一种光口连接检测方法和交换单板 Download PDF

Info

Publication number
WO2020015467A1
WO2020015467A1 PCT/CN2019/089242 CN2019089242W WO2020015467A1 WO 2020015467 A1 WO2020015467 A1 WO 2020015467A1 CN 2019089242 W CN2019089242 W CN 2019089242W WO 2020015467 A1 WO2020015467 A1 WO 2020015467A1
Authority
WO
WIPO (PCT)
Prior art keywords
optical port
detected
position information
target
switching board
Prior art date
Application number
PCT/CN2019/089242
Other languages
English (en)
French (fr)
Inventor
李昕
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020015467A1 publication Critical patent/WO2020015467A1/zh

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

Definitions

  • the present invention relates to the field of communications, and in particular, to a method for detecting an optical port connection and a switching single board.
  • Cluster routers are generally composed of multiple chassis cascades.
  • the cascades use dozens or even hundreds of optical cables, and cannot be connected at will. They need to be connected according to the specified topology according to the networking situation. Once the optical cable is connected incorrectly, it will cause service packet loss or even service interruption.
  • the connection relationship between the optical ports in the cluster router is usually marked by the manufacturer in the manual or operation manual, and the user is required to ensure the accuracy of the connection between the optical ports.
  • the number of optical ports is large, not only the complexity of the connection increases, but also the accuracy of the connection between the optical ports is difficult to guarantee. Faced with this situation, some methods are used to detect the accuracy of the connection between the optical ports of the cluster router.
  • the main control board of the cluster router receives the optical port information of each optical port reported on each switching board in real time and performs Check to confirm whether the optical ports are connected correctly.
  • the above method will increase the complexity and reduce the reliability of detecting the optical port connection.
  • embodiments of the present invention provide an optical port connection detection method and a switching board that can reduce detection complexity and improve reliability.
  • an embodiment of the present invention provides an optical port connection detection method, including:
  • the switching board on which the optical port to be detected sends position information of the optical port to be detected through the optical port to be detected.
  • an embodiment of the present invention provides an optical port connection detection method, including:
  • the switching board where the target optical port is located obtains the position information of the optical port to be detected and the position information of the target optical port, and the target optical port is an optical port that receives the position information of the optical port to be detected;
  • the switching board where the target optical port is located determines the target optical port and the optical port to be detected according to a set optical port connection topology relationship, position information of the target optical port, and position information of the optical port to be detected. Whether the connection is correct.
  • an embodiment of the present invention provides a switching board, including:
  • a first acquiring unit configured to acquire position information of an optical port to be detected
  • the first sending unit is configured to send position information of the optical port to be detected through the optical port to be detected.
  • an embodiment of the present invention provides a switching 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 position information of the optical port to be detected;
  • a detecting unit configured to determine 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 relationship, the position information of the target optical port, and the position information of the optical port to be detected .
  • an embodiment of the present invention provides a switching board, where the switching board includes a processor and a memory for storing a computer program capable of running on the processor;
  • the optical port connection detection method, the exchange board, and the computer storage medium provided in the foregoing embodiments obtain the position information of the optical port to be detected by the exchange board where the optical port to be detected is located, and pass the optical port to the target to the target light. If the position information of the optical port to be detected is sent from the optical port, the switching board on which the target optical port is located or the switching board on which the optical port is located can be detected based on the received position information of the optical port to be detected and the optical port connection topology relationship. Whether the connection between the optical port to be detected and the target optical port is correct, that is, whether the connection between the optical port to be detected and the target optical port is correctly detected can be completed by exchanging a single board, which reduces the optical port. The complexity of the connection detection and the reliability of the detection of the optical port connection are improved.
  • FIG. 1 is a schematic flowchart of an optical port connection detection method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an optical port connection detection method according to another embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a switching board according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a switching board in another embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a switching board in another embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a method for detecting an optical port connection in a specific embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an optical port connection detection device according to an embodiment of the present invention.
  • an optical port connection detection method which is applied to a switching board, includes the following steps:
  • S101 The switching board where the optical port to be detected obtains the position information of the optical port to be detected
  • a cluster router usually consists of multiple core routers and a central connection router, and each router contains one or more switching boards (also known as switching boards), and each switching board also has Will contain one or more optical ports. Only when the optical cable connections between the optical ports satisfy the specified topology relationship, can the cluster routers work normally.
  • the switching board When it is necessary to perform an optical cable connection detection on an optical port (referred to as an optical port to be detected) of a switching board in a router, the switching board (referred to as an exchange board on which the optical port to be tested is located) obtains the optical port to be tested.
  • the position information of the optical port includes a frame number, a slot number, and an optical port number of the optical port to be detected.
  • the frame number of the optical port to be detected indicates a frame where the optical port to be detected is located, and the frame includes a service core frame composed of a core router and a central switching frame composed of a central connection router;
  • the slot number of the port indicates the switching board on which the optical port to be detected resides;
  • the optical port number of the optical port on which to be detected represents the identification of the optical port on the switching board on which the optical port to be detected resides.
  • obtaining the position information of the optical port to be detected by the switching board on which the optical port to be detected is detected may be that the switching board on which the optical port is to be detected detects that the optical port to be detected has an optical cable access, that is, When the switching board where the optical port to be detected detects a signal from the optical port to be detected, the position information collection process of the optical port to be detected is triggered, that is, the position information of the optical port to be detected is acquired; The switch board where the optical port is detected triggers the collection of position information of the optical port to be detected at a set interval.
  • the optical port to be detected may be one optical port or multiple optical ports. In this embodiment, the optical port to be detected is an optical port as an example.
  • S102 The switch board where the optical port to be detected sends the position information of the optical port to be detected through the optical port to be detected.
  • the switching board on which the optical port to be detected sends the position information of the optical port through the optical port to be detected may be when the switching board on which the optical port is to be detected meets the set transmission conditions Sending position information of the to-be-detected optical port to the target optical port through the to-be-detected optical port, and the set sending condition may be detected that the to-be-detected optical port is connected with an optical cable, or the current time is sent to the last time
  • the time difference of the position information of the optical port to be detected is equal to a set time interval.
  • the switching board where the optical port to be detected sends the position information of the optical port to be detected to the target optical port through the optical port to be detected
  • the switching board where the optical port to be detected is located sends the position information of the optical port to be detected through an optical cable inserted into the optical port to be detected at one end, and the target optical port is an optical port connected to the other end of the optical cable.
  • the optical port to be detected and the target optical port may be located on the same switching board of the same router, and the optical port to be detected and the target optical port may be different from each other on the same router.
  • the switching board, the optical port to be detected and the target optical port may also be located on switching boards of different routers, respectively. That is, the switching board on which the optical port to be detected and the switching board on which the target optical port is located may be the same switching board or different switching boards in different application scenarios.
  • the position of the optical port to be detected is sent to the target optical port through the switching board where the optical port to be detected is located, so that the switching board where the target optical port is located is Or the switching board where the optical port to be detected is located is used to detect whether the connection between the optical port to be detected and the target optical port is correctly detected according to the position information of the optical port to be detected, that is, it can be completed by exchanging the board Detecting whether the connection between the optical port to be detected and the target optical port is correct reduces the complexity of detecting the optical port connection and improves the reliability of detecting the optical port connection.
  • the switch board where the optical port to be detected sends the position information of the optical port to be detected through the optical port to be detected includes:
  • the switching board on which the optical port to be detected determines that an optical cable is connected to the optical port to be detected, the position information of the optical port to be detected is sent through the optical port to be detected; or,
  • the switching board on which the optical port to be detected sends position information of the optical port to be detected through the optical port to be detected at a set time interval.
  • the switching board where the optical port to be detected determines that an optical cable is connected to the optical port to be detected, that is, when a signal is detected from the optical port to be detected, the optical port to be detected is sent through the optical port to be detected Or, according to a set time interval, the switching board on which the optical port to be detected sends the position information of the optical port to be detected through the optical port to be detected with the set time interval as a period.
  • the switching board on which the optical port to be detected detects that an optical cable is connected to the optical port to be detected, that is, the position information of the optical port to be detected is sent through the optical port to be detected, which improves light alignment. Timeliness and quickness of the port connection for detection.
  • the switch board where the optical port to be detected sends the position information of the optical port to be detected through the optical port at a set time interval, thereby realizing the periodic detection of the optical port connection, especially when the optical port is After the connection is changed, the optical port connection detection can be automatically performed again.
  • the variety of ways to detect the connection of an optical port is also enhanced.
  • the switch board where the optical port to be detected sends the position information of the optical port to be detected through the optical port to be detected includes:
  • the switching board where the optical port to be detected encapsulates the position information of the optical port to be detected into a set detection message, and sends the detection message through the optical port to be detected; or,
  • the switching board on which the optical port to be detected encodes the position information of the optical port to be detected according to a set encoding method, generates a code stream, and sends the code stream through the optical port to be detected.
  • the switching board where the optical port to be detected is encapsulated with the position information of the optical port to be set into a set detection message, or the position information of the optical port to be detected is encoded, and the detection message is used.
  • Sending the position information of the optical port to be detected in the form of a stream or a code stream can speed up the outward transmission of the position information of the optical port to be detected, save transmission time, and effectively avoid interference from the external environment.
  • the method further includes:
  • the switching board where the optical port to be detected obtains position information of the target optical port, where the target optical port is an optical port that receives position information of the optical port to be detected;
  • the switching board where the optical port to be detected is located determines the target optical port and the optical fiber to be detected according to a set optical port connection topology relationship, position information of the target optical port, and position information of the optical port to be detected. Whether the port is connected properly.
  • the switching board where the optical port to be detected obtains the position information of the target optical port, and obtains the position information of the desired optical port corresponding to the target optical port according to the set optical port connection topology relationship.
  • the position information of the optical port is consistent with the position information of the desired optical port corresponding to the target optical port, it is determined that the connection between the target optical port and the optical port to be detected is correct; when the position information of the optical port to be detected and When the position information of the desired optical port corresponding to the target optical port is not consistent, it is determined that the connection between the target optical port and the optical port to be detected is incorrect.
  • the switching board where the optical port to be detected obtains the position information of the target optical port, and obtains the position information of the desired optical port corresponding to the optical port to be detected according to the set optical port connection topology relationship.
  • the position information of the desired 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 connection between the target optical port and the optical port to be detected is correct;
  • the position information of the desired optical port is inconsistent with the position information of the target optical port, it is determined that the connection between the target optical port and the optical port to be detected is incorrect.
  • 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 corresponds to the position information of a desired optical port corresponding to the target optical port.
  • the frame number, slot number, and optical port number of the optical port to be detected are consistent with the frame number, slot number, and optical port number of the desired optical port corresponding to the target optical port, and the positions of the optical port to be detected are the same.
  • the information is inconsistent with the position information of the desired optical port corresponding to the target optical port.
  • At least one of the frame number, slot number, and optical port number of the optical port to be detected corresponds to the frame number of the desired optical port corresponding to the target optical port.
  • the slot number and the optical port number are not one-to-one corresponding; correspondingly, the position information of the desired optical port corresponding to the optical port to be detected is consistent with the position information of the target optical port to be the desired optical port corresponding to the optical port to be detected
  • the frame number, slot number, and optical port number of the target optical port are one-to-one corresponding to the frame number, slot number, and optical port number of the target optical port.
  • the position information of the desired optical port corresponding to the optical port to be detected is the same as that of the target optical port. Location information is inconsistent Said frame number optical port desired to be detected corresponding to the optical port, slot number, and at least one light slogan frame number of the target optical port, slot number and the same light slogans not correspond.
  • the connections between optical ports are one-to-one, that is, the desired optical port corresponding to each optical port is specified in the optical port connection topology, that is, each optical port should correspond to the optical port.
  • the optical port is expected to be connected.
  • the optical port connection topology relationship can be described in a table. For example, if optical port A is the only desired optical port corresponding to optical port B, you can bind the frame number, slot number, and optical port number of optical port A to the frame number, slot number, and optical port number of optical port B to form light.
  • the connection topology between port A and optical port B is stored in a table.
  • the optical port connection topology can be set in advance according to the actual situation and stored in the switching board.
  • the connection topology relationship corresponding to all the optical ports of the switch board can be stored, and the connection topology relationship corresponding to the optical ports of other switching boards can also be stored.
  • the switching board can actively acquire the target optical port after knowing the target optical port that has received the position information of the optical port to be detected. Location information. It should be noted that when the optical port to be detected and the target optical port are located on different switching boards, the switching board on which the target optical port is located determines that the target optical port has an optical cable and detects the target optical port. When the port has a signal, the position information of the target optical port is sent to the optical port to be detected through the target optical port, and then the switching board where the optical port to be detected is located obtains the position information of the target optical port.
  • the same switching board can be based on 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, so as to determine whether the connection between the target optical port and the optical port to be detected is correct, and the detection of the optical port connection can be completed on the same switching board; when the optical port to be detected
  • the target optical port is located on a different switching board, or the switching board on which the optical port to be detected is located or the switching board on which the target optical port is located can be detected, and the optical port connection can be directly detected by the switching board.
  • the method further includes:
  • the switching board on which the optical port to be detected determines that the connection between the target optical port and the optical port to be detected is incorrect, a prompt message is sent; the prompt message carries information related to the target optical port or the optical port to be detected. Position information of the desired optical port; or,
  • the issue of the alarm message may be a connection error message between the target optical port and the optical port to be detected is issued by a switching board on which the optical port to be detected is displayed through a command line, so that a user remotely logs in to the display of the cluster router.
  • the interface displays a connection error message between the target optical port and the optical port to be detected.
  • the sending of the warning message may also be sending a warning message directly to the user to inform that the target optical port and the optical port to be detected are connected incorrectly.
  • the issuing of the alarm message may also be that an indicator light triggered by the setting is turned on to inform that the target optical port is connected to the optical port to be detected incorrectly. For example, suppose that the connection status indicator is set for each optical port on the switching board.
  • the switching board on which the optical port to be detected sends a link establishment request through the target optical port can be understood as the switching board on which the optical port to be detected sends the set optical port to the optical port to be detected through the target optical port.
  • the switching board on which the optical port to be detected sends a link establishment request through the target optical port may be regarded as controlling the target optical port to establish a link with the optical cable link of the optical port to be detected.
  • the switching board on which the optical port to be detected determines that the connection between the target optical port and the optical port to be detected is incorrect, it sends position information that carries the desired optical port corresponding to the target optical port or communicates with the target optical port.
  • the prompt message of the position information of the desired optical port corresponding to the optical port is detected to inform the user to realize the correct connection between the optical ports according to the prompt message.
  • the switching board on which the optical port to be detected 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 can be considered as controlling the
  • the optical cable link between the target optical port and the optical port to be detected is reset to avoid situations where packet loss or service interruption occurs after the optical cable is inserted incorrectly and the optical cable is successfully established.
  • the connection between the target optical port and the optical port to be detected is incorrect, that is, the optical cable is incorrectly inserted, the optical fiber is incorrectly inserted by issuing an alarm, a prompt message, or the like.
  • the prompting method is intuitive and the prompting effect is good.
  • the connection between the target optical port and the optical port to be detected is correct, that is, the optical cable is not inserted incorrectly, control the optical cable link to establish a chain, and when the connection between the target optical port and the optical port to be detected is incorrect, the optical cable is When the insertion is wrong, the optical cable link is controlled to be reset to avoid packet loss or service interruption after the optical cable is inserted incorrectly and the optical cable link is successfully established, which improves the detection flexibility.
  • an optical port connection detection method which is applied to a switching board, includes the following steps:
  • the switch board where the target optical port is located obtains the position information of the optical port to be detected and the position information of the target optical port, and the target optical port is an optical port that receives the position information of the optical port to be detected;
  • the switching board on which the optical port to be detected is located and the switching board on which the target optical port is located are different switching boards,
  • the switching board where the target optical port is located receives the position information of the optical port to be detected and the position information of the target optical port sent by the switching board where the optical port to be detected is located.
  • S202 The switching board where the target optical port is located determines the target optical port and the target optical port according to the set topology of the optical port connection, the target optical port position information, and the target optical port position information. Whether the optical port is connected correctly.
  • the switching board where the target optical port is located obtains the position information of the desired optical port corresponding to the target optical port according to the set optical port connection topology relationship.
  • the position information of the optical port to be detected is related to the target optical port,
  • the position information of the desired optical port corresponding to the optical port is consistent, it is determined that the connection between the target optical port and the optical port to be detected is correct;
  • the position information of the optical port to be detected corresponds to the desired optical port corresponding to the target optical port
  • the position information of is inconsistent, it is determined that the connection between the target optical port and the optical port to be detected is incorrect.
  • the switching board where the target optical port is located acquires the position information of the desired optical port corresponding to the optical port to be detected according to the set optical port connection topology relationship.
  • the position information of the desired optical port corresponding to the optical port to be detected is related to the
  • the position information of the target optical port is consistent, it is determined that the connection between the target optical port and the optical port to be detected is correct; when the position information of the desired optical port corresponding to the optical port to be detected and the position of the target optical port are correct
  • the information is inconsistent, it is determined that the connection between the target optical port and the optical port to be detected is incorrect.
  • 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 corresponds to the position information of a desired optical port corresponding to the target optical port.
  • the frame number, slot number, and optical port number of the optical port to be detected are consistent with the frame number, slot number, and optical port number of the desired optical port corresponding to the target optical port, and the positions of the optical port to be detected are the same.
  • the information is inconsistent with the position information of the desired optical port corresponding to the target optical port.
  • At least one of the frame number, slot number, and optical port number of the optical port to be detected corresponds to the frame number of the desired optical port corresponding to the target optical port.
  • the slot number and the optical port number are not one-to-one corresponding; correspondingly, the position information of the desired optical port corresponding to the optical port to be detected is consistent with the position information of the target optical port to be the desired optical port corresponding to the optical port to be detected
  • the frame number, slot number, and optical port number of the target optical port are one-to-one corresponding to the frame number, slot number, and optical port number of the target optical port.
  • the position information of the desired optical port corresponding to the optical port to be detected is the same as that of the target optical port. Location information is inconsistent At least one of a frame number, a slot number, and an optical port number of a desired optical port corresponding to the optical port to be detected does not correspond to the frame number, the slot number, and the optical port number of the target optical port.
  • the connections between optical ports are one-to-one, that is, the optical port connection topology specifies the only desired optical port corresponding to each optical port, that is, each optical port must correspond to the optical port.
  • the desired optical port connection In practical applications, the optical port connection topology relationship can be described in a table. For example, if optical port A is the only desired optical port that can be connected to optical port B, you can bind the frame number, slot number, and optical port number of optical port A to the frame number, slot number, and optical port number of optical port B.
  • the connection topology relationship between optical port A and optical port B is formed and stored in a table manner.
  • the optical port connection topology can be set in advance according to the actual situation and stored in the switching board. For the switching board on which the target optical port is located, the connection topology corresponding to all the optical ports of the switch board can be stored, or the connection topology corresponding to the optical ports of other switching boards can be stored.
  • the switching board on which the target optical port is located is connected 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 is described, so as to determine whether the connection between the target optical port and the optical port to be detected is correct.
  • the detection of the optical port connection is directly implemented by the exchange board, which avoids the introduction of a third party for detection. Incoming delay and external interference not only make the detection process simple and fast, but also highly reliable.
  • the method further includes:
  • the switching board where the target optical port is located sends position information of the target optical port through the target optical port.
  • the switching board on which the target optical port is located sends the position information of the target optical port through the target optical port. It can be understood that the switching board on which the target optical port is located sends the target optical port to the optical port to be detected through the target optical port. Sending position information of the target optical port. The switching board on which 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.
  • Sending the position information of the target optical port to the to-be-detected optical port through the target optical port, and the set sending condition may be detecting that the target optical port is connected with an optical cable, or sending the target from the current time to the last time
  • the time difference between the position information of the optical ports is equal to the set time interval.
  • the switching board on which the target optical port is located sends the position information of the target optical port through the target optical port, so that the switching board on which the target optical port is located or the switching board on which the optical port to be detected is located according to the
  • the position information of the target optical port detects whether the connection between the optical port to be detected and the target optical port is correctly detected, that is, whether the connection between the optical port to be detected and the target optical port is completed by exchanging boards.
  • the correct detection reduces the complexity of detecting the optical port connection and improves the reliability of detecting the optical port connection.
  • the method further includes:
  • the switching board on which the target optical port is located determines that the connection between the target optical port and the optical port to be detected is incorrect, it sends a position carrying a desired optical port corresponding to the target optical port or the optical port to be detected Informational message; or,
  • the issue of the alarm message may be a connection error message between the target optical port and the optical port to be detected is issued through a command line, so as to display the target optical port and the A connection error message of the optical port to be detected.
  • the sending of the warning message may also be sending a warning message directly to the user to inform that the target optical port and the optical port to be detected are connected incorrectly.
  • the issuing of the alarm message may also be that an indicator light triggered by the setting is turned on to inform that the target optical port is connected to the optical port to be detected incorrectly. For example, suppose that the connection status indicator is set for each optical port on the switching board. When the optical port is connected correctly, the connection status indicator corresponding to the optical port is not lit. When the optical port is connected incorrectly, the light is on.
  • the switching board on which the target optical port is located sends a chain establishment request through the target optical port. It can be understood that the switching board on which the target optical port is located sends a large set of settings to the optical port to be detected through the target optical port. A traffic message to inform that the target optical port is correctly connected to the optical port to be detected.
  • the switching board on which the target optical port is located sends a chain establishment request through the target optical port, which can be regarded as controlling the establishment of a chain of an optical cable link between the target optical port and the optical port to be detected.
  • the switching board on which the target optical port is located determines that the connection between the target optical port and the optical port to be detected is incorrect, it sends position information carrying the desired optical port corresponding to the target optical port or the light to be detected.
  • a prompt message corresponding to the position information of the desired optical port to inform the user to change the connection between the optical ports according to the prompt message.
  • the switching board on which the target optical port is located determines that the connection between the target optical port and the optical port to be detected is incorrect, and does not issue a link establishment request through the target optical port, it can be regarded as controlling the target.
  • the optical cable link between the optical port and the to-be-detected optical port is reset to avoid situations such as packet loss or service interruption after the optical cable is inserted incorrectly and the optical cable link is successfully established.
  • the optical cable link is controlled to be reset to avoid packet loss or service interruption after the optical cable is inserted incorrectly and the optical cable link is successfully established, which improves the detection flexibility.
  • 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 switching board on which the target optical port is located analyzes the received detection message sent by the switching board on which the optical port to be detected is located, and obtains the position information of the optical port to be detected;
  • the switching board on which the target optical port is located decodes the received code stream sent by the switching board on which the optical port to be detected is located to obtain the position information of the optical port to be detected.
  • the switching board on which the optical port to be detected when the switching board on which the optical port to be detected is located, the position information of the optical port to be detected is encapsulated into a set detection message or the position information of the optical port to be detected is encoded, and the detection report is used.
  • the switching board on which the target optical port is located analyzes or detects the received detection packet accordingly.
  • the code stream is decoded to obtain the position information of the optical port to be detected. In this way, interference from the external environment can be effectively avoided.
  • an embodiment of the present invention further provides a switching board.
  • the switching board includes: a first obtaining unit 10 and a first sending unit 11;
  • 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 position information of the optical port to be detected through the optical port to be detected.
  • the switching board by sending position information of the optical port to be detected to a target optical port, the switching board on which the target optical port is located or the switching board on which the optical port to be detected is located is sent.
  • the board 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, that is, by exchanging a single board, the optical port and the optical port to be detected can be completed. Whether the target optical port connection is correctly detected reduces the complexity of detecting the optical port connection and improves the reliability of detecting the optical port connection.
  • the switching board further includes: a judging unit 12;
  • 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 position information of the optical port to be detected;
  • the determining unit 12 is configured to determine the relationship between the target optical port and the optical port to be detected 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. Whether the connection is correct.
  • the first sending unit 11 is further configured to send an alarm message when it is determined that the connection between the target optical port and the optical port to be detected is incorrect; or determine the connection between the target optical port and the optical port to be detected When an error occurs, a prompt message is sent; the prompt message carries position information of a desired optical port corresponding to the target optical port or the optical port to be detected; or, determining the target optical port and the optical port to be detected When the connection is correct, a link establishment request is issued through the target optical port.
  • the connection between the target optical port and the optical port to be detected is incorrect, that is, the optical cable is incorrectly inserted, the optical fiber is incorrectly inserted by issuing an alarm, a prompt message, etc.
  • the prompting method is intuitive and the prompting effect is good.
  • the connection between the target optical port and the optical port to be detected is correct, that is, the optical cable is not inserted incorrectly, control the optical cable link to establish a chain, and when the target optical port and the optical port to be detected are connected,
  • the connection is wrong, that is, when the optical cable is incorrectly inserted, the optical cable link is controlled to be reset to avoid packet loss or service interruption after the optical cable is incorrectly inserted and the optical cable link is successfully established, which improves the flexibility of detection.
  • the first sending unit 11 is specifically configured to:
  • the position information of the optical port to be detected is sent through the optical port to be detected; Position information of the optical port.
  • the position information of the optical port to be detected is sent out through the optical port to be detected, which improves the timeliness of detecting the connection between the optical ports and Fast.
  • the position information of the optical ports to be detected is sent through the optical ports to be detected at a set time interval, so that the periodic detection of the connections between the optical ports is realized, especially when the connections between the optical ports are changed, Can automatically re-test the connection between optical ports.
  • the variety of ways to detect the connection between optical ports is also enhanced.
  • the switching board further includes: a first processing unit 13;
  • the first processing unit 13 is configured to encapsulate the position information of the optical port to be detected into a set detection message; or, encode the position information of the optical port to be detected according to a set encoding mode to generate a code stream. ;
  • the first sending unit 11 is further configured to send the detection message to a target optical port through the optical port to be detected; or send the code stream to the target optical port through the optical port to be detected.
  • the position information of the optical port to be detected is encapsulated into a set detection message, or the position information of the optical port to be detected is encoded, and the to-be-detected is sent in the form of a detection message or code stream.
  • the position information of the optical port can speed up the outward transmission of the position information of the optical port to be detected, save transmission time, and effectively avoid interference from the external environment.
  • an embodiment of the present invention further provides a switching board.
  • the switching board includes: a second obtaining unit 20 and a detecting unit 21;
  • 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 position information of the optical port to be detected;
  • the detection unit 21 is configured to determine the relationship between the target optical port and the optical port to be detected 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. Whether the connection is correct.
  • the optical port to be detected and the target optical port are located on different switching boards, according to a set optical port connection topology relationship, position information of the target optical port, and position information of the optical port to be detected, Therefore, it is determined whether the connection between the target optical port and the optical port to be detected is correct, and the detection of the optical port connection is directly implemented by the switching board, thereby avoiding the delay and external interference caused by the introduction of a third party for detection. Not only the detection process is simple, the detection speed is fast, and the reliability is high.
  • the switching board further includes: a second sending unit 22, configured to send position information of the target optical port through the target optical port.
  • the position information of the target optical port is sent through the target optical port, so that the switching board on which the target optical port is located or the switching board on which the optical port to be detected is located according to the position information of the target optical port.
  • the second sending unit 22 is further configured to send an alarm message when it is determined that the connection between the target optical port and the optical port to be detected is incorrect; or determine the connection between the target optical port and the optical port to be detected When an error occurs, a prompt message carrying position information of a desired optical port corresponding to the target optical port or the optical port to be detected is issued; or, a connection between the target optical port and the optical port to be detected is determined When correct, a chain establishment request is issued through the target optical port.
  • the optical cable link is controlled to be reset to avoid packet loss or service interruption after the optical cable is inserted incorrectly and the optical cable link is successfully established, which improves the detection flexibility.
  • the switching board further includes: a second processing unit 23, configured to parse the received detection packet sent by the switching board where the optical port to be detected is located, to obtain the optical to be detected Position information of the optical port; or, decoding the received code stream sent by the switching board where the optical port to be detected is located to obtain the position information of the optical port to be detected.
  • a second processing unit 23 configured to parse the received detection packet sent by the switching board where the optical port to be detected is located, to obtain the optical to be detected Position information of the optical port; or, decoding the received code stream sent by the switching board where the optical port to be detected is located to obtain the position information of the optical port to be detected.
  • the switching board includes: a processor 310 and a memory 311 for storing a computer program capable of running on the processor 310;
  • the illustrated processor 310 is not used to refer to the number of processors 310 as one, but is only used to refer to the positional relationship of the processor 310 relative to other devices.
  • the number of processors 310 may be one Or multiple;
  • the memory 311 illustrated in FIG. 5 also has the same meaning, that is, it is only used to refer to the positional relationship of the memory 311 relative to other devices.
  • the number of the memory 311 may be one or more.
  • processor 310 When the processor 310 is configured to run the computer program, the processor 310 performs the following steps:
  • the position information of the optical port to be detected is sent through the optical port to be detected.
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • a prompt message is sent; the prompt message carries position information of a desired optical port corresponding to the target optical port or the optical port to be detected; or,
  • a link establishment request is sent through the target optical port.
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • the position information of the optical port to be detected is sent through the optical port to be detected;
  • the position information of the optical port to be detected is sent through the optical port to be detected at a set time interval.
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • the switching board further includes: at least one network interface 312.
  • the various components in the switching board are coupled together through a bus system 313.
  • the bus system 313 is used to implement connection and communication between these components.
  • the bus system 313 includes a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are marked as the bus system 313 in FIG. 5.
  • the memory 311 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories.
  • the non-volatile memory may be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), or an erasable programmable read-only memory (EPROM, Erasable Programmable Read- Only Memory), Electrically Erasable and Programmable Read-Only Memory (EEPROM), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , Compact disc, or read-only compact disc (CD-ROM, Compact Disc-Read-Only Memory); the magnetic surface memory can be a disk memory or a tape memory.
  • the volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache.
  • RAM random access memory
  • RAM Random Access Memory
  • many forms of RAM are available, such as Static Random Access Memory (SRAM, Static Random Access Memory), Synchronous Static Random Access Memory (SSRAM, Static Random Access, Memory), Dynamic Random Access DRAM (Dynamic Random Access Memory), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced Type Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Random Dynamic Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory) ).
  • the memory 311 described in the embodiments of the present invention is intended to include, but not limited to, these and any other suitable types of memory.
  • the memory 311 in the embodiment of the present invention is used to store various types of data to support the operation of the exchange single board.
  • data include: any computer program used to operate on the exchange board, such as operating systems and applications; contact data; phone book data; messages; pictures; videos;
  • the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks.
  • the application program may include various application programs, such as a media player (Player), a browser (Browser), etc., for implementing various application services.
  • the program for implementing the method of the embodiment of the present invention may be included in an application program.
  • an embodiment of the present invention provides another switching board.
  • the switching board includes: a processor 310 and a memory 311 for storing a computer program capable of running on the processor 310;
  • the processor 310 illustrated in the figure is not used to refer to the number of processors 310 as one, but is only used to refer to the positional relationship of the processor 310 relative to other devices.
  • the number of processors 310 may be One or more; similarly, the memory 311 illustrated in FIG. 5 also has the same meaning, that is, it is only used to refer to the positional relationship of the memory 311 relative to other devices.
  • the number of the memory 311 may be one or more. .
  • processor 310 When the processor 310 is configured to run the computer program, the processor 310 performs the following steps:
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • the position information of the target optical port is sent through the target optical port.
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • a prompt message is sent; the prompt message carries position information of a desired optical port corresponding to the target optical port or the optical port to be detected; or,
  • a link establishment request is sent through the target optical port.
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • processor 310 when the processor 310 is further configured to run the computer program, perform the following steps:
  • the prompt message is sent; the prompt message carries the position of the desired optical port corresponding to the target optical port or the optical port to be detected Information; and / or,
  • a link establishment request is sent through the target optical port.
  • This embodiment also provides a computer storage medium, for example, including a memory 311 storing a computer program, and the computer program may be executed by the processor 310 in the switching board to complete the steps in the foregoing method.
  • the computer storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM and other memories; it can also be various devices including one or any combination of the above memories, such as mobile phones , Computers, tablet devices, personal digital assistants, etc.
  • a computer storage medium stores a computer program in the computer storage medium, and when the computer program is run by a processor, the following steps are performed:
  • the position information of the optical port to be detected is sent through the optical port to be detected.
  • a prompt message is sent; the prompt message carries position information of a desired optical port corresponding to the target optical port or the optical port to be detected; or,
  • a link establishment request is sent through the target optical port.
  • the position information of the optical port to be detected is sent through the optical port to be detected;
  • the position information of the optical port to be detected is sent through the optical port to be detected at a set time interval.
  • a computer storage medium stores a computer program in the computer storage medium.
  • the following steps are performed:
  • the position information of the target optical port is sent through the target optical port.
  • a prompt message is sent; the prompt message carries position information of a desired optical port corresponding to the target optical port or the optical port to be detected; or,
  • a link establishment request is sent through the target optical port.
  • an optical port connection detection method includes the following steps:
  • the transmitting end sends the position information of the transmitting optical port to the receiving end;
  • the position information of the transmitting optical port includes a frame number, a slot number, and an optical port number of the transmitting optical port.
  • the transmitting end may encapsulate the position information of the optical end of the transmitting end in a detection message or send the receiving end through a self-negotiation code stream.
  • the transmitting end may send 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 plugged in, or at a certain time interval.
  • the receiving end receives the position information of the transmitting optical port, and calculates the expected position information of the opposite optical port according to the topology connection relationship;
  • the topological connection relationship may be stored in a table format in the storage space of the board where the optical port is located, that is, the switching board according to the specific networking form of the cluster router by each manufacturer, as shown in Table 1.
  • the source optical port indicates the local optical port
  • the desired optical port indicates the optical port corresponding to the source optical port
  • step S203 Compare whether the position information of the transmitting optical port and the expected position of the opposite optical port are consistent. If they are not consistent, go to step S204; if they are consistent, go to step S206;
  • the receiving end compares the position information of the transmitting optical port and the expected position information of the opposite optical port from the transmitting end only when the two are completely the same, that is, the frame number, the slot number, and the optical port number. Only when it is exactly the same, it is determined that the position information of the transmitting optical port is consistent with the expected position of the opposite optical port; otherwise, the position information of the transmitting optical port and the expected position of the opposite optical port are not consistent.
  • the receiving end prompts the user that the optical cable is incorrectly inserted includes: the receiving end prompts the user that the optical cable is incorrectly inserted; or, the receiving end notifies the user that the optical cable is incorrectly inserted through an alarm or a command line, and prompts the expected position of the opposite optical port.
  • the receiving end resets the optical cable link to prevent the optical cable connection error from occurring and the link is normal, resulting in a large amount of service packet loss or even interruption.
  • S206 The receiving end initiates the establishment of the optical fiber cable link.
  • an embodiment of the present invention further provides an optical port connection detection device. Referring to FIG. 7, it includes:
  • the sending module 20 is configured to send the position information of the optical port to be measured to the receiving end, so that the receiving end obtains the expected position information of the opposite optical port according to the calculation and detects whether the optical cable is incorrectly inserted;
  • the position information of the optical port to be measured may be encapsulated in a message, or sent to the receiving end through a self-negotiation code stream.
  • the receiving module 21 is configured to receive position information of an optical port to be measured sent by a transmitting end;
  • the judging module 22 is configured to calculate the desired position information of the opposite optical port according to the position information of the target optical port and the topology connection relationship of the optical ports of the cluster router, and to obtain the optical port to be measured obtained by the obtaining unit 10 To compare the position information of the cable to determine whether the optical cable is inserted incorrectly;
  • the processing module 23 is configured to perform further operations according to a result of whether the optical cable obtained by the determining module 22 is incorrectly inserted. If the optical cable is incorrectly inserted, the user is prompted to indicate that the optical cable is incorrectly inserted through an indicator, and the user is notified of the correct position of the opposite optical port through an alarm notification, and the optical cable link is reset. .

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

本发明实施例公开了一种光口连接检测方法,包括:待检测光口所在交换单板获取所述待检测光口的位置信息;所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息。本发明实施例还公开了一种交换单板。

Description

一种光口连接检测方法和交换单板
本申请要求享有2018年07月16日提交的名称为“一种光口连接检测方法、交换单板及计算机存储介质”的中国专利申请CN201810779006.1的优先权,其全部内容通过引用并入本文中。
技术领域
本发明涉及通信领域,尤其涉及一种光口连接检测方法和交换单板。
背景技术
集群路由器一般由多个机框级联组成,级联所使用的光缆有几十乃至数百根之多,且不能随意连接,需要根据组网情况按照指定的拓扑关系进行连接。一旦光缆连接错误,会导致业务丢包甚至业务中断。集群路由器中各个光口之间的连接关系通常由厂家通过在说明书或操作手册中进行标明,依靠用户来保证光口之间连接的准确性。然而,在光口数目较多的情况下,不仅连接的复杂度增大,而且光口之间连接的准确性也难以保证。面对这种情况,一些方法被用于检测集群路由器的光口之间连接的准确性,例如,利用集群路由器主控单板实时接收各交换单板上告的各光口的光口信息并进行校验,以确认光口之间是否连接正确。然而,上述方法将增加对光口连接进行检测的复杂度和降低可靠性。
发明内容
为解决现有技术存在的问题,本发明实施例提供一种能够降低检测复杂度和提高可靠性的光口连接检测方法和交换单板。
为达到上述目的,本发明实施例的技术方案是这样实现的:
第一方面,本发明实施例提供了一种光口连接检测方法,包括:
待检测光口所在交换单板获取所述待检测光口的位置信息;
所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息。
第二方面,本发明实施例提供了一种光口连接检测方法,包括:
目标光口所在交换单板获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
所述目标光口所在交换单板根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
第三方面,本发明实施例提供了一种交换单板,包括:
第一获取单元,用于获取待检测光口的位置信息;
第一发送单元,用于通过所述待检测光口发出所述待检测光口的位置信息。
第四方面,本发明实施例提供了一种交换单板,包括:
第二获取单元,用于获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
检测单元,用于根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
第五方面,本发明实施例提供了一种交换单板,所述交换单板包括处理器和用于存储能够在处理器上运行的计算机程序的存储器;其中,
所述处理器用于运行所述计算机程序时,执行第一方面或第二方面所述光口连接检测方法的步骤。
上述实施例所提供的光口连接检测方法、交换单板及计算机存储介质,待检测光口所在交换单板获取所述待检测光口的位置信息,并通过所述待检测光口向目标光口发出所述待检测光口的位置信息,则目标光口所在交换单板或待检测光口所在交换单板能够根据接收到的待检测光口的位置信息以及光口连接拓扑关系,来检测所述待检测光口与所述目标光口的连接是否正确,即通过交换单板就可以完成对所述待检测光口与所述目标光口的连接是否正确的检测,降低了对光口连接进行检测的复杂度和提高了对光口连接进行检测的可靠性。
附图说明
图1为本发明一实施例中光口连接检测方法的流程示意图;
图2为本发明另一实施例中光口连接检测方法的流程示意图;
图3为本发明一实施例中交换单板的结构示意图;
图4为本发明另一实施例中交换单板的结构示意图;
图5为本发明又一实施例中交换单板的结构示意图;
图6为本发明一具体实施例中光口连接检测方法的流程示意图;
图7为本发明一实施例中光口连接检测装置的结构示意图。
具体实施方式
以下结合说明书附图及具体实施例对本发明技术方案做进一步的详细阐述。除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“和/或”包括一个或多个相关的所列项目的任意的和所有的组合。
参见图1,为本发明实施例提供的一种光口连接检测方法,应用于交换单板,包括以下步骤:
S101:待检测光口所在交换单板获取所述待检测光口的位置信息;
可以理解地,集群路由器通常由多个核心路由器和中心连接路由器组成,而每个路由器中都包含有一个或多个交换单板(也可称为交换板卡),每个交换单板上也会包含一个或多个光口。各个光口之间的光缆连接只有满足指定的拓扑关系,才能确保集群路由器能够正常工作。当需要对某路由器中的某交换单板的光口(简称为待检测光口)进行光缆连接检测时,该交换单板(简称为待检测光口所在交换单板)获取所述待检测光口的位置信息,本实施例中,所述待检测光口的位置信息包括待检测光口的框号、槽位号和光口号。其中,所述待检测光口的框号表示待检测光口所在的机框,所述机框包括由核心路由器组成的业务核心框和由中心连接路由器组成的中心交换框;所述待检测光口的槽位号表示待检测光口所在的交换单板;所述待检测光口的光口号表示待检测光口在所述待检测光口所在的交换单板上的标识。由于每个光口都具有唯一的地址信息,也即每个光口的位置信息与光口之间具有唯一对应关系,因此,根据所述待检测光口的位置信息可唯一确定所述待检测光口。
这里,所述待检测光口所在交换单板获取所述待检测光口的位置信息,可以是所述待检测光口所在交换单板检测到所述待检测光口有光缆接入,即所述待检测光口所在交换单板检测到所述待检测光口有信号时,触发待检测光口的位置信息收集过程,即获取所述待 检测光口的位置信息;也可以是所述待检测光口所在交换单板以设定时间间隔,触发待检测光口的位置信息收集过程。需要说明的是,所述待检测光口可以是一个光口,也可以是多个光口,本实施例中以所述待检测光口为一个光口为例。
S102:所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息。
这里,所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息,可以是所述待检测光口所在交换单板检测到满足设置的发送条件时,通过所述待检测光口向目标光口发送所述待检测光口的位置信息,所述设置的发送条件可以是检测到所述待检测光口有光缆接入、或当前时间至上一次发送所述待检测光口的位置信息的时间的差值等于设定时间间隔。当所述待检测光口有光缆接入时,所述待检测光口所在交换单板通过所述待检测光口向目标光口发送所述待检测光口的位置信息,可以理解为是所述待检测光口所在交换单板通过一端插入所述待检测光口的光缆向外发送所述待检测光口的位置信息,所述目标光口为与所述光缆的另一端连接的光口。
需要说明的是,所述待检测光口和所述目标光口可以是位于同一路由器的同一交换单板上,所述待检测光口和所述目标光口也可以是分别位于同一路由器的不同交换单板上,所述待检测光口和所述目标光口还可以是分别位于不同路由器的交换单板上。也就是说,所述待检测光口所在交换单板与所述目标光口所在交换单板在不同的应用场景中可以是同一交换单板,也可以是不同交换单板。
综上,上述实施例提供的光口连接检测方法中,通过待检测光口所在交换单板向目标光口发送所述待检测光口的位置信息,而使所述目标光口所在交换单板或所述待检测光口所在交换单板根据所述待检测光口的位置信息、对所述待检测光口与所述目标光口的连接是否正确进行检测,即通过交换单板就可以完成对所述待检测光口与所述目标光口的连接是否正确的检测,降低了对光口连接进行检测的复杂度和提高了对光口连接进行检测的可靠性。
在一个可选的实施例中,所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息,包括:
所述待检测光口所在交换单板确定所述待检测光口有光缆接入时,通过所述待检测光口发出所述待检测光口的位置信息;或,
所述待检测光口所在交换单板以设定时间间隔通过所述待检测光口发出所述待检测光口的位置信息。
具体地,所述待检测光口所在交换单板确定所述待检测光口有光缆接入即检测到所述待检测光口有信号时,通过所述待检测光口发出所述待检测光口的位置信息;或者,根据设定时间间隔,所述待检测光口所在交换单板以所述设定时间间隔为周期通过所述待检测光口发出所述待检测光口的位置信息。
如此,当所述待检测光口所在交换单板检测到所述待检测光口有光缆接入时,即通过所述待检测光口发出所述待检测光口的位置信息,提高了对光口连接进行检测的及时性和快速性。而所述待检测光口所在交换单板以设定时间间隔通过所述待检测光口发出所述待检测光口的位置信息,实现了对光口连接的周期性检测,特别是当光口的连接发生变化后,能够自动重新进行光口连接的检测。此外,也增强了对光口连接进行检测的方式多样性。
在一个可选的实施例中,所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息,包括:
所述待检测光口所在交换单板封装所述待检测光口的位置信息至设置的探测报文,通过所述待检测光口发出所述探测报文;或者,
所述待检测光口所在交换单板按照设置的编码方式对所述待检测光口的位置信息进行编码,生成码流,通过所述待检测光口发出所述码流。
如此,所述待检测光口所在交换单板通过将所述待检测光口的位置信息封装至设置的探测报文、或者对所述待检测光口的位置信息进行编码,并以探测报文或码流的方式发出所述待检测光口的位置信息,能够加快所述待检测光口的位置信息向外传输的速度,节省传输时间,并且能够有效避免外界环境的干扰。
在一个可选的实施例中,所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息之后,该方法还包括:
所述待检测光口所在交换单板获取所述目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
所述待检测光口所在交换单板根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
具体地,所述待检测光口所在交换单板获取目标光口的位置信息,并根据设置的光口连接拓扑关系获取所述目标光口对应的期望光口的位置信息,当所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息一致时,确定所述目标光口与所述待检测光口的连接正确;当所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息 不一致时,确定所述目标光口与所述待检测光口的连接错误。或者,所述待检测光口所在交换单板获取所述目标光口的位置信息,并根据设置的光口连接拓扑关系获取所述待检测光口对应的期望光口的位置信息,当所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息一致时,确定所述目标光口与所述待检测光口的连接正确;当所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息不一致时,确定所述目标光口与所述待检测光口的连接错误。
这里,若所述待检测光口的位置信息包括待检测光口的框号、槽位号和光口号,所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息一致为所述待检测光口的框号、槽位号和光口号与所述目标光口对应的期望光口的框号、槽位号和光口号一一对应相同,所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息不一致为所述待检测光口的框号、槽位号和光口号中至少一个与所述目标光口对应的期望光口的框号、槽位号和光口号不一一对应相同;相应的,所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息一致为所述待检测光口对应的期望光口的框号、槽位号和光口号与所述目标光口的框号、槽位号和光口号一一对应相同,所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息不一致为所述待检测光口对应的期望光口的框号、槽位号和光口号中至少一个与所述目标光口的框号、槽位号和光口号不一一对应相同。
需要说明的是,光口之间的连接是一一对应的,即光口连接拓扑关系中指定了每个光口对应的期望光口,也就是说每个光口应该与该光口对应的期望光口连接。在实际应用中,可以以表格方式描述光口连接拓扑关系。例如,光口A是光口B唯一对应的期望光口,则可以将光口A的框号、槽位号和光口号与光口B的框号、槽位号和光口号进行绑定后形成光口A与光口B之间的连接拓扑关系,并以表格方式存储。所述光口连接拓扑关系可以根据实际情况预先进行设置并存储在交换单板中。对于所述待检测光口所在交换单板而言,可存储自身所有光口对应的连接拓扑关系,还可存储其它交换单板的光口对应的连接拓扑关系。当所述待检测光口和所述目标光口位于同一交换单板时,该交换单板获知接收到所述待检测光口的位置信息的目标光口后,可主动获取所述目标光口的位置信息。需要说明的是,当所述待检测光口和所述目标光口位于不同交换单板,所述目标光口所在交换单板确定所述目标光口有光缆接入即检测到所述目标光口有信号时,会通过所述目标光口向待检测光口发送所述目标光口的位置信息,则所述待检测光口所在交换单板获取所述目标光口的位置信息。
如此,当所述待检测光口和所述目标光口位于同一交换单板时,所述同一交换单板即 可根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,从而确定所述目标光口与所述待检测光口的连接是否正确,对光口连接的检测可以都在同一交换单板上完成;当所述待检测光口和所述目标光口位于不同交换单板,也可以由所述待检测光口所在交换单板或所述目标光口所在交换单板完成检测,通过由交换单板直接实现光口连接的检测,避免了引入第三方进行检测所带来的延时和外界干扰问题,不仅检测过程简单、检测速度快,而且可靠性高。
在一个可选的实施例中,该方法还包括:
所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,
所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
这里,所述发出告警消息可以是所述待检测光口所在交换单板通过命令行方式发出所述目标光口与所述待检测光口的连接错误消息,以在用户远程登录集群路由器的显示界面显示所述目标光口与所述待检测光口的连接错误消息。所述发出告警消息也可以是向用户直接发送告警消息,以告知所述目标光口与所述待检测光口的连接错误。所述发出告警消息还可以是触发设置的指示灯点亮,以告知所述目标光口与所述待检测光口的连接错误。例如,假设交换单板上为每个光口对应设置了连接状态指示灯,当光口连接正确时,不点亮该光口对应的连接状态指示灯;当光口连接错误时,点亮该光口对应的连接状态指示灯。所述待检测光口所在交换单板通过所述目标光口发出建链请求,可以理解为所述待检测光口所在交换单板通过所述目标光口向所述待检测光口发送设置的一大流量报文,以告知所述目标光口与所述待检测光口的连接正确。所述待检测光口所在交换单板通过所述目标光口发出建链请求,可以看作是控制所述目标光口与所述待检测光口的光缆链路建链。所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出携带有与所述目标光口对应的期望光口的位置信息或与所述待检测光口对应的期望光口的位置信息的提示消息,以告知用户根据所述提示消息实现光口之间的正确连接。此外,当所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,不通过所述目标光口发出建链请求,可以看作是控制所述目标光口与所述待检测光口之间的光缆链路 复位,以避免出现在光缆插错而光缆建链成功后出现丢包或业务中断的情况。
如此,当所述目标光口与所述待检测光口的连接错误,即光缆插错时,通过发出告警、提示消息等方式提示光缆插错,提示方式直观,且提示效果好。当所述目标光口与所述待检测光口的连接正确即光缆未插错时,控制所述光缆链路建链,而当所述目标光口与所述待检测光口的连接错误即光缆插错时,控制所述光缆链路复位,避免出现在光缆插错而光缆链路建链成功后出现丢包或业务中断的情况,提高了检测的灵活性。
参见图2,为本发明实施例提供的一种光口连接检测方法,应用于交换单板,包括以下步骤:
S201:目标光口所在交换单板获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
具体地,当所述待检测光口和所述目标光口位于不同交换单板,即所述待检测光口所在交换单板与所述目标光口所在交换单板为不同交换单板时,目标光口所在交换单板接收待检测光口所在交换单板发送的待检测光口的位置信息、以及获取目标光口的位置信息。
S202:所述目标光口所在交换单板根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
具体地,所述目标光口所在交换单板根据设置的光口连接拓扑关系获取所述目标光口对应的期望光口的位置信息,当所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息一致时,确定所述目标光口与所述待检测光口的连接正确;当所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息不一致时,确定所述目标光口与所述待检测光口的连接错误。或者,目标光口所在交换单板根据设置的光口连接拓扑关系获取所述待检测光口对应的期望光口的位置信息,当所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息一致时,确定所述目标光口与所述待检测光口的连接正确;当所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息不一致时,确定所述目标光口与所述待检测光口的连接错误。
这里,若所述待检测光口的位置信息包括待检测光口的框号、槽位号和光口号,所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息一致为所述待检测光口的框号、槽位号和光口号与所述目标光口对应的期望光口的框号、槽位号和光口号一一对应相同,所述待检测光口的位置信息与所述目标光口对应的期望光口的位置信息不一致 为所述待检测光口的框号、槽位号和光口号中至少一个与所述目标光口对应的期望光口的框号、槽位号和光口号不一一对应相同;相应的,所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息一致为所述待检测光口对应的期望光口的框号、槽位号和光口号与所述目标光口的框号、槽位号和光口号一一对应相同,所述待检测光口对应的期望光口的位置信息与所述目标光口的位置信息不一致为所述待检测光口对应的期望光口的框号、槽位号和光口号中至少一个与所述目标光口的框号、槽位号和光口号不一一对应相同。
需要说明的是,光口之间的连接是一一对应的,即光口连接拓扑关系中指定了每个光口唯一对应的期望光口,也就是说每个光口必须与该光口对应的期望光口连接。在实际应用中,可以以表格方式描述光口连接拓扑关系。例如,光口A是光口B唯一可对应连接的期望光口,则可以将光口A的框号、槽位号和光口号与光口B的框号、槽位号和光口号进行绑定后形成光口A与光口B之间的连接拓扑关系,并以表格方式存储。所述光口连接拓扑关系可以根据实际情况预先进行设置并存储在交换单板中。对于所述目标光口所在交换单板而言,可存储自身所有光口对应的连接拓扑关系,也可存储其它交换单板的光口对应的连接拓扑关系。
如此,当所述待检测光口和所述目标光口位于不同交换单板时,所述目标光口所在交换单板根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,从而确定所述目标光口与所述待检测光口的连接是否正确,通过由交换单板直接实现光口连接的检测,避免了引入第三方进行检测所带来的延时和外界干扰问题,不仅检测过程简单、检测速度快,而且可靠性高。
在一个可选的实施例中,该方法还包括:
所述目标光口所在交换单板通过所述目标光口发出所述目标光口的位置信息。
这里,所述目标光口所在交换单板通过所述目标光口发出所述目标光口的位置信息,可以理解为所述目标光口所在交换单板通过所述目标光口向待检测光口发送所述目标光口的位置信息。所述目标光口所在交换单板通过所述目标光口向待检测光口发送所述目标光口的位置信息,可以是所述目标光口所在交换单板检测到满足设置的发送条件时,通过所述目标光口向待检测光口发送所述目标光口的位置信息,所述设置的发送条件可以是检测到所述目标光口有光缆接入、或当前时间至上一次发送所述目标光口的位置信息的时间的差值等于设定时间间隔。当所述目标光口有光缆接入时,所述目标光口所在交换单板通过所述目标光口向待检测光口发送所述目标光口的位置信息,可以理解为是所述目标光口 所在交换单板通过一端插入所述目标光口的光缆向外发送所述目标光口的位置信息。
如此,目标光口所在交换单板通过所述目标光口发出所述目标光口的位置信息,而使所述目标光口所在交换单板或所述待检测光口所在交换单板根据所述目标光口的位置信息对所述待检测光口与所述目标光口的连接是否正确进行检测,即通过交换单板就可以完成对所述待检测光口与所述目标光口的连接是否正确的检测,降低了对光口连接进行检测的复杂度和提高了对光口连接进行检测的可靠性。
在一个可选的实施例中,该方法还包括:
所述目标光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
所述目标光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息的提示消息;或,
所述目标光口所在交换单板确定所述目标光口与所述待检测光口之间的连接正确时,通过所述目标光口发出建链请求。
这里,所述发出告警消息可以是通过命令行方式发出所述目标光口与所述待检测光口之间的连接错误消息,以在用户远程登录集群路由器的显示界面显示所述目标光口与所述待检测光口的连接错误消息。所述发出告警消息也可以是向用户直接发送告警消息,以告知所述目标光口与所述待检测光口的连接错误。所述发出告警消息还可以是触发设置的指示灯点亮,以告知所述目标光口与所述待检测光口的连接错误。例如,假设交换单板上为每个光口对应设置了连接状态指示灯,当光口连接正确时,不点亮该光口对应的连接状态指示灯;当光口连接错误时,点亮该光口对应的连接状态指示灯。所述目标光口所在交换单板通过所述目标光口发出建链请求,可以理解为所述目标光口所在交换单板通过所述目标光口向所述待检测光口发送设置的一大流量报文,以告知所述目标光口与所述待检测光口的连接正确。所述目标光口所在交换单板通过所述目标光口发出建链请求,可以看作是控制所述目标光口与所述待检测光口之间的光缆链路建链。所述目标光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出携带有与所述目标光口对应的期望光口的位置信息或所述待检测光口对应的期望光口的位置信息的提示消息,以告知用户根据所述提示消息改变光口之间的连接。此外,当所述目标光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,不通过所述目标光口发出建链请求,可以看作是控制所述目标光口与所述待检测光口之间的光缆链路复位,以避免出现在光缆插错而光缆链路建链成功后出现丢包或业务中断的情况。
如此,当所述目标光口与所述待检测光口的连接错误即光缆插错时,通过发出告警、提示消息等方式提示光缆插错,提示方式直观,且提示效果好。当所述目标光口与所述待检测光口的连接正确即光缆未插错时,控制所述光缆链路建链,而当所述目标光口与所述待检测光口的连接错误即光缆插错时,控制所述光缆链路复位,避免出现在光缆插错而光缆链路建链成功后出现丢包或业务中断的情况,提高了检测的灵活性。
在一个可选的实施例中,所述目标光口所在交换单板获取所述待检测光口的位置信息,包括:
所述目标光口所在交换单板对接收到的所述待检测光口所在交换单板发送的探测报文进行解析,获得待检测光口的位置信息;或者,
所述目标光口所在交换单板对接收到的所述待检测光口所在交换单板发送的码流进行解码,获得待检测光口的位置信息。
这里,当所述待检测光口所在交换单板是通过将所述待检测光口的位置信息封装至设置的探测报文或者对所述待检测光口的位置信息进行编码,并以探测报文或码流的方式将所述待检测光口的位置信息通过待检测光口发送给目标光口时,所述目标光口所在交换单板相应的对接收到的探测报文进行解析或对码流进行解码,从而获得待检测光口的位置信息。如此,能够有效避免外界环境的干扰。
为实现上述方法,本发明实施例还提供了一种交换单板,如图3所示,该交换单板包括:第一获取单元10和第一发送单元11;其中,
所述第一获取单元10,用于获取待检测光口的位置信息;
所述第一发送单元11,用于通过所述待检测光口发出所述待检测光口的位置信息。
综上,上述实施例提供的交换单板中,通过向目标光口发送所述待检测光口的位置信息,而使所述目标光口所在交换单板或所述待检测光口所在交换单板根据所述待检测光口的位置信息、对所述待检测光口与所述目标光口的连接是否正确进行检测,即通过交换单板就可以完成对所述待检测光口与所述目标光口的连接是否正确的检测,降低了对光口连接进行检测的复杂度和提高了对光口连接进行检测的可靠性。
在一个可选的实施例中,该交换单板还包括:判断单元12;其中,
所述第一获取单元10,还用于获取目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
所述判断单元12,用于根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
如此,通过由交换单板直接实现光口连接的检测,避免了引入第三方进行检测所带来的延时和外界干扰问题,不仅检测过程简单、检测速度快,而且可靠性高。
在一个可选的实施例中,
所述第一发送单元11,还用于确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
如此,当所述目标光口与所述待检测光口之间的连接错误,即光缆插错时,通过发出告警、提示消息等方式提示光缆插错,提示方式直观,且提示效果好。当所述目标光口与所述待检测光口之间的连接正确即光缆未插错时,控制所述光缆链路建链,而当所述目标光口与所述待检测光口之间的连接错误即光缆插错时,控制所述光缆链路复位,避免出现在光缆插错而光缆链路建链成功后出现丢包或业务中断的情况,提高了检测的灵活性。
在一个可选的实施例中,所述第一发送单元11,具体用于:
确定所述待检测光口有光缆接入时,通过所述待检测光口发出所述待检测光口的位置信息;或,以设定时间间隔通过所述待检测光口发出所述待检测光口的位置信息。
如此,当检测到所述待检测光口有光缆接入时,便通过所述待检测光口发出所述待检测光口的位置信息,提高了对光口之间连接进行检测的及时性和快速性。而以设定时间间隔通过所述待检测光口发出所述待检测光口的位置信息,实现了对光口之间连接的周期性检测,特别是当光口之间的连接发生变化后,能够自动重新进行光口之间连接的检测。此外,也增强了对光口之间连接进行检测的方式多样性。
在一个可选的实施例中,该交换单板还包括:第一处理单元13;其中,
所述第一处理单元13,用于封装所述待检测光口的位置信息至设置的探测报文;或者,按照设置的编码方式对所述待检测光口的位置信息进行编码,生成码流;
所述第一发送单元11,还用于通过所述待检测光口向目标光口发送所述探测报文;或者,通过所述待检测光口向目标光口发送所述码流。
如此,通过将所述待检测光口的位置信息封装至设置的探测报文、或者对所述待检测光口的位置信息进行编码,并以探测报文或码流的方式发出所述待检测光口的位置信息, 能够加快所述待检测光口的位置信息向外传输的速度,节省传输时间,并且能够有效避免外界环境的干扰。
为实现上述方法,本发明实施例还提供了一种交换单板,如图4所示,该交换单板包括:第二获取单元20和检测单元21;其中,
所述第二获取单元20,用于获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
所述检测单元21,用于根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
如此,当所述待检测光口和所述目标光口位于不同交换单板时,根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,从而确定所述目标光口与所述待检测光口的连接是否正确,通过由交换单板直接实现光口连接的检测,避免了引入第三方进行检测所带来的延时和外界干扰问题,不仅检测过程简单、检测速度快,而且可靠性高。
在一个可选的实施例中,该交换单板还包括:第二发送单元22,用于通过所述目标光口发出所述目标光口的位置信息。
如此,通过所述目标光口发出所述目标光口的位置信息,而使所述目标光口所在交换单板或所述待检测光口所在交换单板根据所述目标光口的位置信息对所述待检测光口与所述目标光口的连接是否正确进行检测,即通过交换单板就可以完成对所述待检测光口与所述目标光口的连接是否正确的检测,降低了对光口连接进行检测的复杂度和提高了对光口连接进行检测的可靠性。
在一个可选的实施例中,
所述第二发送单元22,还用于确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,确定所述目标光口与所述待检测光口的连接错误时,发出携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息的提示消息;或,确定所述目标光口与所述待检测光口之间的连接正确时,通过所述目标光口发出建链请求。
如此,当所述目标光口与所述待检测光口的连接错误即光缆插错时,通过发出告警、提示消息等方式提示光缆插错,提示方式直观,且提示效果好。当所述目标光口与所述待检测光口的连接正确即光缆未插错时,控制所述光缆链路建链,而当所述目标光口与所述 待检测光口的连接错误即光缆插错时,控制所述光缆链路复位,避免出现在光缆插错而光缆链路建链成功后出现丢包或业务中断的情况,提高了检测的灵活性。
在一个可选的实施例中,该交换单板还包括:第二处理单元23,用于对接收到的所述待检测光口所在交换单板发送的探测报文进行解析,获得待检测光口的位置信息;或者,对接收到的所述待检测光口所在交换单板发送的码流进行解码,获得待检测光口的位置信息。
如此,能够有效避免外界环境的干扰。
本发明实施例提供了一种交换单板,如图5所示,该交换单板包括:处理器310和用于存储能够在处理器310上运行的计算机程序的存储器311;其中,图5中示意的处理器310并非用于指代处理器310的个数为一个,而是仅用于指代处理器310相对其他器件的位置关系,在实际应用中,处理器310的个数可以为一个或多个;同样,图5中示意的存储器311也是同样的含义,即仅用于指代存储器311相对其他器件的位置关系,在实际应用中,存储器311的个数可以为一个或多个。
其中,所述处理器310用于运行所述计算机程序时,执行如下步骤:
获取所述待检测光口的位置信息;
通过所述待检测光口发出所述待检测光口的位置信息。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
获取目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,
确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
确定所述待检测光口有光缆接入时,通过所述待检测光口发出所述待检测光口的位置信息;或,
以设定时间间隔通过所述待检测光口发出所述待检测光口的位置信息。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
封装所述待检测光口的位置信息至设置的探测报文,通过所述待检测光口发出所述探测报文;或者,
按照设置的编码方式对所述待检测光口的位置信息进行编码生成码流,通过所述待检测光口发出所述码流。
该交换单板还包括:至少一个网络接口312。该交换单板中的各个组件通过总线系统313耦合在一起。可理解,总线系统313用于实现这些组件之间的连接通信。总线系统313除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统313。
其中,存储器311可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random  Access Memory)。本发明实施例描述的存储器311旨在包括但不限于这些和任意其它适合类型的存储器。
本发明实施例中的存储器311用于存储各种类型的数据以支持交换单板的操作。这些数据的示例包括:用于在交换单板上操作的任何计算机程序,如操作系统和应用程序;联系人数据;电话簿数据;消息;图片;视频等。其中,操作系统包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序可以包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。这里,实现本发明实施例方法的程序可以包含在应用程序中。
请再次参阅图5,本发明实施例提供了另一种交换单板,该交换单板包括:处理器310和用于存储能够在处理器310上运行的计算机程序的存储器311;其中,图5中示意的处理器310并非用于指代处理器310的个数为一个,而是仅用于指代处理器310相对其他器件的位置关系,在实际应用中,处理器310的个数可以为一个或多个;同样,图5中示意的存储器311也是同样的含义,即仅用于指代存储器311相对其他器件的位置关系,在实际应用中,存储器311的个数可以为一个或多个。
其中,所述处理器310用于运行所述计算机程序时,执行如下步骤:
获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
通过所述目标光口发出所述目标光口的位置信息。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,
确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
对接收到的所述待检测光口所在交换单板发送的探测报文进行解析,获得待检测光口的位置信息;或者,
对接收到的所述待检测光口所在交换单板发送的码流进行解码,获得待检测光口的位置信息。
在一可选的实施例中,所述处理器310还用于运行所述计算机程序时,执行如下步骤:
确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或者,
确定所述目标光口与所述待检测光口的连接错误时,发出所述提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;和/或,
确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
本实施例还提供了一种计算机存储介质,例如包括存储有计算机程序的存储器311,上述计算机程序可由交换单板中的处理器310执行,以完成前述方法所述步骤。计算机存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器;也可以是包括上述存储器之一或任意组合的各种设备,如移动电话、计算机、平板设备、个人数字助理等。
一方面,一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程被处理器运行时,执行如下步骤:
获取所述待检测光口的位置信息;
通过所述待检测光口发出所述待检测光口的位置信息。
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:
获取目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:
确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携 带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,
确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:
确定所述待检测光口有光缆接入时,通过所述待检测光口发出所述待检测光口的位置信息;或者,
以设定时间间隔通过所述待检测光口发出所述待检测光口的位置信息。
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:
封装所述待检测光口的位置信息至设置的探测报文,通过所述待检测光口发出所述探测报文;或者,
按照设置的编码方式对所述待检测光口的位置信息进行编码生成码流,通过所述待检测光口发出所述码流。
另一方面,一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程被处理器运行时,执行如下步骤:
获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:
通过所述目标光口发出所述目标光口的位置信息。
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:
确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,
确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
在一可选的实施例中,所述计算机程序被处理器运行时,还执行如下步骤:
对接收到的所述待检测光口所在交换单板发送的探测报文进行解析,获得待检测光口的位置信息;或者,
对接收到的所述待检测光口所在交换单板发送的码流进行解码,获得待检测光口的位置信息。
下面通过具体示例对本发明实施例作进一步详细说明,以待检测光口所在交换单板为发送端、待检测光口为发送端光口、目标光口所在交换单板为接收端为例,如图6所示,为本发明实施例提供的一种光口连接检测方法,包括以下步骤:
S201:发送端将发送端光口的位置信息发送给接收端;
这里,所述发送端光口的位置信息包括发送端光口的框号、槽位号和光口号。所述发送端可以通过将发送端光口的位置信息封装在探测报文中或通过自协商码流发送给接收端。此外,所述发送端可以在发送端光口的光缆插好后,或者以某一时间间隔将发送端光口的位置信息发送给接收端。
S202:接收端接收所述发送端光口的位置信息,并根据拓扑连接关系计算出期望的对端光口的位置信息;
这里,所述拓补连接关系可根据各个厂家根据集群路由器的具体组网形式,以表格的形式保存到光口所在板卡即交换单板的存储空间中,如表1所示。
Figure PCTCN2019089242-appb-000001
表1
其中,源光口表示本端的光口,期望的光口表示与该源光口所对应的光口。
S203:比较发送端光口的位置信息和期望的对端光口的位置信息是否一致,如果不一致,则执行步骤S204;如果一致,则执行步骤S206;
具体地,接收端比较发送端发来的发送端光口的位置信息,以及期望的对端光口的位 置信息,只有当两者完全一致,即框号、槽位号、光口编号三者完全相同时,才判定为发送端光口的位置信息和期望的对端光口的位置信息一致,否则为发送端光口的位置信息和期望的对端光口的位置信息不一致。
S204:接收端提示用户光缆插错;
这里,接收端提示用户光缆插错包括:接收端通过提示灯提示用户光缆插错;或者,接收端通过告警或命令行通知用户光缆插错,并提示期望的对端光口位置信息。
S205:接收端复位光缆链路;
这里,接收端通过复位光缆链路,以防止出现光缆连接错误,而链路又正常的情况,导致出现业务大量丢包甚至中断的情况。
S206:接收端发起光缆链路建链。
这里,当发送端光口的位置信息和期望的对端光口的位置信息一致时,判定光口连接正确,接收端发起光缆链路建链。
为实现上述方法,本发明实施例还提供了一种光口连接检测装置,请参阅图7,包括:
发送模块20,用于向接收端发送待测光口的位置信息,以使接收端根据计算得到期望的对端光口的位置信息,检测光缆是否插错;
其中,可将待测光口的位置信息封装在报文中,或者通过自协商码流发送到接收端。
接收模块21,用于接收发送端发送的待测光口的位置信息;
判断模块22,用于根据目标光口的位置信息,以及集群路由器光口的拓补连接关系,计算得到期望的对端光口的位置信息,并和所述获取单元10得到的待测光口的位置信息进行比较,以判断光缆是否插错;
处理模块23,用于根据判断模块22得到的光缆是否插错的结果,进行进一步操作。如果光缆插错,则通过指示灯提示用户光缆插错,并通过告警通知的形式提示用户正确的对端光口的位置信息,并复位光缆链路;如果正确,则对光缆链路发起建链。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。本发明的保护范围应以所述权利要求的保护范围以准。

Claims (12)

  1. 一种光口连接检测方法,其中,所述方法包括:
    待检测光口所在交换单板获取所述待检测光口的位置信息;
    所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息。
  2. 根据权利要求1所述的方法,其中,所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息之后,还包括:
    所述待检测光口所在交换单板获取目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
    所述待检测光口所在交换单板根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
  3. 根据权利要求2所述的方法,其中,还包括:
    所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
    所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,
    所述待检测光口所在交换单板确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
  4. 根据权利要求1所述的方法,其中,所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息,包括:
    所述待检测光口所在交换单板确定所述待检测光口有光缆接入时,通过所述待检测光口发出所述待检测光口的位置信息;或,
    所述待检测光口所在交换单板以设定时间间隔通过所述待检测光口发出所述待检测光口的位置信息。
  5. 根据权利要求1至3中任一项所述的方法,其中,所述待检测光口所在交换单板通过所述待检测光口发出所述待检测光口的位置信息,包括:
    所述待检测光口所在交换单板封装所述待检测光口的位置信息至设置的探测报文,通过所述待检测光口发出所述探测报文;或者,
    所述待检测光口所在交换单板按照设置的编码方式对所述待检测光口的位置信息进行编码,生成码流,通过所述待检测光口发出所述码流。
  6. 一种光口连接检测方法,其中,所述方法包括:
    目标光口所在交换单板获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
    所述目标光口所在交换单板根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
  7. 根据权利要求6所述的方法,其中,所述目标光口所在交换单板获取待检测光口的位置信息和目标光口的位置信息之后,还包括:
    所述目标光口所在交换单板通过所述目标光口发出所述目标光口的位置信息。
  8. 根据权利要求6所述的方法,其中,还包括:
    所述目标光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出告警消息;或,
    所述目标光口所在交换单板确定所述目标光口与所述待检测光口的连接错误时,发出提示消息;所述提示消息携带有与所述目标光口或所述待检测光口对应的期望光口的位置信息;或,
    所述目标光口所在交换单板确定所述目标光口与所述待检测光口的连接正确时,通过所述目标光口发出建链请求。
  9. 根据权利要求6所述的方法,其中,所述目标光口所在交换单板获取待检测光口的位置信息,包括:
    所述目标光口所在交换单板对接收到的所述待检测光口所在交换单板发送的探测报文进行解析,获得待检测光口的位置信息;或者,
    所述目标光口所在交换单板对接收到的所述待检测光口所在交换单板发送的码流进行解码,获得待检测光口的位置信息。
  10. 一种交换单板,其中,包括:
    第一获取单元,用于获取待检测光口的位置信息;
    第一发送单元,用于通过所述待检测光口发出所述待检测光口的位置信息。
  11. 一种交换单板,其中,包括:
    第二获取单元,用于获取待检测光口的位置信息和目标光口的位置信息,所述目标光口为接收到所述待检测光口的位置信息的光口;
    检测单元,用于根据设置的光口连接拓扑关系、所述目标光口的位置信息和所述待检测光口的位置信息,确定所述目标光口与所述待检测光口的连接是否正确。
  12. 一种交换单板,其中,所述交换单板包括处理器和用于存储能够在处理器上运行的计算机程序的存储器;其中,
    所述处理器用于运行所述计算机程序时,执行权利要求1至9中任一项所述光口连接检测方法的步骤。
PCT/CN2019/089242 2018-07-16 2019-05-30 一种光口连接检测方法和交换单板 WO2020015467A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810779006.1A CN110730035A (zh) 2018-07-16 2018-07-16 一种光口连接检测方法、交换单板及计算机存储介质
CN201810779006.1 2018-07-16

Publications (1)

Publication Number Publication Date
WO2020015467A1 true WO2020015467A1 (zh) 2020-01-23

Family

ID=69163850

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/089242 WO2020015467A1 (zh) 2018-07-16 2019-05-30 一种光口连接检测方法和交换单板

Country Status (2)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1307982A2 (en) * 2000-08-01 2003-05-07 Nortel Networks Limited Smart connect
CN1728609A (zh) * 2004-07-27 2006-02-01 华为技术有限公司 一种检测多框设备连接方式的方法
CN101621722A (zh) * 2009-06-29 2010-01-06 中兴通讯股份有限公司 一种自动发现节点内部资源拓扑的方法及系统
CN102594450A (zh) * 2012-02-22 2012-07-18 中兴通讯股份有限公司 集群路由器光缆防插错的方法及装置
CN102801462A (zh) * 2011-05-23 2012-11-28 中兴通讯股份有限公司 光纤连接的检测方法及装置
CN103368643A (zh) * 2012-04-01 2013-10-23 华为技术有限公司 光纤链路检测方法、系统和装置
CN108259260A (zh) * 2017-01-24 2018-07-06 新华三技术有限公司 链路检测方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2365989B (en) * 2000-05-08 2003-05-14 Mitel Semiconductor Ab Optic fiber interface device on folded circuit board
CN2874537Y (zh) * 2006-03-15 2007-02-28 中兴通讯股份有限公司 一种光纤连接装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1307982A2 (en) * 2000-08-01 2003-05-07 Nortel Networks Limited Smart connect
CN1728609A (zh) * 2004-07-27 2006-02-01 华为技术有限公司 一种检测多框设备连接方式的方法
CN101621722A (zh) * 2009-06-29 2010-01-06 中兴通讯股份有限公司 一种自动发现节点内部资源拓扑的方法及系统
CN102801462A (zh) * 2011-05-23 2012-11-28 中兴通讯股份有限公司 光纤连接的检测方法及装置
CN102594450A (zh) * 2012-02-22 2012-07-18 中兴通讯股份有限公司 集群路由器光缆防插错的方法及装置
CN103368643A (zh) * 2012-04-01 2013-10-23 华为技术有限公司 光纤链路检测方法、系统和装置
CN108259260A (zh) * 2017-01-24 2018-07-06 新华三技术有限公司 链路检测方法及装置

Also Published As

Publication number Publication date
CN110730035A (zh) 2020-01-24

Similar Documents

Publication Publication Date Title
US10855811B2 (en) Network device and information processing method
CN111556136B (zh) 一种电力边缘物联代理内部容器间的数据交互方法
US10110538B2 (en) Method and apparatus for message transmission
CN102594722B (zh) 使用移动设备扩充个人可联系性
WO2017092347A1 (zh) 一种分布式高速缓存系统中的客户端配置更新方法、设备及系统
CN110417783B (zh) 一种基于物联网的数据传输方法、装置、储存介质及终端
US20130223642A1 (en) Managing audio output through an intermediary
WO2018103405A1 (zh) 识别接入点和热点的方法及相关产品
WO2016150191A1 (zh) 一种数据共享方法及装置
CN104866290A (zh) 一种用于数据传输的方法和装置
CN110324193A (zh) 一种终端升级管理方法及装置
WO2014110707A1 (zh) 互联错误检测的方法、装置和系统
WO2020038443A1 (zh) 桥接通信的方法和设备
US20210120391A1 (en) Method for providing near filed communication device information for user and system therefor
WO2016015606A1 (zh) 一种用于定位端口连接错误的方法和相关设备
WO2020015467A1 (zh) 一种光口连接检测方法和交换单板
CN110048865B (zh) 一种总线数据传输方法、装置、电子设备及存储介质
WO2016169441A1 (zh) 消息推送方法及装置
JP2011511973A (ja) OSGiライフサイクルコマンドの実行制限のための方法及びシステム
US9078282B2 (en) Method and apparatus for implementing network device function of wireless communication terminal
CN112087430B (zh) 一种通过smash接口访问mctp设备的系统及方法
WO2020221033A1 (zh) 管理设备对远端存储设备进行管理的方法
CN111130941B (zh) 一种网络错误检测方法、装置以及计算机可读存储介质
CN112350859A (zh) 一种管理网络功能实体的方法、装置、设备及存储介质
WO2023279802A1 (zh) 协议数据传输方法、装置、网络节点及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19837470

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02/06/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19837470

Country of ref document: EP

Kind code of ref document: A1