A spare fiber channel switching method and system based on optical power monitoring

CN122908833APending Publication Date: 2026-10-13STATE GRID XINJIANG ELECTRIC POWER CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611270376.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0006]本发明旨在解决现有备用光纤通道切换过程中,备用通道选择依据单一、业务端口与光开关矩阵路径之间缺少明确对应关系,以及切换执行结果和业务恢复状态难以准确确认的问题,提供一种基于光功率监测的备用光纤通道切换方法及系统

Benefits of technology

[0070]本发明结合收光功率值、链路衰减值和连续异常计数值判断主用光纤通道的运行状态,并根据备用光纤通道的链路质量、占用状态、业务优先级及矩阵路径记录生成备用通道序列,能够降低瞬时状态波动引起误切换的可能,并使满足投入条件的多个备用光纤通道按照预定顺序参与切换。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122908833A_ABST
    Figure CN122908833A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of optical fiber communication link monitoring and optical line protection switching, and particularly relates to a backup optical fiber channel switching method and system based on optical power monitoring. The method determines a service port connected with a main optical fiber channel, acquires optical power values and link attenuation values of the main optical fiber channel and each backup optical fiber channel, and generates a channel state table; generates a main channel abnormality mark according to a preset abnormality threshold, and generates a backup channel sequence according to a preset input condition; determines a target backup optical fiber channel, generates a switch bit sequence according to a preset port mapping table and a current switch contact position, controls an optical switch matrix to establish optical connection and acquire a backhaul optical power; when the backhaul optical power is less than a preset service recovery threshold, a next backup optical fiber channel is selected for re-switching. The system is composed of corresponding functional modules and an optical switch matrix.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of optical fiber communication link monitoring and optical line protection switching technology, and particularly relates to a method and system for switching backup optical fiber channels based on optical power monitoring. Background Technology

[0002] In power communication networks, relay protection, dispatch control, and automated monitoring services typically utilize fiber optic channels for transmission. Factors such as cable aging, splice losses, external damage, and equipment failures can cause decreased optical power, increased link attenuation, or even transmission interruptions in operating fiber optic channels. When these situations occur, it is usually necessary to transfer services to a backup fiber optic channel. When manual fiber patching is used, maintenance personnel need to travel to the site to locate the port and reconnect the fiber optic cable; the troubleshooting time is easily affected by the site location and on-site conditions.

[0003] Patent CN110247700B discloses an intelligent optical cable monitoring system and method with optical cable protection function. The system includes a network management unit, two optical switches, a main optical cable, a backup optical cable, an optical time-domain reflectometry (OTDR) testing module, and multiple optical power monitoring units. The optical power monitoring units monitor the line loss of the main and backup optical cables. When a fault occurs in the main optical cable, the network management unit controls the two optical switches to change the transmission paths of the service light and the test light.

[0004] Patent CN1333454A discloses a real-time monitoring system for optical cables. The system uses an optical signal sampler to sample multiple optical fibers, obtains optical power test results through an optical power monitor, and a front-end controller controls an optical switch to connect the optical fiber to be tested to an optical time-domain reflectometer, thereby achieving cyclic monitoring and fault testing of multiple optical fibers.

[0005] The aforementioned technologies can perform optical power monitoring, fiber optic fault testing, or switching between primary and backup optical cables. However, in applications with a large number of backup fiber cores, there is still a lack of a unified method for judging the link quality, occupancy status, and service priority of each backup fiber channel. Existing optical switch control processes also struggle to generate corresponding switching actions based on the actual matrix path between the service port and the backup fiber channel. When the selected backup fiber channel fails to restore service, further solutions are needed to confirm the switching result and ensure the continuous selection of subsequent backup fiber channels. Summary of the Invention

[0006] This invention aims to solve the problems in existing backup fiber optic channel switching processes, such as the single criterion for backup channel selection, the lack of a clear correspondence between service ports and optical switch matrix paths, and the difficulty in accurately confirming the switching execution results and service recovery status. It provides a backup fiber optic channel switching method and system based on optical power monitoring.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0008] A method for switching backup fiber optic channels based on optical power monitoring, comprising:

[0009] Determine the service port connected to the primary fiber channel, obtain the received optical power value and link attenuation value of the primary fiber channel and each backup fiber channel, and generate a channel status table;

[0010] A primary channel anomaly marker is generated based on the channel status table and a preset anomaly threshold. After the primary channel anomaly marker is generated, a backup channel sequence is generated according to preset backup activation conditions.

[0011] When the backup channel sequence is not empty, the target backup optical fiber channel is determined, the position of each target switch contact is determined according to the service port, the target backup optical fiber channel and the preset port mapping table, the position of each current switch contact is obtained, the optical switches to be switched that are inconsistent with the current switch contact position and the corresponding target switch contact position are filtered, and a switch position sequence is generated.

[0012] The optical connection between the service port and the target backup optical fiber channel is established by controlling the optical switch matrix according to the switch bit sequence, and the return optical power is obtained.

[0013] When the backhaul optical power is less than the preset service recovery threshold and there is a next backup optical fiber channel, the target backup optical fiber channel is updated to the next backup optical fiber channel, the switch bit sequence is regenerated, and the switching is performed.

[0014] Furthermore, the process of generating the channel status table includes:

[0015] Configure channel numbers for the primary fiber optic channel and each of the backup fiber optic channels;

[0016] Each of the aforementioned channel numbers is used as the current channel number, and the optical fiber channel corresponding to the current channel number is used as the current optical fiber channel. The received optical power value of the current optical fiber channel is collected according to a preset sampling period.

[0017] When the received optical power value is less than the preset power test threshold, or when the current optical fiber channel does not store the link attenuation value, an optical time domain reflectance test is performed on the current optical fiber channel to obtain the link attenuation value;

[0018] When the received optical power value is not less than the preset power test threshold, and the current optical fiber channel stores a link attenuation value, read the latest link attenuation value stored in the current optical fiber channel;

[0019] Write the current channel number, the received optical power value, and the link attenuation value into the channel status table.

[0020] Furthermore, the process of generating the primary channel anomaly marker includes:

[0021] The preset abnormal thresholds include a power switching threshold, a high attenuation threshold, and a consecutive number threshold.

[0022] Before first reading the received optical power value and link attenuation value of the primary fiber channel from the channel status table, the continuous anomaly count value is set to zero;

[0023] Within each preset sampling period, the channel status table is updated, and the received optical power value and link attenuation value of the primary optical fiber channel are read from the updated channel status table;

[0024] When the received optical power value is less than the power switching threshold, or the link attenuation value is greater than the high attenuation threshold, the continuous anomaly count value is incremented by one;

[0025] When the received optical power value is not less than the power switching threshold and the link attenuation value is not greater than the high attenuation threshold, the continuous abnormal count value is cleared to zero.

[0026] When the continuous anomaly count reaches the continuous number threshold, the primary channel anomaly flag is generated.

[0027] Furthermore, the process of generating the backup channel sequence includes:

[0028] Initialize the channel occupancy flag of each of the aforementioned backup fiber optic channels to a non-preemptible flag;

[0029] When the backup fiber channel is not carrying any services, the corresponding channel occupancy flag will be updated to an idle flag;

[0030] When the service priority of the service carried by the backup fiber channel is lower than the service priority of the service to be restored corresponding to the service port, the corresponding channel occupancy mark is updated to a preemptible mark, and the corresponding service port identifier is recorded.

[0031] The preset standby activation conditions include: the received optical power value is not less than the preset standby power threshold, the link attenuation value is not greater than the preset standby attenuation threshold, the channel occupancy mark is an idle mark or a preemptible mark, and the preset port mapping table contains a matrix path record between the service port and the channel number of the standby optical fiber channel;

[0032] The backup fiber optic channel that meets the preset backup activation conditions is written into the backup channel sequence.

[0033] Furthermore, the process of determining the target backup fiber optic channel includes:

[0034] When the backup channel sequence is empty, a backup channel exhaustion record is generated;

[0035] When the backup channel sequence is not empty, each backup fiber channel is sorted according to the first to fourth sorting conditions: the channel occupancy mark, the received optical power value, the link attenuation value, and the channel number.

[0036] Among them, the idle marker takes priority over the preemptible marker, the received optical power values ​​are arranged from high to low, the link attenuation values ​​are arranged from low to high, and the channel numbers are arranged from small to large;

[0037] Each of the backup fiber optic channels is assigned a sequentially increasing sequence position number according to the arrangement order, and the backup fiber optic channel corresponding to the smallest sequence position number is determined as the target backup fiber optic channel.

[0038] Furthermore, the process of generating the switch bit sequence includes:

[0039] Based on the service port identifier of the service port and the channel number of the target backup fiber optic channel, the corresponding matrix path record is read from the preset port mapping table;

[0040] The matrix path record includes matrix input position, matrix output position, and multiple switch path items arranged in the optical path connection sequence. Each switch path item includes a self-locking optical switch number and a target switch contact position.

[0041] By using the position feedback contact corresponding to the number of each self-locking optical switch, the current switch contact position of each self-locking optical switch is obtained, and a current position group is formed.

[0042] The current switch contact positions in the current position group are compared with the target switch contact positions in the corresponding switch path items. Switch path items whose current switch contact positions do not match the corresponding target switch contact positions are filtered out. The switch path items are then arranged according to their connection order in the optical path from the matrix input position to the matrix output position to generate the switch position sequence.

[0043] Furthermore, the generation and execution process of the optical switch matrix control commands includes:

[0044] When the channel occupancy marker of the target backup fiber optic channel is marked as idle, the switch bit sequence and the preset backup switching action code are encapsulated into an optical switch matrix control instruction;

[0045] When the channel occupancy mark of the target backup fiber channel is marked as preemptible, a service release command is generated based on the service-bearing port identifier, the channel number of the target backup fiber channel, and the preset port mapping table.

[0046] Execute the service release command to disconnect the optical connection between the target backup fiber channel and the bearer service port corresponding to the bearer service port identifier;

[0047] After executing the service release command, the current switch contact position of each lock-type optical switch in the matrix path record corresponding to the target backup optical fiber channel is re-acquired to form an updated current position group;

[0048] The current switch contact positions in the updated current position group are compared with the corresponding target switch contact positions. The switch position sequence is regenerated based on the comparison results. The regenerated switch position sequence and the preset backup switching action code are encapsulated into the optical switch matrix control instruction.

[0049] Set the retransmission count to zero, execute the optical switch matrix control command, and send electronic control signals to each optical switch to be switched as indicated by the switch position sequence according to the optical switch matrix control command, so that each optical switch to be switched is switched to the corresponding target switch contact position, forming a continuous optical path between the matrix input position corresponding to the service port and the matrix output position corresponding to the target backup optical fiber channel.

[0050] Furthermore, the confirmation process for the switching result includes:

[0051] After executing the optical switch matrix control command, the current position group is reacquired, and the number of current switch contact positions in the current position group that are inconsistent with the corresponding target switch contact position or are invalid positions is determined as the abnormal number.

[0052] When the number of anomalies is zero, the received optical power after the target backup optical fiber channel establishes the optical connection is collected and used as the return optical power.

[0053] When the backhaul optical power is not less than the preset service recovery threshold, a handover completion record is generated;

[0054] When the number of anomalies is greater than zero and the retransmission count is less than the preset retransmission number threshold, the optical switch matrix control command is retransmitted, the retransmission count is incremented by one, and the process of reacquiring the current location group and determining the number of anomalies is returned.

[0055] When the number of anomalies is greater than zero and the retransmission count reaches the preset retransmission count threshold, a switch execution failure record is generated.

[0056] Furthermore, the process of determining and switching over the next backup fiber optic channel includes:

[0057] When the backhaul optical power is less than the preset service recovery threshold or when the switch execution failure record is generated, the channel number and sequence position number of the target backup optical fiber channel are written into the switch failure record, and the sequence position number is incremented by one to obtain the next sequence position number;

[0058] When the next sequence position number exists in the backup channel sequence, the backup optical fiber channel corresponding to the next sequence position number is determined as the next backup optical fiber channel, and the target backup optical fiber channel is updated to the next backup optical fiber channel.

[0059] Based on the updated target backup fiber optic channel, the process of generating the switch bit sequence, generating and executing the optical switch matrix control command, and confirming the switching result are executed again in sequence.

[0060] When the next sequence position number is not present in the backup channel sequence, a backup channel exhaustion record is generated.

[0061] The present invention also provides a backup fiber optic channel switching system based on optical power monitoring, used to perform the above-mentioned backup fiber optic channel switching method, comprising:

[0062] The link acquisition module is used to determine the service port connected to the main fiber channel, obtain the received optical power value and link attenuation value, and generate a channel status table.

[0063] The anomaly detection module is used to generate an anomaly flag for the primary channel based on the channel status table and a preset anomaly threshold.

[0064] The backup management module is used to generate a backup channel sequence based on preset backup activation conditions, and to determine the target backup fiber channel and the next backup fiber channel.

[0065] The bit sequence module is used to determine the target switch contact position based on the service port, the target backup fiber optic channel and the preset port mapping table, obtain the current switch contact position, and generate a switch bit sequence based on the comparison result between the current switch contact position and the corresponding target switch contact position.

[0066] The matrix switching module is used to generate optical switch matrix control instructions according to the switch bit sequence, and control the optical switch matrix to establish an optical connection between the service port and the target backup optical fiber channel;

[0067] The optical switch matrix includes multiple self-locking optical switches, each of which is used to switch to the corresponding target switch contact position under the control of the matrix switching module, so as to establish an optical connection between the service port and the target backup optical fiber channel.

[0068] The switching confirmation module is used to obtain the return optical power, confirm the switching result, and trigger a re-switching when the return optical power is less than the preset service recovery threshold or when a switch execution failure record is generated.

[0069] Compared with the prior art, the present invention has the following beneficial effects:

[0070] This invention combines received optical power value, link attenuation value and continuous anomaly count value to determine the operating status of the primary optical fiber channel, and generates a backup channel sequence based on the link quality, occupancy status, service priority and matrix path record of the backup optical fiber channel. This can reduce the possibility of false switching caused by instantaneous status fluctuations and enable multiple backup optical fiber channels that meet the conditions for commissioning to participate in the switching in a predetermined order.

[0071] This invention determines the target switch contact position based on a preset port mapping table, obtains the current switch contact position through a position feedback contact, generates a switch position sequence only for switch path items where the current switch contact position does not match the target switch contact position, and confirms the switching result by combining the switch execution status and the backhaul optical power. This can reduce unnecessary optical switching actions and continue to select the next backup optical fiber channel when the current backup optical fiber channel does not meet the service recovery conditions, thereby improving the reliability of backup optical fiber channel switching. Attached Figure Description

[0072] Figure 1 This is a flowchart illustrating a backup fiber optic channel switching method based on optical power monitoring according to the present invention.

[0073] Figure 2 This is a schematic diagram illustrating the connection relationship between the service port, optical switch matrix, and fiber channel described in this invention.

[0074] Figure 3 This is a schematic diagram of a backup fiber optic channel switching system based on optical power monitoring according to the present invention. Detailed Implementation

[0075] The following combination Figures 1 to 3 The embodiments of the present invention will be described below. These embodiments are used to explain the technical solutions of the present invention and do not constitute a limitation on the scope of protection of the present invention. Equivalent substitutions or conventional modifications made by those skilled in the art based on the disclosure of the present invention without departing from the concept of the present invention should all fall within the scope of protection of the present invention.

[0076] Example 1

[0077] Please see Figure 1 and Figure 2 This embodiment provides a method for switching backup fiber optic channels based on optical power monitoring. Figure 1 The processing flow of the backup fiber optic channel switching method is shown. Figure 2 The connection relationships between the service ports, optical switch matrix, primary fiber channel and each backup fiber channel are shown.

[0078] Step S10: Determine the service port connected to the primary fiber channel, obtain the received optical power value and link attenuation value of the primary fiber channel and each backup fiber channel, and generate a channel status table.

[0079] Furthermore, step S10 includes steps S11 and S12.

[0080] Step S11: Determine the service port connected to the primary fiber channel.

[0081] The control device's memory pre-stores a service connection relationship table. The service connection relationship table includes multiple service connection relationship records, each of which includes a service port identifier, the channel number of the currently connected fiber optic channel, and the current connection status.

[0082] The control device's memory also pre-stores a service protection parameter table. This table uses the service port identifier as the query condition, and each record includes the service port identifier, service priority, allowed anomaly confirmation duration, and allowed maximum handover duration. The allowed anomaly confirmation duration limits the maximum time allowed from the initial acquisition of an anomaly sampling result to the generation of a primary channel anomaly flag; the allowed maximum handover duration limits the maximum time allowed for a single target backup fiber optic channel from the determination of that backup fiber optic channel to the generation of the corresponding handover completion record, handover failure record, or switch execution failure record. After determining the service port, the control device reads the service priority, allowed anomaly confirmation duration, and allowed maximum handover duration corresponding to the service to be restored from the service protection parameter table based on the service port identifier.

[0083] The service port identifier is used to uniquely identify the optical interface in the optical communication equipment that receives service optical signals. The service priority is stored in the service protection parameter table and associated with the corresponding service port identifier, used to determine the processing order when different services request the same backup fiber channel. The current connection status includes an active status and a released status. The active status indicates that there is currently an optical connection between the corresponding service port and the fiber channel, and the released status indicates that the original optical connection between the corresponding service port and the fiber channel has been terminated.

[0084] In this embodiment, the service priority is represented by a positive integer. The larger the service priority value, the earlier the corresponding service is processed. Before the backup fiber optic channel switching system is put into operation, the service priority is configured according to the protection level of each service and associated with the corresponding service port identifier. The service priority for ordinary data services is configured as 1, the service priority for important data services is configured as 2, and the service priority for services requiring priority recovery is configured as 3.

[0085] The control device uses the channel number of the primary fiber optic channel as a query condition to read the service connection relationship records with a currently valid connection status from the service connection relationship table, and identifies the service ports in these records as the service ports connected to the primary fiber optic channel. The service corresponding to the service port is the service to be restored after the primary fiber optic channel malfunctions.

[0086] In this embodiment, a service connection record represents the current optical connection between a service port and a fiber optic channel. Only one service connection record with a valid connection status exists for the same service port at any given time. Similarly, only one service connection record with a valid connection status exists for the same fiber optic channel at any given time.

[0087] Step S12: Obtain the received optical power value and link attenuation value of each optical fiber channel, and generate the channel status table.

[0088] Each primary fiber optic channel and each backup fiber optic channel is assigned a unique channel number, which uniquely represents a fiber optic channel within the same backup fiber optic channel switching system. In this embodiment, the channel numbers are represented by integers, and when the arrangement order needs to be determined according to the channel numbers, they are arranged in ascending order of integer values.

[0089] Following the channel number in ascending order, each channel number is used as the current channel number, and the optical fiber channel corresponding to the current channel number is used as the current optical fiber channel.

[0090] According to a preset sampling period, the received optical power value of the current optical fiber channel is collected through the optical power detection interface corresponding to the current optical fiber channel. The received optical power value is the received optical power of the corresponding optical fiber channel before it enters the optical switch matrix, and the unit is decibel milliwatt. The optical power monitoring point used to collect the received optical power value is set between the corresponding optical fiber channel and the matrix output position of the optical switch matrix, so that the received optical power value represents the received optical power of the corresponding optical fiber channel before it has passed through the current matrix path.

[0091] In this embodiment, the remote optical interface of each optical fiber channel is configured to continuously transmit optical signals to the corresponding optical fiber channel. When the corresponding optical fiber channel carries a service, the remote optical interface transmits a service optical signal; when the corresponding optical fiber channel does not carry a service, the remote optical interface transmits a monitoring optical signal. The monitoring optical signal is an optical signal used to detect the transmission status of the corresponding optical fiber channel and does not carry service data. The optical power detection interface collects the optical power after the service optical signal or the monitoring optical signal is transmitted to the receiving end of the corresponding optical fiber channel, and uses the collected optical power as the received optical power value of the current optical fiber channel. Therefore, the statement that the backup optical fiber channel does not carry a service means that the backup optical fiber channel does not transmit service data, and does not mean that there is no optical signal in the backup optical fiber channel for collecting the received optical power value.

[0092] When the received optical power value is negative, the closer the value is to zero, the greater the optical power received by the corresponding fiber optic channel. For example, -12 dBmW is greater than -15 dBmW.

[0093] The consecutive sampling threshold is a pre-configured positive integer greater than or equal to 2, used to limit the number of consecutive abnormal sampling periods required to generate an abnormal flag for the primary channel. The preset sampling period is the time interval between two adjacent channel status table updates, determined based on the allowed abnormal confirmation duration for the service to be restored and the consecutive sampling threshold, and ensuring that the product of the preset sampling period and the consecutive sampling threshold is not greater than the allowed abnormal confirmation duration.

[0094] In this embodiment, the consecutive count threshold is pre-configured to 3. Based on the service port identifier, the allowed anomaly confirmation time read from the service protection parameter table is 3 seconds. Therefore, the preset sampling period is set to 1 second. The product of the preset sampling period of 1 second and the consecutive count threshold of 3 is 3 seconds, which is not greater than the allowed anomaly confirmation time of 3 seconds.

[0095] After obtaining the received optical power value of the current fiber optic channel, the received optical power value is compared with a preset power test threshold. The preset power test threshold is used to determine whether the optical time domain reflectance test needs to be re-performed on the current fiber optic channel.

[0096] The preset power test threshold is determined based on a power switching threshold and a preset advance test power difference. The preset power test threshold is equal to the sum of the power switching threshold and the preset advance test power difference. The preset advance test power difference is used to limit the power interval for triggering optical temporal reflectance testing before the received optical power value reaches the power switching threshold.

[0097] In this embodiment, the power switching threshold is -17 dBmW, and the preset advance test power difference is 1 dB; therefore, the preset power test threshold is -16 dBmW. When the received light power value changes from high to low and falls below -16 dBmW, an optical time domain reflectance test is performed; when the received light power value continues to decrease to below -17 dBmW, the received light power abnormality judgment condition is met.

[0098] When the received optical power value is less than the preset power test threshold, an optical time-domain reflectometry (OTDR) test is performed on the current optical fiber channel. The ODR test is performed by an optical time-domain reflectometer (OTDR) transmitting test optical pulses to the current optical fiber channel through the test access point, and receiving the backscattered and reflected light generated by the test optical pulses at the fiber segment, fusion splice, connector, and link termination.

[0099] In this embodiment, the test optical pulse emitted by the optical time domain reflectometer (OTDR) uses a different test wavelength than the service optical signal and the monitoring optical signal. The OTD couples the test optical pulse to the current fiber optic channel via a wavelength division multiplexer (WDM), and then separates the returned test optical signal from the service optical signal or the monitoring optical signal via the WDM. During the OTD test, the existing service optical connection or monitoring optical connection of the current fiber optic channel is not terminated.

[0100] The optical time-domain reflectometer determines the location of each fiber segment and each connection event based on the time of receiving backscattered light and reflected light, determines the fiber segment attenuation value based on the optical power change corresponding to each fiber segment, and determines the connection event loss value based on the optical power change before and after each connection event.

[0101] The link attenuation value is the total link loss from the test access point to the corresponding fiber channel terminal, which is equal to the sum of the attenuation values ​​of each fiber segment and the loss values ​​of each connection event within the test interval. Let the test interval include m fiber segments and n connection events, the fiber segment attenuation value of the i-th fiber segment be Li, and the connection event loss value of the j-th connection event be Cj. Then the link attenuation value is the sum of all Li and all Cj.

[0102] Under a specific test condition, the current fiber channel includes two fiber segments and two connection events. The fiber segment attenuation values ​​of the two fiber segments are 2.0 dB and 3.0 dB, respectively, and the connection event loss values ​​of the two connection events are 0.5 dB and 0.5 dB, respectively. Then the link attenuation value is the sum of 2.0 dB, 3.0 dB, 0.5 dB and 0.5 dB, which is 6.0 dB.

[0103] After the optical time domain reflectometer completes the test, it sends the link attenuation value and the corresponding test time to the control device. The control device then associates and stores the link attenuation value, the test time, and the current channel number.

[0104] When the current optical fiber channel does not store a link attenuation value, regardless of whether the received optical power value collected this time is less than the preset power test threshold, the optical time domain reflection test is performed on the current optical fiber channel to obtain the initial link attenuation value of the current optical fiber channel.

[0105] The statement that "the current fiber channel does not store link attenuation values" means that there is no record of a link attenuation value indexed by the current channel number in the memory. The statement that "the current fiber channel stores link attenuation values" means that there is at least one record of a link attenuation value indexed by the current channel number in the memory.

[0106] When the received optical power value is not less than the preset power test threshold and the current optical fiber channel stores a link attenuation value, the optical time domain reflectance test is not performed. Instead, the link attenuation value record with the latest test time is read from each link attenuation value record indexed by the current channel number, and the link attenuation value therein is used as the latest link attenuation value of the current optical fiber channel.

[0107] The current channel number, the received optical power value acquired this time, and the link attenuation value obtained this time are associated and written into the channel status table. Each channel status record in the channel status table corresponds to one optical fiber channel and includes the channel number, received optical power value, link attenuation value, received optical power acquisition time, and link attenuation value acquisition time.

[0108] The optical power acquisition time is used to determine the preset sampling period to which the optical power value belongs. The link attenuation value acquisition time is used to determine the link attenuation value record with the latest test time when multiple link attenuation value records correspond to the same channel number.

[0109] When a channel status record corresponding to the current channel number already exists in the channel status table, the received optical power value obtained in this preset sampling period is used to update the received optical power value, and the link attenuation value obtained by performing optical time domain reflectance testing in this preset sampling period or the latest link attenuation value is used to update the link attenuation value.

[0110] After sequentially updating the channel status records of the primary fiber optic channel and each of the backup fiber optic channels, a channel status table corresponding to this preset sampling period is obtained.

[0111] In one status acquisition process of this embodiment, the primary fiber optic channel is numbered 0, and the three backup fiber optic channels are numbered 1, 2, and 3, respectively. In the updated channel status table, channel number 0 corresponds to a received optical power of -18.2 dBmW and a link attenuation of 8.1 dB; channel number 1 corresponds to a received optical power of -12.5 dBmW and a link attenuation of 3.8 dB; channel number 2 corresponds to a received optical power of -11.9 dBmW and a link attenuation of 3.5 dB; and channel number 3 corresponds to a received optical power of -13.1 dBmW and a link attenuation of 4.2 dB.

[0112] Step S20: Generate a primary channel anomaly marker based on the channel status table and a preset anomaly threshold, and after the primary channel anomaly marker is generated, generate a backup channel sequence according to preset backup activation conditions.

[0113] Furthermore, step S20 includes steps S21 and S22.

[0114] Step S21: Generate the main channel anomaly flag based on the channel status table and the preset anomaly threshold.

[0115] The preset abnormal thresholds include a power switching threshold, a high attenuation threshold, and a consecutive number threshold.

[0116] The power switching threshold is determined based on the receiving sensitivity of the optical receiving module connected to the service port and a preset power margin. The receiving sensitivity is the minimum received optical power recorded in the product technical parameters of the optical receiving module. In this embodiment, the receiving sensitivity recorded in the product technical parameters of the optical receiving module is -19 dBmW. The preset power margin is the reserved power difference between the power switching threshold and the receiving sensitivity. The power switching threshold is equal to the sum of the receiving sensitivity and the preset power margin.

[0117] The optical receiving module used in this embodiment has a receiving sensitivity of -19 dBmW, and the preset power margin is 2 dB. Therefore, the power switching threshold is -17 dBmW.

[0118] The high attenuation threshold is determined based on the link optical power budget and a preset attenuation margin of the primary fiber channel. The link optical power budget is the difference between the minimum output optical power at the transmitter and the receiving sensitivity at the receiver, minus fixed insertion losses from connectors, fixed optical devices, and other components not belonging to the fiber channel under test, representing the maximum total link attenuation that can be allocated to the primary fiber channel. The preset attenuation margin is the attenuation difference reserved from the maximum total link attenuation. The high attenuation threshold is equal to the link optical power budget minus the preset attenuation margin.

[0119] In this embodiment, the link optical power budget of the primary fiber channel is 8 dB, the preset attenuation margin is 1 dB, and therefore the high attenuation threshold is 7 dB.

[0120] The consecutive sampling threshold is a pre-configured positive integer greater than or equal to 2, used to limit the number of consecutive abnormal sampling periods required to generate the primary channel abnormality flag. The preset sampling period is determined based on the allowable abnormality confirmation duration of the service to be restored and the consecutive sampling threshold, and satisfies that the product of the preset sampling period and the consecutive sampling threshold is not greater than the allowable abnormality confirmation duration of the service to be restored. In this embodiment, the consecutive sampling threshold is 3, and the allowable abnormality confirmation duration of the service to be restored is 3 seconds, therefore the preset sampling period is set to 1 second.

[0121] A continuous anomaly count value is set for the primary fiber channel. The continuous anomaly count value is associated with and stored in relation to the channel number of the primary fiber channel and the service port identifier, and is used to record the number of preset sampling periods that continuously meet the anomaly judgment conditions.

[0122] After the system starts up and reads the valid service connection relationship record between the service port and the primary fiber channel, a continuous anomaly count value corresponding to the service port identifier and the channel number of the primary fiber channel is established. Before reading the received optical power value and link attenuation value of the primary fiber channel from the channel status table for the first time, the continuous anomaly count value is set to zero.

[0123] In subsequent preset sampling periods, the continuous anomaly count value will no longer be initialized, but the continuous anomaly count value updated in the previous preset sampling period will be retained.

[0124] Within each preset sampling period, the channel status table is first updated according to step S12, and then the received optical power value and link attenuation value of the primary optical fiber channel are read from the updated channel status table using the channel number of the primary optical fiber channel as the query condition.

[0125] When the received optical power value is less than the power switching threshold, or the link attenuation value is greater than the high attenuation threshold, the current preset sampling period is determined as an abnormal sampling period, and the continuous abnormal count value is incremented by one. If at least one of the two abnormal judgment conditions is met, an increment operation is performed; if both abnormal judgment conditions are met simultaneously, the continuous abnormal count value is still incremented by one within the current preset sampling period.

[0126] When the received optical power value is not less than the power switching threshold and the link attenuation value is not greater than the high attenuation threshold, the current preset sampling period is determined as the normal sampling period, and the continuous abnormal count value is cleared to zero. The clearing operation is only performed when both normal judgment conditions are met simultaneously.

[0127] When the updated consecutive anomaly count reaches the consecutive count threshold, a primary channel anomaly marker is generated. The primary channel anomaly marker is associated with the service port identifier, the channel number of the primary fiber channel, the received optical power value, the link attenuation value, and the generation time when the primary channel anomaly marker is generated.

[0128] After the primary channel anomaly marker is generated, the current continuous anomaly determination process ends, and the process of generating the backup channel sequence begins.

[0129] In this embodiment, within three consecutive preset sampling periods, the received optical power values ​​of the primary optical fiber channel are -17.8 dBmW, -18.0 dBmW, and -18.2 dBmW, respectively, and the corresponding link attenuation values ​​are 7.5 dB, 7.8 dB, and 8.1 dB, respectively.

[0130] Within the first preset sampling period, if the received optical power value is less than -17 dB / mW and the link attenuation value is greater than 7 dB, the continuous anomaly count is updated from 0 to 1. Within the second preset sampling period, if the anomaly detection condition continues to be met, the continuous anomaly count is updated from 1 to 2. Within the third preset sampling period, if the anomaly detection condition continues to be met, the continuous anomaly count is updated from 2 to 3. When the continuous anomaly count reaches the continuous count threshold of 3, an anomaly flag for the primary channel is generated.

[0131] Step S22: Generate the backup channel sequence according to the preset backup input conditions.

[0132] After the primary channel anomaly marker is generated, the channel occupancy markers of each of the backup fiber optic channels are determined.

[0133] The channel occupancy markers include a non-preemptible marker, an idle marker, and a preemptible marker. The non-preemptible marker indicates that the corresponding spare fiber channel is currently not allowed to be occupied by the service to be restored. The idle marker indicates that the corresponding spare fiber channel is not currently carrying any service. The preemptible marker indicates that the corresponding spare fiber channel is currently carrying a service, but the service priority of the service being carried is lower than the service priority of the service to be restored.

[0134] Each time the backup channel sequence is generated, the channel occupancy flag of each backup fiber channel is first initialized to a non-preemptible flag.

[0135] For any of the aforementioned backup fiber optic channels, the service connection relationship table is retrieved using its channel number as the query condition. If there is no service connection relationship record in the service connection relationship table that uses the channel number of the backup fiber optic channel as the channel number of the currently connected fiber optic channel and the current connection status is valid, it is determined that the backup fiber optic channel is not carrying any service, and the corresponding channel occupancy flag is updated from the non-preemptible flag to the idle flag.

[0136] When there is a service connection record in the service connection relationship table that uses the channel number of the backup fiber channel as the channel number of the currently connected fiber channel and the current connection status is valid, it is determined that the backup fiber channel has carried a service, and the service-carrying port identifier is read from the corresponding service connection relationship record.

[0137] Using the service port identifier as a query condition, the service protection parameter record corresponding to the service port identifier is read from the service protection parameter table, and the service priority in the service protection parameter record is determined as the service priority of the service carried by the backup fiber channel.

[0138] The service port identifier is a unique identifier for the service port currently carrying services through the backup fiber optic channel. It is used to determine the original optical connection that needs to be terminated when the backup fiber optic channel is identified as a preemptible channel.

[0139] When the service priority of the service carried by the backup fiber channel is lower than the service priority of the service to be restored corresponding to the service port, the corresponding channel occupancy mark is updated from the non-preemptible mark to the preemptible mark, and the identifier of the service port is associated with and stored with the channel number of the backup fiber channel.

[0140] When the service priority of the service carried by the backup fiber channel is greater than or equal to the service priority of the service to be restored, the corresponding channel occupancy mark is kept as an unpreemptible mark.

[0141] After determining the channel occupancy flag of each of the backup fiber optic channels, the received optical power value and link attenuation value of each of the backup fiber optic channels are read from the channel status table, and it is determined whether each of the backup fiber optic channels meets the preset backup activation conditions.

[0142] The preset standby activation conditions include the simultaneous fulfillment of the following four conditions: the received optical power value of the standby optical fiber channel is not less than the preset standby power threshold; the link attenuation value of the standby optical fiber channel is not greater than the preset standby attenuation threshold; the channel occupancy mark of the standby optical fiber channel is an idle mark or a preemptible mark; and the preset port mapping table contains a matrix path record between the service port and the channel number of the standby optical fiber channel.

[0143] The preset backup power threshold is the minimum received optical power value that allows backup fiber optic channels to participate in the handover. The preset backup power threshold is used to exclude backup fiber optic channels with received optical power lower than the backup admission value before the handover. Meeting the preset backup power threshold does not mean that the return optical power after the handover will necessarily reach the preset service recovery threshold. Whether the service recovery condition is met is based on the return optical power collected after the handover.

[0144] The preset backup power threshold is determined based on the receiving sensitivity of the optical receiving module connected to the service port and the preset backup power margin. The preset backup power margin is the reserved power difference between the received optical power before the backup fiber channel enters the optical switch matrix and the receiving sensitivity. The preset backup power threshold is equal to the sum of the receiving sensitivity and the preset backup power margin.

[0145] In this embodiment, the receiving sensitivity is -19 dBmW, the preset backup power margin is 4 dB, and therefore the preset backup power threshold is -15 dBmW.

[0146] The preset backup attenuation threshold is the maximum total link attenuation value that allows the backup fiber channel to participate in the handover, and it is determined based on the link optical power budget of the backup fiber channel and the preset backup attenuation margin. The preset backup attenuation threshold is equal to the link optical power budget of the backup fiber channel minus the preset backup attenuation margin.

[0147] The link optical power budget of the backup fiber optic channel is the difference between the minimum output optical power of the transmitter and the receiving sensitivity of the receiver, minus the insertion loss of fixed optical devices, which represents the maximum total link attenuation that can be allocated to the backup fiber optic channel. The preset backup attenuation margin is the attenuation difference reserved from the maximum total link attenuation.

[0148] In this embodiment, the link optical power budget of the backup fiber optic channel is 7 dB, the preset backup attenuation margin is 1 dB, and therefore the preset backup attenuation threshold is 6 dB.

[0149] The preset port mapping table is established before the backup fiber channel switching system is put into operation, based on the actual physical connection relationship between each service port, optical switch matrix and each fiber channel.

[0150] When establishing the preset port mapping table, the matrix input position corresponding to each service port is combined with the matrix output position corresponding to each optical fiber channel. According to the connection order of the optical signal from the matrix input position to the matrix output position, the self-locking optical switch number and the corresponding target switch contact position are determined in sequence, and a matrix path record is formed.

[0151] After the matrix path record is formed, each lock-type optical switch is controlled to switch to the corresponding target switch contact position according to the matrix path record. A connectivity test is performed by a connectivity detection device set between the matrix input position and the matrix output position. When a continuous optical path is detected between the matrix input position and the matrix output position, the corresponding matrix path record is written into the preset port mapping table; when no continuous optical path is formed, the corresponding matrix path record is not written into the preset port mapping table.

[0152] For each matrix path record written into the preset port mapping table, at least one switch path item is selected from the switch path items contained in the matrix path record as a release switch path item, and a switch contact position different from the target switch contact position is selected from the set of legal switch contact positions of the corresponding self-locking optical switch as a release switch contact position.

[0153] The self-locking optical switch corresponding to the release switch path item is switched to the release switch contact position, and the connectivity test is performed again. When a continuous optical path is no longer formed between the matrix input position and the matrix output position, the release switch path item, the self-locking optical switch number, and the release switch contact position are written into the service release path record corresponding to the matrix path record. When a continuous optical path is still formed between the matrix input position and the matrix output position, another switch path item or another release switch contact position is selected for testing. The service release path record is associated with the corresponding service port identifier and channel number and stored in the preset port mapping table.

[0154] The preset port mapping table uses the service port identifier and channel number as combined query conditions. Each matrix path record includes the matrix input position, the matrix output position, and multiple switch path items arranged in the optical path connection order.

[0155] If any one of the above four conditions is not met, the corresponding backup fiber optic channel will not be written into the backup channel sequence. If all four conditions are met, the corresponding backup fiber optic channel will be written into the backup channel sequence.

[0156] Each spare fiber channel in the spare channel sequence is associated with a record containing the channel number, received optical power value, link attenuation value, and channel occupancy flag. When the channel occupancy flag is a preemptible flag, the corresponding service port identifier is also associated with the record.

[0157] In this embodiment, the service priority of the service to be restored, read from the service protection parameter table based on service port 01, is 3. The spare fiber channel corresponding to channel number 1 is not carrying any service, and its channel occupancy marker is updated to an idle marker.

[0158] The backup fiber optic channel corresponding to channel number 2 has a service connection relationship record that is currently in an active state. The bearer service port identifier read from this service connection relationship record is service port 08. According to the service priority read from the service protection parameter table based on service port 08, which is 1, lower than the service priority 3 of the service to be restored, the channel occupancy mark corresponding to channel number 2 is updated to a preemptible mark, and service port 08 is recorded as the corresponding bearer service port identifier.

[0159] The backup fiber optic channel corresponding to channel number 3 has a service connection relationship record that is currently in an active state. The corresponding bearer service port identifier is read from this service connection relationship record. Based on the bearer service port identifier, the service priority read from the service protection parameter table is 4, which is not lower than the service priority 3 of the service to be restored. Therefore, the channel occupancy mark corresponding to channel number 3 is kept as an unpreemptible mark.

[0160] The received optical power value of the backup optical fiber channel corresponding to channel number 1 is -12.5 dBmW, which is not less than the preset backup power threshold of -15 dBmW; the link attenuation value is 3.8 dB, which is not greater than the preset backup attenuation threshold of 6 dB; the channel occupancy mark is an idle mark; there is a matrix path record between service port 01 and channel number 1 in the preset port mapping table, so the backup optical fiber channel corresponding to channel number 1 is written into the backup channel sequence.

[0161] The received optical power value of the backup optical fiber channel corresponding to channel number 2 is -11.9 dBmW, which is not less than the preset backup power threshold of -15 dBmW; the link attenuation value is 3.5 dB, which is not greater than the preset backup attenuation threshold of 6 dB; the channel occupancy mark is a preemptible mark; there is a matrix path record between service port 01 and channel number 2 in the preset port mapping table, so the backup optical fiber channel corresponding to channel number 2 is written into the backup channel sequence.

[0162] Although the received optical power value and link attenuation value of the backup optical fiber channel corresponding to channel number 3 meet the corresponding threshold conditions, its channel occupancy mark is a non-preemptible mark. Therefore, the backup optical fiber channel corresponding to channel number 3 will not be written into the backup channel sequence.

[0163] Step S30: When the backup channel sequence is not empty, determine the target backup optical fiber channel, determine the position of each target switch contact according to the service port, the target backup optical fiber channel and the preset port mapping table, obtain the position of each current switch contact, filter out the optical switches to be switched whose current switch contact positions are inconsistent with the corresponding target switch contact positions, and generate a switch position sequence.

[0164] Furthermore, step S30 includes steps S31 and S32.

[0165] Step S31: Sort the backup channel sequence and determine the target backup fiber optic channel.

[0166] When no backup fiber optic channel is written into the backup channel sequence, the backup channel sequence is determined to be empty, and a backup channel exhaustion record is generated. The backup channel exhaustion record includes the service port identifier, the channel number of the primary fiber optic channel, the generation time of the primary channel anomaly flag, and the record type indicating that there is no backup fiber optic channel that meets the preset backup activation conditions.

[0167] When at least one backup fiber channel is written into the backup channel sequence, the backup channel sequence is determined to be non-empty, and each backup fiber channel in the backup channel sequence is sorted in sequence according to the channel occupancy mark, the received optical power value, the link attenuation value, and the channel number as the first to fourth sorting conditions.

[0168] The first sorting criterion is the channel occupancy marker, and the spare fiber channel corresponding to the idle marker is arranged before the spare fiber channel corresponding to the preemptible marker.

[0169] The second sorting criterion is the received optical power value. For spare fiber channels with the same channel occupancy marker, they are arranged from highest to lowest received optical power value. When the received optical power value is negative, the spare fiber channel with the larger value is arranged before the spare fiber channel with the smaller value.

[0170] The third sorting criterion is the link attenuation value. For spare fiber channels where both the channel occupancy marker and the received optical power value are the same, they are sorted from low to high according to the link attenuation value.

[0171] The fourth sorting criterion is the channel number. For spare fiber channels that have the same channel occupancy marker, received optical power value, and link attenuation value, they are arranged in ascending order of channel number.

[0172] The above sorting is a step-by-step comparison. When the order of two backup fiber optic channels can be determined by the previous sorting condition, the subsequent sorting condition is not used for comparison; the subsequent sorting condition is used only when the previous sorting condition cannot determine the order.

[0173] After sorting, sequentially incrementing sequence position numbers are configured according to the arrangement order of each backup fiber optic channel. In this embodiment, the sequence position number of the first backup fiber optic channel is set to 1, and the sequence position number of the next backup fiber optic channel is equal to the sequence position number of the previous backup fiber optic channel plus one.

[0174] The backup fiber channel corresponding to the smallest sequence position number is determined as the target backup fiber channel.

[0175] After the backup channel sequence is sorted, the backup fiber channel members, their arrangement order, and their sequence position numbers remain unchanged until the current backup fiber channel switchover ends.

[0176] In this embodiment, the backup channel sequence includes backup fiber optic channels corresponding to channel number 1 and channel number 2. The channel occupancy marker for channel number 1 is an idle marker, and the channel occupancy marker for channel number 2 is a preemptible marker; therefore, channel number 1 is arranged before channel number 2. The sequence position number corresponding to channel number 1 is 1, and the sequence position number corresponding to channel number 2 is 2. The backup fiber optic channel corresponding to sequence position number 1 is determined as the target backup fiber optic channel.

[0177] Step S32: Generate the switch bit sequence based on the service port, the target backup fiber channel, and the preset port mapping table.

[0178] The optical switch matrix includes multiple self-locking optical switches. Each self-locking optical switch is configured with a unique self-locking optical switch number, multiple switch contact positions, and a position feedback contact for indicating the actual switch contact position.

[0179] The control device pre-stores switch configuration records, each of which includes a self-locking optical switch number and a corresponding set of legal switch contact positions. The set of legal switch contact positions represents all switch contact positions that the corresponding self-locking optical switch can reach.

[0180] The service port is connected to the matrix input position of the optical switch matrix, and each optical fiber channel is connected to the matrix output position of the optical switch matrix.

[0181] Using the service port identifier and the channel number of the target backup fiber optic channel as combined query conditions, the corresponding matrix path record is read from the preset port mapping table.

[0182] The matrix path record includes matrix input positions, matrix output positions, and multiple switch path entries arranged in the optical path connection sequence. Each switch path entry includes a self-locking optical switch number and the target switch contact position.

[0183] The target switch contact position is the switch contact position that the self-locking optical switch needs to reach when establishing the optical connection between the service port and the target backup optical fiber channel.

[0184] According to the arrangement order of each switch path item in the matrix path record, the current switch contact position of each self-locking optical switch is read through the position feedback contact corresponding to the number of each self-locking optical switch.

[0185] When the position feedback contact returns a switch contact position that belongs to the corresponding set of valid switch contact positions, it is determined as a valid current switch contact position. When the position feedback contact does not return a feedback value, or the returned switch contact position does not belong to the corresponding set of valid switch contact positions, the corresponding current switch contact position is determined as an invalid position, and the invalid position is determined to be inconsistent with any target switch contact position.

[0186] The self-locking optical switches are numbered and their corresponding current switch contact positions are arranged in the order of the switch path items to form a current position group.

[0187] Each current switch contact position in the current position group is compared with the target switch contact position in the corresponding switch path item. When the current switch contact position matches the corresponding target switch contact position, the corresponding switch path item is not written into the switch position sequence. When the current switch contact position does not match the corresponding target switch contact position, the corresponding self-locking optical switch is identified as the optical switch to be switched, and the self-locking optical switch number and the target switch contact position in the corresponding switch path item are written into the switch position sequence.

[0188] When there are multiple optical switches to be switched, the switch position sequence is generated by arranging the switch path items corresponding to each optical switch to be switched in the connection order in the optical path from the matrix input position to the matrix output position.

[0189] When all current switch contact positions in the current position group are consistent with the corresponding target switch contact positions, a switch position sequence with zero switch position sequence items is generated. A zero switch position sequence item count indicates that it is not necessary to send electronic control signals to any self-locking optical switch to change the switch contact position, but it is still necessary to generate optical switch matrix control commands and perform tasks such as reacquiring the current position group, determining the number of anomalies, and acquiring the returned optical power.

[0190] In this embodiment, the matrix path record between service port 01 and the target backup fiber optic channel corresponding to channel number 1 includes matrix input position 01, matrix output position 03, and three sequentially arranged switch path items. The first switch path item includes self-locking optical switch number 01 and target switch contact position 2; the second switch path item includes self-locking optical switch number 04 and target switch contact position 1; and the third switch path item includes self-locking optical switch number 07 and target switch contact position 3.

[0191] The current switch contact positions of self-locking optical switches 01, 04, and 07 are determined through position feedback contacts to be 2, 2, and 3, respectively. The current switch contact positions of self-locking optical switches 01 and 07 are consistent with their corresponding target switch contact positions and are not written into the switch position sequence. The current switch contact position 2 of self-locking optical switch 04 is inconsistent with its corresponding target switch contact position 1; therefore, the switch path item including self-locking optical switch 04 and target switch contact position 1 is written into the switch position sequence.

[0192] Step S40: Control the optical switch matrix to switch according to the switch bit sequence, confirm the execution result of the optical switch matrix, and obtain the backhaul optical power.

[0193] Further, step S40 includes steps S41, S42 and S43.

[0194] Step S41: Generate and execute optical switch matrix control instructions.

[0195] After forming the switch bit sequence, the channel occupancy flag of the target spare fiber optic channel is read.

[0196] When the channel occupancy marker of the target backup fiber optic channel is marked as idle, the switch bit sequence and the preset backup switching action code are encapsulated into the optical switch matrix control command.

[0197] When the target backup fiber channel is marked as preemptible, a service release command is first generated based on the service-bearing port identifier, the channel number of the target backup fiber channel, and the preset port mapping table.

[0198] The preset port mapping table also stores service release path records corresponding to each original optical connection. Each service release path record includes at least one release switch path item, and each release switch path item includes a self-locking optical switch number and a release switch contact position.

[0199] The release switch contact position is the switch contact position that prevents a continuous optical path from being formed between the matrix input position corresponding to the service-bearing port and the matrix output position corresponding to the target backup fiber optic channel.

[0200] The service release instruction includes a service release action code, the identifier of the service-bearing port, the channel number of the target backup fiber optic channel, and each of the release switch path items.

[0201] Execute the service release command to switch the self-locking optical switch corresponding to each release switch path item to the corresponding release switch contact position.

[0202] After the position feedback waiting time expires, the current switch contact position of each self-locking optical switch is obtained through the position feedback contact corresponding to each release switch path item.

[0203] If any of the current switch contact positions is inconsistent with the corresponding release switch contact position, or if any of the current switch contact positions is invalid, a service release failure record is generated, and the current backup fiber optic channel switching process ends.

[0204] When the current switch contact position is consistent with the corresponding release switch contact position, it is confirmed that the original optical connection between the service port and the target backup fiber optic channel has been released. The current connection status in the corresponding service connection relationship record is updated to the release status, and the current switch contact positions in the matrix path record corresponding to the target backup fiber optic channel are re-acquired to form an updated current position group.

[0205] The switch bit sequence is regenerated based on the updated current position group, and the switch bit sequence generated before the service release is replaced with the regenerated switch bit sequence.

[0206] The regenerated switch bit sequence and the preset backup switching action code are encapsulated into the optical switch matrix control command.

[0207] The preset backup switching action code and the service release action code are pre-stored in the instruction encoding record of the control device, and are used to identify the backup optical connection establishment operation and the original optical connection release operation, respectively. In this embodiment, the preset backup switching action code is hexadecimal 01, and the service release action code is hexadecimal 02.

[0208] The optical switch matrix control command includes a preset backup switching action code, the number of switch position sequence items, and each switch position sequence item. Each switch position sequence item includes a self-locking optical switch number and the target switch contact position.

[0209] Before the optical switch matrix control command is executed for the first time, the retransmission count is set to zero. The retransmission count is used to record the number of times the optical switch matrix control command is retransmitted after the first execution; the first execution itself is not included in the retransmission count.

[0210] When the number of switch position sequence items in the optical switch matrix control command is zero, no electronic control signal to change the switch contact position is sent to any self-locking optical switch, and the process of re-acquiring the current position group and determining the number of abnormalities described in step S42 is directly entered.

[0211] According to the arrangement order in the switch position sequence, electronic control signals are sent sequentially to the switch drive interface corresponding to the self-locking optical switch number in each sequence item, so that the corresponding self-locking optical switch switches to the target switch contact position.

[0212] The self-locking optical switch used in this embodiment has a rated operating time of 20 milliseconds. The transmission time of all electronic control signals in the switch position sequence does not exceed 2 milliseconds. After the last electronic control signal is transmitted, a 38-millisecond wait is performed before the position feedback contacts of each self-locking optical switch in the matrix path record are read uniformly. Therefore, the single execution time required for sending an optical switch matrix control command and confirming position feedback does not exceed 40 milliseconds.

[0213] After controlling all the optical switches to be switched in the switch position sequence, the process of confirming the execution result of the optical switch matrix control command is initiated.

[0214] Step S42: Confirm the execution result of the optical switch matrix control command based on the current switch contact position.

[0215] After executing the optical switch matrix control command, the current position group is obtained again through the position feedback contact corresponding to each lock-type optical switch in the matrix path record.

[0216] For each switch path item, when the current switch contact position matches the corresponding target switch contact position, the abnormality count corresponding to that switch path item is set to zero. When the current switch contact position does not match the corresponding target switch contact position, or when the current switch contact position is an invalid position, the abnormality count corresponding to that switch path item is set to one.

[0217] The anomaly counts corresponding to all switch path entries in the matrix path record are summed to obtain the anomaly count. The anomaly count represents the number of self-locking optical switches that have not yet reached the corresponding target switch contact position.

[0218] When the number of anomalies is zero, it is determined that all self-locking optical switches in the matrix path record have reached the corresponding target switch contact position, and the process proceeds to step S43.

[0219] When the number of anomalies is greater than zero and the retransmission count is less than the preset retransmission count threshold, the optical switch matrix control command is retransmitted, and the retransmission count is incremented by one after the retransmission is completed.

[0220] Let the maximum allowable switching time for the current target backup fiber optic channel be the maximum switching time, the total reserved time required for control data processing and backhaul optical power acquisition be the processing reserved time, and the time required for sending a single optical switch matrix control command and confirming the position feedback be the single execution time. Then, the total number of allowed command executions is the largest integer not greater than the difference between the maximum switching time and the processing reserved time divided by the single execution time. The preset retransmission threshold is equal to the total number of allowed command executions minus one.

[0221] In this embodiment, the maximum allowed switching time read from the service protection parameter table based on the service port identifier is 200 milliseconds, the processing reservation time is 80 milliseconds, and the single execution time is 40 milliseconds. Therefore, the total number of allowed instruction executions is 3, and the preset retransmission threshold is 2, that is, it is executed once on the first execution and retransmitted at most twice.

[0222] Each time the optical switch matrix control command is retransmitted, the current position group is reacquired and the number of anomalies is recalculated until the number of anomalies is zero or the retransmission count reaches the preset retransmission count threshold.

[0223] When the number of anomalies is greater than zero and the retransmission count reaches the preset retransmission threshold, the retransmission of the optical switch matrix control command is stopped, and a switch execution failure record is generated.

[0224] The switch execution failure record includes the service port identifier, the channel number of the target backup fiber optic channel, the matrix path record, the number of the self-locking optical switch that did not reach the target switch contact position, the corresponding current switch contact position, the corresponding target switch contact position, the retransmission count value, and the record generation time.

[0225] Step S43: Obtain the backhaul optical power and confirm the service recovery result.

[0226] Only when the number of anomalies is zero, the received optical power after the target backup fiber optic channel establishes the optical connection is collected by an optical power monitoring point set on the receiving side of the service port.

[0227] The optical power monitoring point used to collect the received optical power is set on the receiving side after the target backup optical fiber channel is connected to the service port through the optical switch matrix, so that the collected received optical power represents the actual optical power received by the service port after passing through the target backup optical fiber channel and the corresponding matrix path.

[0228] In this embodiment, the data update cycle of the optical power detection interface is 20 milliseconds, and the return optical power acquisition waiting time is 40 milliseconds. From the moment it is confirmed that all self-locking optical switches have reached the corresponding target switch contact position, the received optical power output by the optical power detection interface is read within the return optical power acquisition waiting time.

[0229] The effective received optical power is the received optical power value whose acquisition time is later than the confirmation time of all self-locking optical switches in place, does not carry an optical power detection interface fault mark, and is within the range of the optical power detection interface.

[0230] The preset service recovery threshold is determined based on the receiving sensitivity and service recovery power margin of the optical receiving module connected to the service port. The service recovery power margin is the reserved power difference between the preset service recovery threshold and the receiving sensitivity. The preset service recovery threshold is equal to the sum of the receiving sensitivity and the service recovery power margin.

[0231] In this embodiment, the receiving sensitivity is -19 dBmW, the service recovery power margin is 4 dB, and therefore the preset service recovery threshold is -15 dBmW.

[0232] When at least one valid received optical power is obtained within the waiting time for the backhaul optical power acquisition, the valid received optical power with the latest acquisition time is determined as the backhaul optical power, and the backhaul optical power is compared with the preset service recovery threshold.

[0233] In one optional implementation, if no valid received optical power is obtained within the waiting time for the return optical power acquisition, the return optical power acquisition is determined to have failed, and the process of determining the next backup fiber channel is triggered. The comparison between the return optical power and the preset service recovery threshold is no longer performed. This processing method is used to continue trying other backup fiber channels when the optical power detection interface does not return a valid detection result, and is not a necessary step in determining whether to switch back based on the comparison result of the return optical power and the preset service recovery threshold.

[0234] When the return optical power is not less than the preset service recovery threshold, a handover completion record is generated. The handover completion record includes the service port identifier, the channel number of the original primary fiber channel, the channel number of the target backup fiber channel, the switch sequence, the return optical power, and the handover completion time.

[0235] After generating the handover completion record, using the service port identifier as the query condition, the original service connection relationship record with a currently valid connection status is read from the service connection relationship table. The channel number in the original service connection relationship record is updated from the channel number of the original primary fiber channel to the channel number of the target backup fiber channel, while maintaining the current connection status as valid. Therefore, at any given time, the same service port corresponds to only one service connection relationship record with a currently valid connection status.

[0236] When the return optical power is less than the preset service recovery threshold, it is determined that the respective lock-on optical switches in the matrix path record have reached the corresponding target switch contact position, but the optical connection established by the target backup optical fiber channel has not reached the preset service recovery threshold, and the process of determining the next backup optical fiber channel begins.

[0237] Step S50: When the backhaul optical power is less than the preset service recovery threshold or when the switch execution failure record is generated, determine the next backup fiber optic channel and re-execute the switch.

[0238] In one optional implementation, if no valid received optical power is obtained within the waiting time for the return optical power acquisition, the failure of the return optical power acquisition is used as an additional reswitching trigger condition, and the determination and reswitching process of the next backup fiber optic channel is executed.

[0239] Further, step S50 includes steps S51 and S52.

[0240] Step S51: Determine the next backup fiber optic channel.

[0241] When the backhaul optical power is less than the preset service recovery threshold or when a switch execution failure record is generated, the channel number and sequence position number of the current target backup optical fiber channel are written into the switch failure record.

[0242] In one optional implementation, when no valid received optical power is obtained within the waiting time for the return optical power acquisition, the channel number and sequence position number of the current target backup optical fiber channel are written into the switching failure record, and the failure of the return optical power acquisition is determined as the corresponding failure reason.

[0243] When triggered by the backhaul optical power being less than the preset service recovery threshold, the handover failure record also includes the backhaul optical power, and insufficient backhaul optical power is identified as the corresponding failure reason. When triggered by the generation of the switch execution failure record, the handover failure record is stored in association with the switch execution failure record, and matrix path execution failure is identified as the corresponding failure reason.

[0244] Increment the sequence position number of the current target backup fiber optic channel by one to obtain the next sequence position number.

[0245] Check if there exists a sequence position number in the backup channel sequence that is the same as the next sequence position number. If it exists, determine the backup fiber channel corresponding to the next sequence position number as the next backup fiber channel. If it does not exist, generate a backup channel exhaustion record.

[0246] The backup channel exhaustion record includes the service port identifier, the channel number of the primary fiber channel, the channel numbers of each backup fiber channel that has been tried in the backup channel sequence, the sequence position number corresponding to each backup fiber channel, and the switching failure reason corresponding to each backup fiber channel.

[0247] Step S52: Update the target backup fiber optic channel and re-execute the switch.

[0248] This step is executed when the next sequence position number exists in the backup channel sequence and the backup fiber channel corresponding to the next sequence position number has been determined as the next backup fiber channel.

[0249] In this embodiment, the currently failed optical connection is used to characterize the current optical path state where optical switch matrix control has been performed for the current target backup optical fiber channel, but service recovery has not been successfully achieved. The current optical path state includes optical connections that have been formed but whose return optical power is less than the preset service recovery threshold, optical connections that have not obtained effective received optical power within the return optical power acquisition waiting time, and partial optical paths formed because some self-locking optical switches have not reached the corresponding target switch contact positions.

[0250] Before updating the target backup fiber channel, the service release path record corresponding to the current failed optical connection is read according to the service port identifier, the channel number of the current target backup fiber channel and the preset port mapping table, and a failed optical connection release command is generated according to each release switch path item in the service release path record.

[0251] Execute the failed optical connection release command to switch the self-locking optical switch corresponding to each release switch path item to the corresponding release switch contact position, and after the position feedback waiting time expires, obtain the current switch contact position of each self-locking optical switch through the position feedback contact corresponding to each self-locking optical switch.

[0252] If any of the current switch contact positions is inconsistent with the corresponding release switch contact position, or if any of the current switch contact positions is invalid, a failed optical connection release record is generated, the update of the target backup optical fiber channel is stopped, and the current backup optical fiber channel switching process ends.

[0253] When the current switch contact position is consistent with the corresponding release switch contact position, it is detected whether a continuous optical path is still formed between the service port and the current target backup optical fiber channel.

[0254] When a continuous optical path is still formed between the service port and the current target backup optical fiber channel, a failure record for releasing the failed optical connection is generated, updating the target backup optical fiber channel is stopped, and the current backup optical fiber channel switching process ends.

[0255] When the service port and the current target backup fiber channel no longer form a continuous optical path, the target backup fiber channel is updated to the next backup fiber channel.

[0256] Using the updated target backup fiber optic channel number and the service port identifier as combined query conditions, the corresponding matrix path record is reread from the preset port mapping table.

[0257] Based on the reread matrix path record, the current switch contact position of each lock-type optical switch is obtained again, the current position group is re-formed, and the switch position sequence is regenerated.

[0258] Based on the regenerated switch bit sequence, the optical switch matrix control command generation and execution process described in step S41, the execution result confirmation process described in step S42, and the return optical power acquisition and comparison process described in step S43 are executed again in sequence.

[0259] During the same backup fiber channel handover process, the sequence position number only increases in ascending order, and does not return sequence position numbers that have already been tried. The same backup fiber channel can be identified as the target backup fiber channel at most once during the same backup fiber channel handover process.

[0260] The matrix path records corresponding to different backup fiber optic channels include different self-locking optical switch numbers or different target switch contact positions. When the matrix path corresponding to the current target backup fiber optic channel generates the switch execution failure record, the switch bit sequence is regenerated according to the matrix path record corresponding to the next backup fiber optic channel, and the optical connection establishment process is re-executed.

[0261] In the specific execution of this embodiment, the sequence position number of the target backup fiber optic channel corresponding to channel number 1 is 1. After the optical switch matrix is ​​controlled to establish an optical connection between service port 01 and the backup fiber optic channel corresponding to channel number 1, the collected return optical power is -16.3 dBmW, which is less than the preset service recovery threshold of -15 dBmW. The channel number 1, sequence position number 1, return optical power of -16.3 dBmW, and the reason for insufficient return optical power are written into the switching failure record.

[0262] Increment the sequence position number 1 corresponding to the current target backup fiber optic channel by one to obtain the next sequence position number 2. Since sequence position number 2 exists in the backup channel sequence, the channel number 2 corresponding to sequence position number 2 is determined as the next backup fiber optic channel.

[0263] Before updating the target backup fiber channel, based on service port 01, the channel number 1 corresponding to the current target backup fiber channel, and the preset port mapping table, the service release path record corresponding to the failed optical connection between service port 01 and channel number 1 is read, and a failed optical connection release command is generated based on the service release path record. The failed optical connection release command is executed, causing the corresponding self-locking optical switch to switch to the release switch contact position, and the current switch contact position of the self-locking optical switch is obtained through the corresponding position feedback contact.

[0264] When the current switch contact position of the self-locking optical switch is consistent with the corresponding release switch contact position, and when it is detected that a continuous optical path is no longer formed between service port 01 and the backup optical fiber channel corresponding to channel number 1, it is confirmed that the current failed optical connection has been released, and the target backup optical fiber channel is updated to the backup optical fiber channel corresponding to channel number 2.

[0265] The backup fiber optic channel corresponding to channel number 2 is marked as preemptible, and the corresponding service port is identified as service port 08. Based on service port 08, channel number 2, and the preset port mapping table, the service release path record between service port 08 and channel number 2 is read, and the service release command is generated and executed, causing the corresponding self-locking optical switch to switch to the release switch contact position.

[0266] After the position feedback waiting time expires, the current switch contact position corresponding to each release switch path item is obtained through the corresponding position feedback contact. When all the current switch contact positions are consistent with the corresponding release switch contact positions, it is confirmed that the original optical connection between service port 08 and the backup fiber optic channel corresponding to channel number 2 has been released, and the current connection status of the corresponding service connection relationship record in the service connection relationship table is updated to the release status.

[0267] After confirming that the original optical connection has been terminated, the current switch contact positions of the respective self-locking optical switches in the matrix path record between service port 01 and channel number 2 are retrieved again. Specifically, the current switch contact position of self-locking optical switch number 02 is 1, the current switch contact position of self-locking optical switch number 05 is 1, and the current switch contact position of self-locking optical switch number 08 is 1.

[0268] The current switch contact positions of self-locking optical switches No. 02 and No. 08 are consistent with the corresponding target switch contact positions, respectively. The current switch contact position 1 of self-locking optical switch No. 05 is inconsistent with the target switch contact position 2. Therefore, the regenerated switch position sequence includes self-locking optical switch No. 05 and target switch contact position 2.

[0269] After the corresponding optical switch matrix control command is executed for the first time, the position feedback contact of the self-locking optical switch number 05 still returns to the current switch contact position 1, the number of abnormalities is 1, and the retransmission count value is 0. Since the retransmission count value is less than the preset retransmission number threshold 2, the optical switch matrix control command is retransmitted, and the retransmission count value is updated to 1.

[0270] After this retransmission is completed, the position feedback contact of the self-locking optical switch No. 05 returns to the current switch contact position 2, and the number of abnormalities is re-determined to be zero.

[0271] After the number of anomalies reaches zero, the return optical power after establishing an optical connection on the backup fiber channel corresponding to channel number 2 is collected through the optical power detection interface on the receiving side of the service port, resulting in a return optical power of -13.2 dBmW. If the return optical power is not less than the preset service recovery threshold of -15 dBmW, a handover completion record is generated, and the channel number currently connected to service port 01 is updated to 2.

[0272] Example 2

[0273] Please see Figure 3 This embodiment provides a backup fiber optic channel switching system based on optical power monitoring, used to execute the backup fiber optic channel switching method described in Embodiment 1.

[0274] The backup fiber optic channel switching system includes a link acquisition module, an anomaly detection module, a backup management module, a bit sequence module, a matrix switching module, an optical switch matrix, and a switching confirmation module. It also includes a processor, a memory, an optical power detection interface, an optical time domain reflectance test interface, a switch drive interface, and a position feedback acquisition interface.

[0275] The processor is connected to the memory, the optical power detection interface, the optical time-domain reflectometry (OTDR) test interface, the switch driver interface, and the position feedback acquisition interface. The optical power detection interface is connected to the primary fiber channel, each of the backup fiber channels, and the optical power monitoring point on the receiving side of the service port. The OTD test interface is connected to an optical time-domain reflectometer (OTDR). The OTD is connected to the primary fiber channel and each of the backup fiber channels via a wavelength division multiplexer (WDM). The WDM is used to couple test optical pulses to the corresponding fiber channel and separate the returned test optical signal from the service optical signal or monitoring optical signal. The switch driver interface is connected to the driver end of each latching optical switch in the optical switch matrix. The position feedback acquisition interface is connected to the position feedback contact of each latching optical switch.

[0276] The memory is used to store the following tables: service connection relationship table, service protection parameter table, channel status table, preset sampling period, preset power test threshold, preset advance test power difference, power switching threshold, high attenuation threshold, continuous number threshold, preset backup power threshold, preset backup attenuation threshold, preset service recovery threshold, preset retransmission number threshold, preset port mapping table, switch configuration record, instruction encoding record, backup channel sequence, current position group, switch bit sequence, optical switch matrix control instruction, service release instruction, failed optical connection release instruction, switch completion record, switch failure record, service release failure record, switch execution failure record, failed optical connection release failure record, and backup channel exhaustion record.

[0277] The optical switch matrix control instruction, the service release instruction, and the failed optical connection release instruction are generated by the processor according to the corresponding matrix path record or service release path record, and stored in the memory during the execution of the corresponding instruction; the switch completion record, the switch failure record, the service release failure record, the switch execution failure record, the failed optical connection release failure record, and the backup channel exhaustion record are written into the memory after the corresponding processing results are generated.

[0278] In this embodiment, the link acquisition module, anomaly detection module, backup management module, bit sequence module, matrix switching module, and switching confirmation module are all implemented by the processor reading and executing program instructions in the memory.

[0279] After the backup fiber optic channel switching system is started, the link acquisition module uses the channel number of the primary fiber optic channel as the query condition to read the service connection relationship records that are currently in a valid connection state from the service connection relationship table, and determines the service port connected to the primary fiber optic channel.

[0280] The link acquisition module controls the optical power detection interface according to the preset sampling period to sequentially acquire the received optical power values ​​of the primary optical fiber channel and each of the backup optical fiber channels, and determines the channel number corresponding to the current acquisition object as the current channel number.

[0281] When the received optical power value is less than the preset power test threshold, or when there is no link attenuation value record indexed by the current channel number in the memory, the link acquisition module controls the optical time domain reflectometer to perform optical time domain reflectometer test on the corresponding current optical fiber channel through the optical time domain reflectometer test interface, and reads the link attenuation value output by the optical time domain reflectometer.

[0282] When the received optical power value is not less than the preset power test threshold, and there is a link attenuation value record in the memory indexed by the current channel number, the link acquisition module reads the link attenuation value from the link attenuation value record with the latest test time.

[0283] The link acquisition module associates the current channel number, the received optical power value, and the link attenuation value into the channel status table, and sends the update completion information to the anomaly detection module after all fiber optic channels have completed data updates.

[0284] Before the anomaly detection module reads the received optical power value and link attenuation value of the primary optical fiber channel for the first time, it sets the continuous anomaly count value to zero.

[0285] Within each preset sampling period, after receiving the update completion information, the anomaly determination module reads the received optical power value and link attenuation value of the primary optical fiber channel from the updated channel status table.

[0286] When the received optical power value is less than the power switching threshold, or the link attenuation value is greater than the high attenuation threshold, the anomaly determination module increments the continuous anomaly count by one. When the received optical power value is not less than the power switching threshold, and the link attenuation value is not greater than the high attenuation threshold, the anomaly determination module resets the continuous anomaly count to zero.

[0287] When the continuous anomaly count reaches the continuous number threshold, the anomaly determination module generates the primary channel anomaly flag and sends the primary channel anomaly flag, the service port identifier, and the channel number of the primary fiber optic channel to the backup management module.

[0288] After receiving the primary channel abnormality flag, the backup management module initializes the channel occupancy flag of each backup fiber optic channel to a non-preemptible flag.

[0289] For any of the aforementioned backup fiber optic channels, the backup management module queries the service connection relationship table using its channel number as the query condition. If no service connection relationship record with a currently valid connection status exists, the backup management module determines that the corresponding backup fiber optic channel is not carrying any service and updates the corresponding channel occupancy marker to an idle marker.

[0290] When a service connection record exists that is currently in a valid connection state, the backup management module reads the service port identifier from the service connection record and uses the service port identifier as a query condition to read the corresponding service priority from the service protection parameter table, which is then used as the service priority of the service carried by the backup fiber channel.

[0291] When the service priority of the service carried by the backup fiber channel is lower than the service priority of the service to be restored, the backup management module updates the corresponding channel occupancy mark to a preemptible mark and records the port identifier of the service carried; when the service priority of the service carried by the backup fiber channel is greater than or equal to the service priority of the service to be restored, the backup management module keeps the corresponding channel occupancy mark as a non-preemptible mark.

[0292] The backup management module reads the received optical power value and link attenuation value of each backup optical fiber channel from the channel status table, and determines whether each backup optical fiber channel meets the preset backup activation conditions.

[0293] The backup management module writes the backup fiber optic channels that meet the preset backup activation conditions into the backup channel sequence, and sorts them in sequence according to the channel occupancy mark, the received optical power value, the link attenuation value, and the channel number.

[0294] After sorting, the backup management module configures sequentially increasing sequence position numbers according to the arrangement order of each backup fiber channel, and determines the backup fiber channel corresponding to the smallest sequence position number as the target backup fiber channel.

[0295] When the backup channel sequence is empty, the backup management module generates a backup channel exhaustion record. When the backup channel sequence is not empty, the backup management module sends the channel number, sequence position number, and channel occupancy flag of the target backup fiber channel to the bit sequence module and the matrix switching module; when the channel occupancy flag of the target backup fiber channel is a preemptible flag, the backup management module also sends the corresponding service port identifier to the matrix switching module.

[0296] The bit sequence module uses the service port identifier and the channel number of the target backup optical fiber channel as combined query conditions to read the corresponding matrix path record from the preset port mapping table, and reads the current switch contact position of each lock-type optical switch through the position feedback acquisition interface.

[0297] The bit sequence module forms the current position group according to the arrangement order of each switch path item in the matrix path record, and compares each current switch contact position with the corresponding target switch contact position item by item.

[0298] For switch path entries where the current switch contact position is inconsistent with the target switch contact position, the bit sequence module extracts the self-locking optical switch number and the target switch contact position, and writes them into the switch bit sequence according to the optical path connection order from the matrix input position to the matrix output position.

[0299] When the target backup fiber optic channel is marked as idle, the matrix switching module encapsulates the switch bit sequence and the preset backup switching action code into the optical switch matrix control command.

[0300] When the channel occupancy marker of the target backup fiber channel is marked as preemptible, the matrix switching module generates the service release command based on the service port identifier, the channel number of the target backup fiber channel, and the preset port mapping table, and executes the service release command through the switch driver interface.

[0301] After executing the service release command, the switching confirmation module obtains the current switch contact position corresponding to each release switch path item through the location feedback acquisition interface. If any current switch contact position is inconsistent with the corresponding release switch contact position, or if any current switch contact position is invalid, the switching confirmation module generates a service release failure record and terminates the current backup fiber channel switching process. If all current switch contact positions are consistent with the corresponding release switch contact positions, the switching confirmation module confirms that the original optical connection between the service-bearing port and the target backup fiber channel has been released, and updates the current connection status of the corresponding service connection relationship record in the service connection relationship table to the released status.

[0302] After confirming that the original optical connection between the service port and the target backup fiber optic channel has been disconnected, the bit sequence module reacquires the current position group and regenerates the switch bit sequence. The matrix switching module encapsulates the regenerated switch bit sequence and the preset backup switching action code into the optical switch matrix control command.

[0303] The matrix switching module sets the retransmission count value to zero and sends electronic control signals to each optical switch to be switched through the switch drive interface according to the switch bit sequence.

[0304] After transmitting all electronic control signals in the optical switch matrix control command, the matrix switching module sends a control command transmission completion message to the switching confirmation module. This message indicates that all electronic control signals included in the optical switch matrix control command have been transmitted, but does not indicate that each individual interlocking optical switch has reached its corresponding target switch contact position.

[0305] After receiving the control command transmission completion information, the switching confirmation module rereads the position feedback contacts of each lock-type optical switch in the matrix path record through the position feedback acquisition interface, and reacquires the current position group.

[0306] The switching confirmation module compares each current switch contact position with the corresponding target switch contact position, and determines the number of self-locking optical switches with inconsistent positions or invalid current switch contact positions as the abnormal number.

[0307] When the number of anomalies is greater than zero and the retransmission count is less than the preset retransmission count threshold, the handover confirmation module sends a retransmission trigger message to the matrix switching module. The matrix switching module responds to the retransmission trigger message by retransmitting the optical switch matrix control command and incrementing the retransmission count by one.

[0308] After each retransmission of the optical switch matrix control command, the switching confirmation module reacquires the current position group and re-determines the number of anomalies.

[0309] When the number of anomalies is greater than zero and the retransmission count reaches the preset retransmission count threshold, the switching confirmation module generates a switch execution failure record and sends a reswitching trigger information to the backup management module.

[0310] When the number of anomalies is zero, the switching confirmation module collects the received optical power after the target backup fiber optic channel establishes an optical connection through the optical power detection interface.

[0311] When the switching confirmation module acquires at least one valid received optical power within the waiting time for the backhaul optical power acquisition, it determines the valid received optical power with the latest acquisition time as the backhaul optical power and compares the backhaul optical power with the preset service recovery threshold.

[0312] When the backhaul optical power is not less than the preset service recovery threshold, the handover confirmation module generates the handover completion record and updates the channel number and current connection status of the service port currently connected in the service connection relationship table.

[0313] When the backhaul optical power is less than the preset service recovery threshold, the handover confirmation module generates the handover failure record and sends a re-handover trigger information to the backup management module.

[0314] In one optional implementation, when the switching confirmation module fails to obtain valid received optical power within the waiting time for backhaul optical power acquisition, it determines the failure of backhaul optical power acquisition as the reason for this switching failure and sends a re-switching trigger information to the backup management module to trigger the determination process of the next backup fiber channel, and no longer performs the comparison between the backhaul optical power and the preset service recovery threshold.

[0315] After receiving the reswitching trigger information, the backup management module generates or updates the switching failure record, writes the channel number and sequence position number of the current target backup fiber channel into the switching failure record, and increments the sequence position number of the current target backup fiber channel by one to obtain the next sequence position number.

[0316] When the reswitching trigger information is triggered by the switch execution failure record, the switching failure record is associated with and stored in the switch execution failure record; when the reswitching trigger information is triggered by the return optical power acquisition failure, the return optical power acquisition failure is written into the switching failure record as the corresponding failure reason.

[0317] The backup management module queries whether there is a sequence position number in the backup channel sequence that is the same as the next sequence position number. If the next sequence position number is not found in the backup channel sequence, the backup management module generates a backup channel exhaustion record and ends the current backup fiber channel switching process.

[0318] When the next sequence position number exists in the backup channel sequence, the backup management module determines the backup optical fiber channel corresponding to the next sequence position number as the next backup optical fiber channel, and sends a failed optical connection release trigger information to the matrix switching module before updating the target backup optical fiber channel. The failed optical connection release trigger information includes the service port identifier and the channel number of the current target backup optical fiber channel.

[0319] After receiving the failed optical connection release trigger information, the matrix switching module reads the service release path record corresponding to the current failed optical connection according to the service port identifier, the channel number of the current target backup fiber channel and the preset port mapping table, and generates a failed optical connection release command according to the service release path record.

[0320] The matrix switching module executes the failed optical connection release command through the switch drive interface, causing the corresponding self-locking optical switch to switch to the release switch contact position, and sends release command execution completion information to the switching confirmation module.

[0321] After receiving the information indicating that the release command has been executed, the switching confirmation module obtains the current switch contact position of the self-locking optical switch corresponding to each release switch path item through the position feedback acquisition interface.

[0322] When any of the current switch contact positions is inconsistent with the corresponding release switch contact position, or when any of the current switch contact positions is invalid, the switching confirmation module generates a failed optical connection release record and ends the current backup fiber optic channel switching process.

[0323] When the positions of each current switch contact are consistent with the corresponding positions of the release switch contacts, the switching confirmation module performs connectivity detection on the optical path between the service port and the current target backup fiber optic channel.

[0324] When the connectivity detection result indicates that there is still a continuous optical path between the service port and the current target backup fiber channel, the switching confirmation module generates a failure record for releasing the failed optical connection and ends the current backup fiber channel switching process.

[0325] When the connectivity detection result indicates that there is no continuous optical path between the service port and the current target backup optical fiber channel, the switching confirmation module sends a failed optical connection release completion message to the backup management module.

[0326] After receiving the information indicating that the failed optical connection has been released, the backup management module updates the target backup optical fiber channel to the next backup optical fiber channel and sends the updated target backup optical fiber channel's channel number, sequence position number, and channel occupancy flag to the bit sequence module and the matrix switching module, and re-executes the processing procedures corresponding to the bit sequence module, the matrix switching module, and the switching confirmation module.

[0327] The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the specific embodiments described above. The specific embodiments described above are only for illustrating the present invention and are not intended to limit the present invention. Any changes, modifications, substitutions, or variations made by those skilled in the art based on the disclosure of the present invention without departing from the concept and scope of protection of the claims should be included within the scope of protection of the present invention.

Claims

1. A method for switching backup fiber optic channels based on optical power monitoring, characterized in that, include: Determine the service port connected to the primary fiber channel, obtain the received optical power value and link attenuation value of the primary fiber channel and each backup fiber channel, and generate a channel status table; A primary channel anomaly marker is generated based on the channel status table and a preset anomaly threshold. After the primary channel anomaly marker is generated, a backup channel sequence is generated according to preset backup activation conditions. When the backup channel sequence is not empty, the target backup optical fiber channel is determined, the position of each target switch contact is determined according to the service port, the target backup optical fiber channel and the preset port mapping table, the position of each current switch contact is obtained, the optical switches to be switched that are inconsistent with the current switch contact position and the corresponding target switch contact position are filtered, and a switch position sequence is generated. The optical connection between the service port and the target backup optical fiber channel is established by controlling the optical switch matrix according to the switch bit sequence, and the return optical power is obtained. When the backhaul optical power is less than the preset service recovery threshold and there is a next backup optical fiber channel, the target backup optical fiber channel is updated to the next backup optical fiber channel, the switch bit sequence is regenerated, and the switching is performed.

2. The method for switching backup fiber optic channels based on optical power monitoring according to claim 1, characterized in that, The method for generating the channel status table includes: Configure channel numbers for the primary fiber optic channel and each of the backup fiber optic channels; Each of the aforementioned channel numbers is used as the current channel number, and the optical fiber channel corresponding to the current channel number is used as the current optical fiber channel. The received optical power value of the current optical fiber channel is collected according to a preset sampling period. When the received optical power value is less than the preset power test threshold, or when the current optical fiber channel does not store the link attenuation value, an optical time domain reflectance test is performed on the current optical fiber channel to obtain the link attenuation value; When the received optical power value is not less than the preset power test threshold, and the current optical fiber channel stores a link attenuation value, read the latest link attenuation value stored in the current optical fiber channel; Write the current channel number, the received optical power value, and the link attenuation value into the channel status table.

3. The method for switching backup fiber optic channels based on optical power monitoring according to claim 2, characterized in that, The steps for generating the primary channel anomaly marker include: The preset abnormal thresholds include a power switching threshold, a high attenuation threshold, and a consecutive number threshold. Before first reading the received optical power value and link attenuation value of the primary fiber channel from the channel status table, the continuous anomaly count value is set to zero; Within each preset sampling period, the channel status table is updated, and the received optical power value and link attenuation value of the primary optical fiber channel are read from the updated channel status table; When the received optical power value is less than the power switching threshold, or the link attenuation value is greater than the high attenuation threshold, the continuous anomaly count value is incremented by one; When the received optical power value is not less than the power switching threshold and the link attenuation value is not greater than the high attenuation threshold, the continuous abnormal count value is cleared to zero. When the continuous anomaly count reaches the continuous number threshold, the primary channel anomaly flag is generated.

4. The method for switching backup fiber optic channels based on optical power monitoring according to claim 3, characterized in that, The method for generating the backup channel sequence includes: Initialize the channel occupancy flag of each of the aforementioned backup fiber optic channels to a non-preemptible flag; When the backup fiber channel is not carrying any services, the corresponding channel occupancy flag will be updated to an idle flag; When the service priority of the service carried by the backup fiber channel is lower than the service priority of the service to be restored corresponding to the service port, the corresponding channel occupancy mark is updated to a preemptible mark, and the corresponding service port identifier is recorded. The preset standby activation conditions include that the received optical power value is not less than the preset standby power threshold, the link attenuation value is not greater than the preset standby attenuation threshold, the channel occupancy mark is an idle mark or a preemptible mark, and the preset port mapping table contains a matrix path record between the service port and the channel number of the standby optical fiber channel; The backup fiber optic channel that meets the preset backup activation conditions is written into the backup channel sequence.

5. A method for switching backup fiber optic channels based on optical power monitoring according to claim 4, characterized in that, The method for determining the target backup fiber optic channel includes: When the backup channel sequence is empty, a backup channel exhaustion record is generated; When the spare channel sequence is not empty, the channel occupancy flag, the received optical power value, the link attenuation value, and the channel number are sorted in order from first to fourth, wherein the idle flag takes priority over the preemptible flag, the received optical power value is arranged from high to low, the link attenuation value is arranged from low to high, and the channel number is arranged from small to large. Each of the backup fiber optic channels is assigned a sequentially increasing sequence position number according to the arrangement order, and the backup fiber optic channel corresponding to the smallest sequence position number is determined as the target backup fiber optic channel.

6. A method for switching backup fiber optic channels based on optical power monitoring according to claim 5, characterized in that, The method for generating the switch bit sequence includes: Based on the service port identifier of the service port and the channel number of the target backup fiber optic channel, the corresponding matrix path record is read from the preset port mapping table; The matrix path record includes matrix input position, matrix output position, and multiple switch path items arranged in the optical path connection sequence. Each switch path item includes a self-locking optical switch number and a target switch contact position. By using the position feedback contact corresponding to the number of each self-locking optical switch, the current switch contact position of each self-locking optical switch is obtained, and a current position group is formed. The current switch contact positions in the current position group are compared with the target switch contact positions in the corresponding switch path items. Switch path items whose current switch contact positions do not match the corresponding target switch contact positions are filtered out. The switch path items are then arranged according to their connection order in the optical path from the matrix input position to the matrix output position to generate the switch position sequence.

7. A method for switching backup fiber optic channels based on optical power monitoring according to claim 6, characterized in that, The method for generating and executing the optical switch matrix control commands includes: When the channel occupancy marker of the target backup fiber optic channel is marked as idle, the switch bit sequence and the preset backup switching action code are encapsulated into an optical switch matrix control instruction; When the channel occupancy mark of the target backup fiber channel is marked as preemptible, a service release command is generated based on the bearer service port identifier, the channel number of the target backup fiber channel, and the preset port mapping table. The service release command is executed to disconnect the optical connection between the target backup fiber channel and the bearer service port corresponding to the bearer service port identifier. After executing the service release instruction, the current switch contact position of each self-locking optical switch is reacquired to form an updated current position group. The switch position sequence is regenerated according to the updated current position group, and the regenerated switch position sequence and the preset backup switching action code are encapsulated into the optical switch matrix control instruction. Set the retransmission count to zero and execute the optical switch matrix control command.

8. A method for switching backup fiber optic channels based on optical power monitoring according to claim 7, characterized in that, The method for confirming the switching result includes: After executing the optical switch matrix control command, the current position group is reacquired, and the number of current switch contact positions in the current position group that are inconsistent with the corresponding target switch contact positions is determined as the abnormal number. When the number of anomalies is zero, the received optical power after the target backup optical fiber channel establishes the optical connection is collected and used as the return optical power. When the backhaul optical power is not less than the preset service recovery threshold, a handover completion record is generated; When the number of anomalies is greater than zero and the retransmission count is less than the preset retransmission number threshold, the optical switch matrix control command is retransmitted, the retransmission count is incremented by one, and the process of reacquiring the current location group and determining the number of anomalies is returned. When the number of anomalies is greater than zero and the retransmission count reaches the preset retransmission count threshold, a switch execution failure record is generated.

9. A method for switching backup fiber optic channels based on optical power monitoring according to claim 8, characterized in that, The method for determining and switching back to the next backup fiber optic channel includes: When the backhaul optical power is less than the preset service recovery threshold or when the switch execution failure record is generated, the channel number and sequence position number of the target backup optical fiber channel are written into the switch failure record, and the sequence position number is incremented by one to obtain the next sequence position number; When the next sequence position number exists in the backup channel sequence, the backup optical fiber channel corresponding to the next sequence position number is determined as the next backup optical fiber channel, the target backup optical fiber channel is updated to the next backup optical fiber channel, and the method for generating the switch position sequence, the method for generating and executing the optical switch matrix control command, and the method for confirming the switching result are executed again in sequence. When the next sequence position number is not present in the backup channel sequence, a backup channel exhaustion record is generated.

10. A backup fiber optic channel switching system based on optical power monitoring, used to perform the method according to any one of claims 1 to 9, characterized in that, include: The link acquisition module is used to determine the service port connected to the main fiber channel, obtain the received optical power value and link attenuation value, and generate a channel status table. The anomaly detection module is used to generate an anomaly flag for the primary channel based on the channel status table and a preset anomaly threshold. The backup management module is used to generate backup channel sequences, determine target backup fiber channels, and determine the next backup fiber channel when a re-switching is triggered. The bit sequence module is used to generate a switch bit sequence based on the service port, the target backup fiber channel and a preset port mapping table; The matrix switching module is used to generate optical switch matrix control commands based on the switch bit sequence; An optical switch matrix includes multiple self-locking optical switches, each of which is used to switch to the corresponding target switch contact position under the control of the matrix switching module, so as to establish an optical connection between the service port and the target backup optical fiber channel. The switching confirmation module is used to obtain the backhaul optical power and trigger a re-switching when the backhaul optical power is less than the preset service recovery threshold or when a switch execution failure record is generated.

Citation Information

Patent Citations

  • Intelligent optical cable monitoring system and method with optical cable protection function

    CN110247700B

  • Optical cable real time monitoring system

    CN1333454A