Patent Description:
To quickly establish a radio network at low costs when there is no equipment room or an equipment room is not at an ideal location, a distributed base station solution is proposed. In this solution, a Radio Remote Unit (RRU) and a baseband control unit (Base Band Unit, BBU) are separated from each other by using a radio remote distribution technology, and are connected by using a fiber or a cable. Digitally sampled and quantized In-phase/Quadrature (I/Q) data is transmitted between the BBU and the RRU by using a Common Public Radio Interface (CPRI).

An Optical Transport Network (OTN) may be used as a bearer network between the BBU and the RRU. To enhance network reliability, the OTN generally performs service protection by using an active fiber and a standby fiber. As shown in <FIG>, after being converged to an OTN device A, services of multiple RRUs are transmitted to an OTN device B by using a working trail. The OTN device B sends the received services to the BBU. If the working trail between the OTN device A and the OTN device B is faulty, the services may be switched to be transmitted by using a protection trail.

<FIG> is a schematic diagram of a fault detection manner of an OTN device in the prior art. As shown in <FIG>, the OTN device detects a fault by using an optical module and an OTU overhead detection module, generates alarm information, and reports the alarm information to a protection switching control module. After receiving the alarm information, the protection switching control module switches a service from a working trail to a protection trail. It takes a relatively long time, which is generally at a millisecond level, from the moment when the working trail is faulty to the moment when the OTN device detects the fault and reports the alarm information. Consequently, protection switching efficiency is low. The <CIT> refers to a smart mechanism for a multi-client bidirectional optical channel protection schema. The <CIT> refers to a signal storage method, frame generating device, frame receiving device and a transmission system. The <CIT> refers to a method and a system of signal transmission based on a radio frequency stretch base station. The <CIT> refers to a frame generation method, an optical transmission device, and an optical transmission system.

In view of this, embodiments of the present invention provide a fault detection method and device, to resolve a problem of low protection switching efficiency. The present application is defined in the appended independent claims. Further implementations are disclosed in the pending dependent claims. In the following, implementations not falling within the scope of the claims are to be understood as examples useful for understanding the application.

According to a first aspect, an embodiment of the present invention provides a fault detection method, including: obtaining, by an optical transport network OTN device, a first OTN frame, where the first OTN frame includes at least two payload areas, and each of the at least two payload areas includes payload check information and payload data, where the payload check information is used to check payload data of a payload area in which the payload check information is located; and performing, by the OTN device, fault detection on each payload area according to the payload check information. An OTN frame is divided into multiple payload areas, and each payload area carries respective payload check information, which is used to check payload data of the respective payload area, so that the OTN device can detect a fault when obtaining partial payload data, for example, at least one payload area, thereby improving efficiency of fault detection.

In a possible implementation manner of the first aspect, the first OTN frame includes <NUM>*n payload areas, where n is a positive integer greater than or equal to <NUM>. The first OTN frame may include <NUM> rows and n columns. For example, n may be <NUM>. A payload area division manner of an OTN frame may be even division, or may be uneven division. Efficiency of fault detection is improved by performing detection on different areas.

In a possible implementation manner of the first aspect, the performing fault detection according to the payload check information includes: obtaining at least one payload area in the first OTN frame, and obtaining payload check information in each payload area, where each payload area corresponds to respective payload check information; and checking the corresponding payload area according to the respective payload check information. When obtaining the at least one payload area in the first OTN frame, the OTN device may perform fault detection, thereby improving efficiency of fault detection.

In a possible implementation manner of the first aspect, when an unchecked payload area still exists in the first OTN frame while the OTN device is performing fault detection according to the payload check information, the method further includes: obtaining the unchecked payload area in the first OTN frame. When performing fault detection on the first OTN frame, the OTN device may obtain the unchecked payload area in the first OTN frame, and can implement fault detection without receiving the complete first OTN frame, thereby improving efficiency of fault detection.

In a possible implementation manner of the first aspect, the payload check information is carried by using an idle fill column of the payload area. The payload check information is carried by using the idle fill column, so that an idle position in the OTN frame is fully used.

In a possible implementation manner of the first aspect, the payload check information is carried by using a reserved payload data column of the payload area, or the payload check information may be carried by using a reserved field of an overhead area. The payload check information may be carried in any manner, provided that the payload check information can correspond to payload data to be checked.

In a possible implementation manner of the first aspect, the method further includes: obtaining, by the OTN device, a second OTN frame, where the second OTN frame is obtained from a protection trail, and the first OTN frame is obtained from a working trail; and separately buffering the first OTN frame and the second OTN frame, where a buffer time is greater than or equal to a preset fault detection time. The buffer time of the first OTN frame and the buffer time the second OTN frame are set, so that in a fault detection period, that is, in a period from occurrence of the fault to reporting of the fault alarm information, service data is in a buffered state, thereby implementing lossless switching of a service.

In a possible implementation manner of the first aspect, the preset fault detection time is a time at which fault detection is performed according to the payload check information. Setting of the fault detection time enables an OTN frame to be in a buffered state before the OTN device completes fault detection, thereby implementing lossless switching of a service.

In a possible implementation manner of the first aspect, when the OTN device separately buffers the first OTN frame and the second OTN frame, the method further includes: obtaining, by the OTN device, a delay value between the first OTN frame and the second OTN frame, and aligning the first OTN frame with the second OTN frame according to the delay value. For example, if the first OTN frame is delayed by a time T compared with the second OTN frame, the buffer time of the second OTN frame is T greater than that of the first OTN frame. Setting of the buffer time may further enable two channels of service data to align with each other, thereby implementing lossless switching of a service.

In a possible implementation manner of the first aspect, the method further includes: when the first OTN frame does not detect a fault, selecting, by the OTN device, to receive the first OTN frame; and when the first OTN frame detects a fault, selecting, by the OTN device, to receive the second OTN frame. An OTN frame is transmitted on the working trail and the protection trail, thereby improving reliability of a service.

According to a second aspect, an embodiment of the present invention provides a fault detection device, including: a first optical module, configured to obtain a first OTN frame, where the first OTN frame includes at least two payload areas, and each of the at least two payload areas includes payload check information and payload data; and a payload check module, configured to perform fault detection according to the payload check information, where the payload check information is used to check payload data of a payload area in which the payload check information is located. An OTN frame is divided into multiple payload areas, and each payload area carries respective payload check information, which is used to check payload data of the respective payload area, so that the first optical module can detect a fault when obtaining partial payload data, for example, at least one payload area, thereby improving efficiency of fault detection.

In a possible implementation manner of the second aspect, the first OTN frame includes <NUM>*n payload areas, where n is a positive integer greater than or equal to <NUM>. The first OTN frame may include <NUM> rows and n columns. For example, n may be <NUM>. A payload area division manner of an OTN frame may be even division, or may be uneven division. Efficiency of fault detection is improved by performing detection on different areas.

In a possible implementation manner of the second aspect, the device further includes an OTU frame-search module, configured to: obtain at least one payload area in the first OTN frame, and obtain payload check information in each payload area, where each payload area corresponds to respective payload check information; and the payload check module is configured to check the corresponding payload area according to the respective payload check information. When the OTU frame-search module obtains the at least one payload area in the first OTN frame, the payload check module may perform fault detection, thereby improving efficiency of fault detection.

In a possible implementation manner of the second aspect, the OTU frame-search module is further configured to: when an unchecked payload area still exists in the first OTN frame while the payload check module is performing fault detection according to the payload check information, obtain the unchecked payload area in the first OTN frame. When the payload check module performs fault detection on the first OTN frame, the OTU frame-search module may obtain the unchecked payload area in the first OTN frame, and can implement fault detection without receiving the complete first OTN frame, thereby improving efficiency of fault detection.

In a possible implementation manner of the second aspect, the payload check information is carried by using an idle fill column of the payload area. The payload check information is carried by using the idle fill column, so that an idle position in the OTN frame is fully used.

In a possible implementation manner of the second aspect, the payload check information is carried by using a reserved payload data column of the payload area, or the payload check information may be carried by using a reserved field of an overhead area. The payload check information may be carried in any manner, provided that the payload check information can correspond to payload data to be checked.

In a possible implementation manner of the second aspect, the device further includes a second optical module and a buffering alignment module, where the second optical module is configured to obtain a second OTN frame, where the second OTN frame is obtained from a protection trail, and the first OTN frame is obtained from a working trail; and the buffering alignment module is configured to separately buffer the first OTN frame and the second OTN frame, where a buffer time is greater than or equal to a preset fault detection time. The buffer time of the first OTN frame and the buffer time the second OTN frame are set, so that in a fault detection period, that is, in a period from occurrence of the fault to reporting of the fault alarm information, service data is in a buffered state, thereby implementing lossless switching of a service.

In a possible implementation manner of the second aspect, the preset fault detection time is a time at which the payload check module performs fault detection according to the payload check information. Setting of the fault detection time enables an OTN frame to be in a buffered state before the OTN device completes fault detection, thereby implementing lossless switching of a service.

In a possible implementation manner of the second aspect, the buffering alignment module is further configured to: obtain a delay value between the first OTN frame and the second OTN frame, and align the first OTN frame with the second OTN frame according to the delay value. For example, if the first OTN frame is delayed by a time T compared with the second OTN frame, the buffer time of the second OTN frame is T greater than that of the first OTN frame. Setting of the buffer time may enable two channels of service data to align with each other, thereby implementing lossless switching of a service.

In a possible implementation manner of the second aspect, the device further includes: a selector, configured to: when the first OTN frame does not detect a fault, select to receive the first OTN frame; and further configured to: when the first OTN frame detects a fault, select to receive the second OTN frame. An OTN frame is transmitted on the working trail and the protection trail, thereby improving reliability of a service.

According to a third aspect, an embodiment of the present invention provides an optical transport network OTN device, including an optical module and an OTN processing chip, where when the OTN device is running, the OTN processing chip executes preset program code, so that the OTN device performs the method according to any one of the first aspect or the possible implementation manners of the first aspect.

According to a fourth aspect, an embodiment of the present invention provides an optical transport network OTN device, including: a control and communications module, an optical module, and an OTN processing chip, where the control and communications module is connected to the optical module and the OTN processing chip, and is configured to configure the optical module and the OTN processing chip; and when the OTN device is running, the OTN processing chip executes the preset program code under the configuration of the control and communications module, so that the OTN device performs the method according to any one of the first aspect or the possible implementation manners of the first aspect.

According to the technical solutions provided in the embodiments of the present invention, an OTN frame is divided into at least two payload areas, payload check information is configured in each payload area and is used to check the payload area, so that fault detection can be performed quickly. In addition, service data may be buffered, so that the service data transmitted since occurrence of a fault to completion of protection switching is lossless.

To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the background and the embodiments.

To make the objectives, technical solutions, and advantages of the present invention clearer and more comprehensible, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments.

The embodiments of the present invention may be applied in a transport network, for example, an OTN. The OTN network in the embodiments of the present invention may be configured to carry a CPRI service, but the embodiments of the present invention are not limited to an application scenario of carrying the CPRI service.

<FIG> are schematic diagrams of hardware structures of OTN devices according to embodiments of the present invention. As shown in <FIG>, the OTN device may provide multiple types of customer service interfaces, for example, an Asynchronous Transfer Mode (ATM) interface, an Ethernet interface, a CPRI interface, and a Synchronous Digital Hierarchy (SDH) interface. For example, a CPRI interface may be configured to connect to devices such as a BBU and a RRU. The OTN device may be an electrical cross-connect device, and completes an ODUk electrical cross-connection function by using an Optical Channel Data Unit (ODU) cross-connect board, where k may be <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, flex, or Cn, representing different rates. Certainly, a customer service may directly enter a circuit board from a tributary board without an ODU cross-connection. Optical multiplexing section processing board multiplexes multiple wavelength signals on the circuit board. The optical transmission section processing board sends the multiplexed multiple wavelength signals to a main optical channel.

The OTN device may be an optical cross-connect device, and completes Optical Channel (OCh) optical cross-connection by using an OCh cross-connect board. As shown in <FIG>, the OTN may be a photoelectric hybrid cross-connect device, that is, ODU electrical cross-connection is completed by using an ODU cross-connect board. In addition, the OCh optical cross-connection is completed by using an OCh cross-connect board. For example, for an ODU service, electrical cross-connection is performed by using the ODU cross-connect board, and for a wavelength-level service, optical cross-connection is performed by using the OCh cross-connect board. Optionally, the OTN device may include neither the ODU cross-connect board nor the OCh cross-connect board, that is, the OTN device is a terminal multiplexing device.

In the embodiments of the present invention, an OTN frame is divided into at least two payload areas, and each payload area carries respective payload check information, where the payload check information of each payload area is used to check payload data of the payload area, so as to detect whether a network is faulty. The technical solutions of the embodiments of the present invention may be applied in the OTN device in any one of the foregoing forms. This may reduce a fault detection time, and improve protection switching efficiency.

<FIG> is a frame schematic structural diagram of an OTN frame according to an embodiment of the present invention. As shown in <FIG>, the OTN frame may be a structure of <NUM> rows and <NUM> columns, including an overhead (OH) area, an Optical Channel Payload Unit (OPU) payload, and Forward Error Correction (FEC). The overhead area mainly includes: Optical Channel Transport Unit (OTU) overheads, ODU overheads, OPU overheads, and header alignment overheads. Optionally, the OTN frame may not include the FEC. The header alignment overheads are used to indicate a start location of the OTN frame, and include a Frame Alignment Signal (FAS) and a MultiFrame Alignment Signal (MFAS).

<FIG>, <FIG>, <FIG>, <FIG>, <FIG>, <FIG> are schematic diagrams of payload area division of an OTN frame according to embodiments of the present invention. An overhead (OH) area in the OTN frame in <FIG> may include: OTU overheads, ODU overheads, OPU overheads, and the like. An OPU payload area in the OTN frame may be divided into <NUM>*n (n is a quantity of columns into which the OTN frame is divided) to-be-checked areas, for example, payload data <NUM>, payload data <NUM>,. , and payload data 4n in <FIG>. In addition, corresponding payload check information is added after each to-be-checked area, for example, payload check information <NUM>, payload check information <NUM>,. , and payload check information 4n in <FIG>. The payload check information <NUM> is used to check the payload data <NUM>, the payload check information <NUM> is used to check the payload data <NUM>,. , and the payload check information 4n is used to check the payload data 4n, where n is a positive integer greater than or equal to <NUM>. For example, when n is equal to <NUM>, an OPU payload area is divided into <NUM> to-be-checked areas. A difference between <FIG> and <FIG> is that the OTN frame in <FIG> does not include FEC. The OTN frame in <FIG> is the OTN frame in <FIG> when n is <NUM>, that is, the OTN frame is divided into one column. A difference between <FIG> is that the OTN frame in <FIG> does not include FEC. A reserved bit in overheads (OH) of the OTN frame may further carry payload data. In this case, to-be-checked areas in the first column may further include overhead (OH) areas, for example, as shown in <FIG> and <FIG>. The OPU payload area in the OTN frame may be further divided into 2n (n is a quantity of columns into which the OTN frame is divided) to-be-checked areas. For example, as shown in <FIG>, when n is <NUM>, that is, the OTN frame is divided into one column, the to-be-checked area includes payload data <NUM> and payload data <NUM>, and corresponding payload check information is payload check information <NUM> and payload check information <NUM>. Optionally, in this embodiment of the present invention, the OPU payload area of the OTN frame may be further divided into another quantity of to-be-checked areas, for example, n, 3n, or 5n (n is the quantity of columns into which the OTN frame is divided). A principle is similar to that of the foregoing embodiment, and details are not described herein again. The payload check information may occupy one byte, may be Cyclic Redundancy Code <NUM>, (CRC8), Bit Interleaved Parity <NUM> code (BIP8), or the like, and is used to perform error detection on OPU payload data. The payload check information may be carried by using an idle fill column of an OPU, may be carried by using a reserved OPU payload data column, or may be carried by using a reserved field of an overhead area. The OTN frame may be evenly or unevenly divided into to-be-checked areas. Optionally, the payload check information may be set in a corresponding to-be-checked area, that is, before the payload data. This embodiment of the present invention is not limited to the foregoing listed payload area division manners of the OTN frame.

<FIG> is a schematic structural diagram of an OTN device according to an embodiment of the present invention. The OTN device shown in <FIG> includes an optical module <NUM> and a payload check module <NUM>.

The optical module <NUM> is configured to obtain a first OTN frame, where the first OTN frame includes at least two payload areas, and each of the at least two payload areas includes payload check information and payload data.

The optical module <NUM> is configured to perform optical-to-electrical conversion on received service data, to convert the service data to an OTN frame. The optical module <NUM> may receive the service data from customer equipment, and convert the service data to the first OTN frame. For example, if the customer equipment is a BBU or an RRU and the service data is a CPRI service, the optical module <NUM> converts the CPRI service to the first OTN frame. The optical module <NUM> may receive the service data from an upstream OTN device, and convert the service data to the first OTN frame. The first OTN frame may include an OTU frame, an ODU frame, an OPU frame, and the like. The first OTN frame may include different signal rates. For example, for OTUk, a value of k may be <NUM>, <NUM>, <NUM>, and <NUM>, and representing rates of <NUM>, <NUM>, <NUM>, and <NUM> respectively.

The first OTN frame includes at least two payload areas, and each payload area includes payload check information and payload data. The payload data is a to-be-checked area, and the payload check information is used to check the payload data. Payload area division may be implemented in any processing procedure of forming the OTN frame. Addition of the payload check information may also be implemented in any processing procedure of forming the OTN frame. For example, division and addition are implemented after a low order ODU is mapped to a high order OPU, or implemented in an overhead processing procedure of the OTN frame. Optionally, the first OTN frame includes <NUM>*n payload areas, where n is a positive integer greater than or equal to <NUM>. For a payload area division manner and a payload check information carrying manner of the first OTN frame, refer to the embodiments shown in <FIG>.

The payload check module <NUM> is configured to perform fault detection according to the payload check information, where the payload check information is used to check payload data of a payload area in which the payload check information is located.

Fault detection of the OTN device is implemented by using the payload check module <NUM>. The first OTN frame includes at least two payload areas, and the payload data included in each payload area is a to-be-checked area. The payload data in the payload area is checked by using the payload check information included in the payload area, so as to implement fault detection. For example, CRC8 check is performed on the first OTN frame. CRC8 processing is performed on the payload data of each payload area by using a byte as a unit, to obtain CRC8 check detection value. In addition, CRC8 payload check information is extracted from the checked payload data. The CRC8 check detection value obtained through CRC8 processing is compared with the extracted CRC8 payload check information to obtain whether the payload data is correct. For example, if the CRC8 check detection value and the extracted CRC8 payload check information are the same or a difference between the CRC8 check detection value and the extracted CRC8 payload check information is less than or equal to a preset threshold, the payload data is correct. When a bit error rate of the payload data reaches a particular value, alarm information may be reported. The bit error rate may be a bit error rate of one payload area, or may be an average value of bit error rates of multiple payload areas. Optionally, the payload data may be checked in a check manner such as BIP8. By means of separate processing on the payload areas of the OTN frame, when partial payload data of the OTN frame is received, check may be performed according to payload check information corresponding to the partial payload data without receiving the entire OTN frame, thereby improving efficiency of fault detection.

The OTN device may protect the service data in an active-standby protection manner, for example, transmit the service data by using a working trail and a protection trail. <FIG> and <FIG> are schematic structural diagrams of an OTN device according to an embodiment of the present invention. As shown in <FIG>, an optical module <NUM>, an OTU frame-search module <NUM>, and a payload check module <NUM> may perform related processing on service data on the working trail. An optical module <NUM>, an OTU frame-search module <NUM>, and a payload check module <NUM> may perform related processing on service data on the protection trail. The OTN device may further include a protection switching control module <NUM> and a selector <NUM>. The optical module <NUM> and the optical module <NUM> may be independent identical circuit modules or may be integrated into one circuit module. Likewise, the OTU frame-search module <NUM> and the OTU frame-search module <NUM> may be independent identical circuit modules or may be integrated into one circuit module, and the payload check module <NUM> and the payload check module <NUM> may be independent identical circuit modules or may be integrated into one circuit module.

Optionally, the OTU frame-search module <NUM> is configured to: obtain at least one payload area in a first OTN frame, and obtain payload check information in each payload area, where each payload area corresponds to respective payload check information; and the payload check module <NUM> is configured to check the corresponding payload area according to the respective payload check information. The OTU frame-search module <NUM> may search for a header alignment overhead pattern of the first OTN frame. Header alignment overheads may include at least one of an FAS or an MFAS. For example, a pattern of the FAS may be F6F62828. After the header alignment overhead pattern is found, that is, a header of the first OTN frame is found, the payload area of the first OTN frame may be located. If the header cannot be found, loss of frame (Loss of Frame, LOF) that represents a frame error may further be reported. When an unchecked payload area still exists in the first OTN frame while the payload check module <NUM> is performing fault detection according to the payload check information, the OTU frame-search module <NUM> may further obtain the unchecked payload area from the first OTN frame. When performing fault detection on the first OTN frame, the OTN device may receive another unchecked payload area in the first OTN frame, and can perform fault detection without receiving the complete first OTN frame, thereby improving efficiency of fault detection.

The optical module <NUM> is configured to obtain the first OTN frame. The optical module <NUM> may be configured to obtain a second OTN frame. The optical module <NUM> may receive the service data on the working trail. The optical module <NUM> may receive the service data on the protection trail. The second OTN frame is obtained from the protection trail. The first OTN frame is obtained from the working trail. The first OTN frame carries the service data on the working trail. The second OTN frame carries the service data on the protection trail. The service data carried in the first OTN frame and the second OTN frame may be the same. When the working trail is in a normal state, the service data may be received from the working trail by using the selector <NUM>. When the working trail is faulty, the service data may be received from the protection trail by using the selector <NUM>.

Optionally, as shown in <FIG>, fault detection of the OTN device may further be implemented by using one of or both the OTU overhead detection module <NUM> and the OTU overhead detection module <NUM>, or may be implemented by using one of or both of the optical module <NUM> and the optical module <NUM>. In this embodiment of the present invention, the OTU overhead detection module <NUM> and the optical module <NUM> are used an example for description. For example, after the OTU frame-search module <NUM> performs the OTN frame header alignment, the OTU overhead detection module <NUM> obtains overhead information of the first OTN frame, and checks the payload data of the entire first OTN frame according to the overhead information of the first OTN frame. For example, the overhead information of the first OTN frame may carry a BIP8 check value. The OTU overhead detection module <NUM> performs BIP8 check on the payload data. When OTU overhead detection is performed, a BIP8 check value of a current frame is set at an overhead location of the second frame following the current frame. Therefore, payload check can be implemented after the second frame following the current frame is obtained and received and after the payload data of the entire OTN frame is read. Therefore, compared with performing fault detection by using the payload check module <NUM>, detection performed by using the OTU overhead detection module <NUM> has relatively low efficiency. The optical module <NUM> may determine whether a fault occurs by detecting whether an optical signal is received, and cannot detect the payload data in the OTN frame. The detection efficiency is also relatively low.

The protection switching control module <NUM> is configured to: receive fault alarm information from any one or more of the optical module <NUM>, the optical module <NUM>, the OTU overhead detection module <NUM>, the OTU overhead detection module <NUM>, the payload check module <NUM>, or the payload check module <NUM>, and send the fault alarm information to the selector <NUM>. The selector <NUM> is configured to perform service data protection switching according to the received fault alarm information. For example, before receiving the fault alarm information, the selector <NUM> receives the service data from the working trail, and after receiving the fault alarm information, the selector <NUM> receives the service data from the protection trail. In this embodiment of the present invention, the optical module <NUM>, the optical module <NUM>, the OTU overhead detection module <NUM>, the OTU overhead detection module <NUM>, the payload check module <NUM>, and the payload check module <NUM> are collectively referred to as fault detection modules. These modules may be independent circuit modules, or may be integrated into one circuit module. Optionally, a protection switching type may be configured for the protection switching control module <NUM> of the OTN device. For example, automatic switching or forced switching may be configured. If automatic switching is configured, protection switching is automatically performed according to the alarm information reported by the fault detection module. If forced switching is configured, forced switching may be performed in any preset case.

Optionally, to implement lossless switching of the service data in a protection switching process, buffering alignment may be further performed on the service data. A buffering alignment module <NUM> and a buffering alignment module <NUM> separately perform buffering alignment on the first OTN frame and a second OTN frame. For example, the buffering alignment module <NUM> may buffer data of the first OTN frame. The buffering alignment module <NUM> may buffer data of the second OTN frame. A buffer time is greater than or equal to a preset fault detection time. The buffering alignment module <NUM> and the buffering alignment module <NUM> are configured to: obtain a delay value between the first OTN frame and the second OTN frame, and perform delay setting for the first OTN frame and the second OTN frame according to the delay value, so that the first OTN frame is aligned with the second OTN frame. The fault detection time may be a fault detection time of any one of the optical module, the OTU overhead detection module, or the payload check module, may be a shortest fault detection time among fault detection times of multiple types of fault detection modules, or may be a time preset by a user.

<FIG> is a logical schematic structural diagram of a buffering alignment module according to an embodiment of the present invention. As shown in <FIG>, delay measurement is separately performed on active service data and standby service data, for example, the first OTN frame and the second OTN frame. Then, delay configuration is performed on the two channels of service data, so that the two channels of service data are aligned after entering a buffer area. A delay measurement manner may be implemented by comparing a delay between header identifiers of the first OTN frame and the second OTN frame. The header identifier may be an FAS and/or an MFAS. By using the header identifier of the first OTN frame (for example, a location at which the FAS and the MFAS are <NUM>) as a start location, counting is started. When the header alignment identifier of the second OTN frame (for example, a location at which the FAS and the MFAS are <NUM>) arrives, counting is stopped, to obtain a count value t_cnt. If the count value t_cnt is less than half of a count period T, a delay value of a delay of the second OTN frame with respect to the first OTN frame is t_cnt. If the count value t_cnt is greater than half of a count period T, a delay value of a delay of the first OTN frame with respect to the second OTN frame is T-t_cnt. Delay configuration may be performed with reference to the delay value and fault detection times of the two channels of service data. For example, if the delay value of the delay of the first OTN frame with respect to the second OTN frame is t2, and the fault detection time is <NUM>, a delay value configured for data buffering of the first OTN frame is t<NUM>, and a delay value configured for data buffering of the second OTN frame is t1+t2. Optionally, a delay value of xt may further be added to both the delay values configured for the two channels of service data, where xt may be a delay value configured by the OTN device, and is a reserved time generated for the fault alarm information. If a time for generating the fault alarm information is constantly <NUM>, xt may be <NUM>. Data alignment may be implemented by means of a write operation and a read operation on the buffered data. An implementation manner of the write operation on the buffered data may be: When input data is a header, the data is written to a preset address, and is written to a buffer area in ascending order of addresses. Headers of the two channels of data may be written to a same address, to ensure that data alignment. The buffer area may be implemented by using a random-access memory (Random-Access Memory, RAM). A size of the buffer area is determined by the configured delay value. A larger delay value indicates a larger storage capacity of the buffer area. An implementation manner of the read operation on the buffered data may be: If there is data in a buffer area corresponding to a channel of service data currently selected by the selector, data is from a same address in buffer areas corresponding to the two channels of service data; or if there is no data in a buffer area corresponding to a channel of service data currently selected by the selector, no data is read. After the two channels of service data are read, the selector may select to receive one of the two channels of service data.

The OTN device shown in <FIG>, and <FIG> may be an independent OTN device, or may be a circuit module in an OTN device, for example, is implemented on one or more of a tributary board, an ODU cross-connect board, a circuit board, an OCh cross-connect board, optical multiplexing section processing board, or optical transmission section processing board that are in the OTN device. In this embodiment of the present invention, the optical module, the OTU frame-search module, the payload check module, the OTU overhead detection module, the buffering alignment module, the protection switching control module, the selector, and the like may be implemented by using independent circuit modules, or may be implemented by using integrated circuit modules.

In the embodiments according to the present invention, an OTN frame is divided into at least two payload areas. Each payload area includes payload check information and payload data. The payload check information in each payload area is used to check the payload data in the payload area, so as to implement fault detection. After at least one payload area of the OTN frame is obtained, payload check may be performed on the OTN frame, thereby improving efficiency of fault detection.

<FIG> is a flowchart of an example of a fault detection method according to an embodiment of the present invention. As shown in <FIG>, the method may be performed by a transport device, for example, an OTN device.

S1201: An optical transport network OTN device obtains a first OTN frame, where the first OTN frame includes at least two payload areas, and each of the at least two payload areas includes payload check information and payload data.

The OTN device may obtain the first OTN frame from customer equipment or the transport device. The customer equipment may be an ATM device, an SDH device, a CPRI device, or the like. The transport device may be an upstream OTN device.

For a data frame format of the first OTN frame, refer to the embodiments shown in <FIG>. The first OTN frame includes <NUM>*n payload areas, where n is a positive integer greater than or equal to <NUM>. The first OTN frame may include <NUM> rows and n columns of payload areas. For example, when n is <NUM>, the first OTN frame includes <NUM> payload areas. Each payload area includes payload check information and payload data. The payload data is a to-be-checked area, and the payload check information is used to check the payload data. Optionally, the payload check information may be carried by using an idle fill column of the payload area, the payload check information may be carried by using a reserved payload data column of the payload area, or according to an example not falling under the scope of the invention the payload check information may be carried by using a reserved field of an overhead area. For a payload area division manner and a payload check information carrying manner of the first OTN frame, refer to the embodiments shown in <FIG>.

S1202: Perform fault detection according to the payload check information, where the payload check information is used to check payload data of a payload area in which the payload check information is located.

Fault detection of the OTN device may be implemented in any one of the following manners: Fault detection of the OTN device is implemented by using payload check information carried in a payload area, or in an example not falling under the scope of the invention may be implemented by using payload check information carried in an overhead area, or may be implemented by using a detection function of an optical module. When fault detection of the OTN device is implemented according to the invention by using payload check information carried in a payload area, a payload area of an OTN frame is divided into multiple to-be-checked areas for separate detection. When fault detection of the OTN device is implemented in an example not falling under the scope of the invention by using payload check information carried in an overhead area, a payload area of an entire OTN frame is detected as a whole, or a payload area of an OTN frame may be divided into multiple to-be-checked areas for separate detection. When detection is performed in an example not falling under the scope of the invention by using an optical module, whether a fault occurs may be determined by determining whether the optical module receives an optical signal. Payload check information may be a CRC8 check value, a BIP8 check value, or the like. Optionally, when performing fault detection according to the payload check information, the OTN device obtains at least one payload area in the first OTN frame, and obtains payload check information in each payload area, where each payload area corresponds to respective payload check information; and checks the corresponding payload area according to the respective payload check information. When an unchecked payload area still exists in the first OTN frame while the OTN device is performing fault detection according to the payload check information, the OTN device may further obtain the unchecked payload area in the first OTN frame. In this embodiment of the present invention, an OTN frame is divided into multiple payload areas. Fault detection may be implemented after partial payload data of the OTN frame, for example, at least one payload area, is obtained, thereby improving detection efficiency.

The OTN device may protect service data in an active-standby protection manner, obtain the first OTN frame form a working trail, and obtain a second OTN frame from a protection trail. Service data carried in the first OTN frame and the second OTN frame may be the same. When the first OTN frame does not detect a fault, the OTN device selects to receive the first OTN frame; and when the first OTN frame detects a fault, the OTN device selects to receive the second OTN frame. To implement lossless switching of the service data in a protection switching process, buffering alignment may be further performed on the service data. The OTN device obtains the first OTN frame and the second OTN frame, where the second OTN frame is obtained from the protection trail, and the first OTN frame is obtained from the working trail; and separately buffers the first OTN frame and the second OTN frame, where a buffer time is greater than or equal to a preset fault detection time. Optionally, the preset fault detection time is a time at which fault detection is performed according to the payload check information. Setting of the buffer time may further ensure alignment between two channels of data. The OTN device obtains a delay value between the first OTN frame and the second OTN frame, and aligns the first OTN frame with the second OTN frame according to the delay value. For example, if the first OTN frame is delayed by t2 compared with the second OTN frame, and the fault detection time is <NUM>, a buffer time configured for the first OTN frame is <NUM>, and a buffer time configured for the second OTN frame is t1+t2.

The method shown in <FIG> may also be performed by the OTN device shown in <FIG>, and <FIG>. For the steps shown in <FIG>, refer to the steps performed by the modules of the OTN device shown in <FIG>, and <FIG>. In this embodiment of the present invention, an OTN frame is divided into at least two payload areas. Each payload area includes payload check information and payload data. The payload check information in each payload area is used to check the payload data in the payload area, so as to implement fault detection. After at least one payload area of the OTN frame is obtained, payload check may be performed on the OTN frame, thereby improving efficiency of fault detection.

<FIG> is a schematic structural diagram of an OTN device according to an embodiment of the present invention. As shown in <FIG>, the OTN device <NUM> includes: a control and communications module <NUM>, an optical module <NUM>, and an OTN processing chip <NUM>.

The control and communications module <NUM> may include a central processing unit (Central Processing Unit, CPU) and a memory. The control and communications module <NUM> is connected to the optical module <NUM> and the OTN processing chip <NUM>, and may perform related configurations on the optical module <NUM> and the OTN processing chip <NUM>, for example, configure a protection switching mode, configure an alarm detection time, and configure a clock rate. The control and communications module <NUM> may perform some common configurations. This may be omitted in some application scenarios.

The optical module <NUM> may be an optical transceiver, and include an optoelectronic device, a function circuit, an optical interface, and the like. The optoelectronic device may include: a semiconductor laser, a light emitting diode, an optical detection diode, and the like. The function circuit may include: a drive circuit, an optical power automatic control circuit, a modulation circuit, and the like. The optical module <NUM> may be configured to: convert a received optical signal to an electrical signal, or convert an electrical signal to an optical signal. For example, the optical module <NUM> is configured to obtain a first OTN frame, where the first OTN frame includes at least two payload areas, and each of the at least two payload areas includes payload check information and payload data. The optical module <NUM> may perform optical-to-electrical conversion on received service data, to convert the service data to an OTN frame. The optical module in <FIG>, and <FIG> may be a same circuit module as the optical module in <FIG>.

The OTN processing chip <NUM> may be implemented by using an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA), or at least one integrated circuit. The OTU frame-search module, the payload check module, the OTU overhead detection module, the buffering alignment module, the protection switching control module, the selector, and the like in <FIG>, and <FIG> may be circuit modules disposed in the OTN processing chip <NUM>. The OTN processing chip <NUM> may perform some specific processing, for example, may write program code to the OTN processing chip <NUM>, to implement the technical solution of this embodiment of the present invention. The OTN processing chip <NUM> is configured to perform fault detection according to the payload check information, where the payload check information is used to check payload data of a payload area in which the payload check information is located. Optionally, the OTN processing chip <NUM> is configured to: obtain at least one payload area in the first OTN frame, and obtain payload check information in each payload area, where each payload area corresponds to respective payload check information; and check the corresponding payload area according to the respective payload check information. When an unchecked payload area still exists in the first OTN frame while the OTN processing chip <NUM> is performing fault detection according to the payload check information, the OTN processing chip <NUM> may further obtain the unchecked payload area in the first OTN frame. Therefore, when fault detection is performed, other unchecked payload areas in the first OTN frame may be obtained. Fault detection can be implemented without receiving the complete OTN frame, thereby improving efficiency of fault detection.

Optionally, the first OTN frame includes <NUM>*n payload areas, where n is a positive integer greater than or equal to <NUM>. The payload check information may be carried by using an idle fill column of the payload area, may be carried by using a reserved payload data column of the payload area, or may be carried by using a reserved field of an overhead area.

The OTN device <NUM> may protect service data in an active-standby protection manner, obtain the first OTN frame form a working trail, and obtain a second OTN frame from a protection trail. Service data carried in the first OTN frame and the second OTN frame may be the same. When the first OTN frame does not detect a fault, the OTN device selects to receive the first OTN frame; and when the first OTN frame detects a fault, the OTN device selects to receive the second OTN frame. To implement lossless switching of service data in a protection switching process, the OTN device obtains the first OTN frame and the second OTN frame by using the optical module <NUM>, where the second OTN frame is obtained from the protection trail, and the first OTN frame is obtained from the working trail; and separately buffers the first OTN frame and the second OTN frame, where a buffer time is greater than or equal to a preset fault detection time. Optionally, the preset fault detection time may be a time at which the OTN processing chip <NUM> performs fault detection according to the payload check information. The OTN device <NUM> obtains a delay value between the first OTN frame and the second OTN frame, and aligns the first OTN frame with the second OTN frame according to the delay value. The OTN processing chip <NUM> may further include a read-only memory (read-only memory, ROM) and a RAM, buffering alignment may be performed on the two channels of service data by using the RAM. In an active-standby protection manner, the OTN device <NUM> may include two or more optical modules <NUM>, or may include two or more OTN processing chips <NUM>. The first OTN frame and the second OTN frame may be processed by using different optical modules and OTN processing chips, or may be processed by using a same optical module and OTN processing chip. A buffer time is configured for the two channels of service data, and the buffer time is greater than or equal to the fault detection time. In addition, alignment of the two channels of service data is implemented by configuring the buffer time. Because in a fault detection period, that is, in a period from occurrence of the fault to reporting of the fault alarm information, the service data is in a buffered state, thereby implementing lossless switching of a service in a protection switching process.

In this embodiment of the present invention, an OTN frame is divided into at least two payload areas. Each payload area includes payload check information and payload data. The payload check information in each payload area is used to check the payload data in the payload area, so as to implement fault detection. After at least one payload area of the OTN frame is obtained, payload check may be performed on the OTN frame, thereby improving efficiency of fault detection.

The OTN device <NUM> shown in <FIG> may implement the steps in the method embodiment shown in <FIG>. It should be noted that, although the OTN device <NUM> shown in <FIG> merely shows the optical module <NUM>, the control and communications module <NUM>, and the OTN processing chip <NUM>, in a specific implementation process, a person skilled in the art should understand that the OTN device <NUM> further includes another component necessary for a normal operation, for example, a power module. In addition, a person skilled in the art should understand that the OTN device <NUM> may further include, according to a specific need, a hardware component, such as a 1588v2 module, for implementing another additional function. In addition, a person skilled in the art should understand that the OTN device <NUM> may include only a necessary component for implementing this embodiment of the present invention, but does not necessarily include all components shown in <FIG>.

Claim 1:
A fault detection method, wherein the method comprises:
obtaining (<NUM>), by an optical transport network, OTN, device, a first OTN frame, wherein the first OTN frame comprises at least two payload areas, and each of the at least two payload areas comprises payload check information and payload data; and
performing (S1202) fault detection according to the payload check information, wherein the payload check information is used to check payload data of a payload area in which the payload check information is located, wherein the payload area of the first OTN frame is divided into multiple to-be-checked areas for a separate fault detection.