Service mapping processing method for optical transport network, apparatus, and system
11483088 · 2022-10-25
Assignee
Inventors
Cpc classification
H04L12/4633
ELECTRICITY
International classification
H04J3/16
ELECTRICITY
Abstract
A service mapping processing method for an optical transport network, an apparatus, and a system are provided, where the method includes: generating mapping adaptation indication information according to a mapping granularity of a to-be-carried LO ODU, where the mapping granularity is M×g bytes, M is a quantity of timeslots occupied by the to-be-carried LO ODU in an OPUCn, g is a size of a mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and g is a positive integer greater than 1; mapping, according to the mapping adaptation indication information, the to-be-carried LO ODU to an ODTUCn.M payload area; encapsulating the mapping adaptation indication information into the ODTUCn.M overhead area; encapsulating the ODTUCn.M into an OTUCn; and sending the OTUCn to a receive end device. The method avoids that OTUCns that use different mapping granularities cannot interwork between a receive end and a transmit end.
Claims
1. A transmitting method, the method comprising: obtaining a to-be-carried low order (LO) optical channel data unit (ODU); determining a quantity of data entities that the to-be-carried LO ODU has in a unit of a mapping granularity, wherein a quantity of bytes in the mapping granularity divided by a quantity of tributary slots that the to-be-carried LO ODU occupies in an Optical Transport Unit Cn (OTUCn) is equal to an integer greater than 1, wherein the OTUCn has a bit rate of one or multiple times of 100 Gbit/s; mapping the to-be-carried LO ODU into a payload area of the OTUCn according to the quantity of data entities; and sending the OTUCn to a receiving end device.
2. The method according to claim 1, wherein the mapping the to-be-carried LO ODU into the payload area of the OTUCn according to the quantity of data entities comprises: mapping the to-be-carried LO ODU into an optical channel data tributary unit Cn.M (ODTUCn.M) according to the quantity of data entities; and mapping the ODTUCn.M into the OTUCn.
3. The method according to claim 2, further comprising: mapping the information representing the mapping granularity that the to-be-carried LO ODU uses into an overhead area of the ODTUCn.M.
4. The method according to claim 2, wherein the determining the quantity of data entities that the to-be-carried LO ODU has in the unit of the mapping granularity comprises: obtaining by calculation, the quantity of data entities that the to-be-carried LO ODU has in the unit of the mapping granularity, according to the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn, the mapping granularity that the to-be-carried LO ODU uses when the to-be-carried LO ODU maps to the ODTUCn.M, and a quantity of bytes of the to-be-carried LO ODU.
5. The method according to claim 4, further comprising: determining clock information of the to-be-carried LO ODU; wherein the clock information of the to-be-carried LO ODU is determined according to the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn, the mapping granularity that the to-be-carried LO ODU uses when the to-be-carried LO ODU maps to the ODTUCn.M, and the quantity of bytes of the to-be-carried LO ODU.
6. The method according to claim 2, further comprising: mapping information of the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn into an overhead area of the ODTUCn.M.
7. The method according to claim 2, further comprising: encapsulating the quantity of data entities that the to-be-carried LO ODU has in an overhead area of the ODTUCn.M.
8. The method according to claim 1, wherein the quantity of bytes in the mapping granularity divided by the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn is equal to 16.
9. The method according to claim 1, further comprising: determining clock information of the to-be-carried LO ODU.
10. The method according to claim 1, further comprising: obtaining a second to-be-carried LO ODU; determining a quantity of data entities that the second to-be-carried LO ODU has in a unit of a second mapping granularity, wherein a quantity of bytes in the second mapping granularity divided by the quantity of tributary slots that the second to-be-carried LO ODU occupies in the OTUCn is equal to an integer greater than 1 and is not equal to the quantity of bytes in the mapping granularity divided by the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn; and mapping the second to-be-carried LO ODU into the payload area of the OTUCn in the another mapping granularity.
11. An apparatus, comprising: a processor configured to: obtain a to-be-carried low order (LO) optical channel data unit (ODU); determine a quantity of data entities that the to-be-carried LO ODU has in a unit of a mapping granularity, wherein a quantity of bytes in the mapping granularity divided by a quantity of tributary slots that the to-be-carried LO ODU occupies in an Optical Transport Unit Cn (OTUCn) is equal to an integer greater than 1, wherein the OTUCn has a bit rate of multiple times of 100 Gbit/s; and map the to-be-carried LO ODU into a payload area of the OTUCn according to the quantity of data entities; and a transmitter configured to send the OTUCn to a receiving end device.
12. The apparatus according to claim 11, wherein the mapping the to-be-carried LO ODU into the payload area of the OTUCn according to the quantity of data entities comprises: mapping the to-be-carried LO ODU into an optical channel data tributary unit Cn.M (ODTUCn.M) according to the quantity of data entities; and mapping the ODTUCn.M into the OTUCn.
13. The apparatus according to claim 12, wherein the processor is further configured to: map the information representing the mapping granularity that the to-be-carried LO ODU uses into an overhead area of the ODTUCn.M.
14. The apparatus according to claim 12, wherein the determining the quantity of data entities that the to-be-carried LO ODU has in the unit of the mapping granularity comprises: obtaining by calculation, the quantity of data entities that the to-be-carried LO ODU has in the unit of the mapping granularity, according to the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn, the mapping granularity that the to-be-carried LO ODU uses when the to-be-carried LO ODU maps to the ODTUCn.M, and a quantity of bytes of the to-be-carried LO ODU.
15. The apparatus according to claim 14, wherein the processor is further configured to: determine clock information of the to-be-carried LO ODU; wherein the clock information of the to-be-carried LO ODU is determined according to the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn, the mapping granularity that the to-be-carried LO ODU uses when the to-be-carried LO ODU maps to the ODTUCn.M, and the quantity of bytes of the ODU.
16. The apparatus according to claim 11, wherein the quantity of bytes in the mapping granularity divided by the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn is equal to 16.
17. The apparatus according to claim 12, wherein the processor is further configured to: map information of the quantity of tributary slots that the to-be-carried LO ODU occupies in the OTUCn into an overhead area of the ODTUCn.M.
18. The apparatus according to claim 12, wherein the processor is further configured to: encapsulate the quantity of data entities that the to-be-carried LO ODU has in an overhead area of the ODTUCn.M.
19. The apparatus according to claim 11, wherein the processor is further configured to: determine clock information of the to-be-carried LO ODU.
20. A system comprising: a receiving device; and a transmitting device configured to: obtain a to-be-carried low order (LO) optical channel data unit (ODU); determine a quantity of data entities that the to-be-carried LO ODU has in a unit of a mapping granularity, wherein a quantity of bytes in the mapping granularity divided by a quantity of tributary slots that the to-be-carried LO ODU occupies in the an Optical Transport Unit Cn (OTUCn) is equal to an integer greater than 1, wherein the OTUCn has a bit rate of multiple times of 100 Gbit/s; and map the to-be-carried LO ODU into a payload area of the the OTUCn according to the quantity of data entities; and send the ODTUCn.M to the receiving device.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1) To describe the technical solutions in the embodiments of the present disclosure or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following description show some embodiments of the present disclosure, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
DESCRIPTION OF EMBODIMENTS
(25) To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the following clearly describes the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some but not all of the embodiments of the present disclosure.
(26)
(27) Step 101: Generate mapping adaptation indication information according to a mapping granularity of a to-be-carried low order optical channel data unit LO ODU, where the mapping granularity is M×g bytes, M is a quantity of timeslots occupied by the to-be-carried LO ODU in an optical channel payload unit OPUCn, g is a size of a mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and g is a positive integer greater than 1.
(28) This embodiment may be executed by a transmit end device in an OTN. At present, an OTUCn that is being discussed to develop by the ITU-T may indicate a rate that exceeds 100 Gbit/s, and a bit rate of the OTUCn is n times a reference rate, where n is variable, and C is a Roman number 100. With emergence of the OTUCn, the LO ODU needs to be mapped to the OTUCn. For the current chip, an optimal mapping granularity corresponding to a processing capability of bandwidth of a single OPUCn timeslot is 4 bytes (C.sub.32) or 8 bytes (C.sub.64). With further improvement of a chip processing capability and an increase of a rate indicated by the OTUCn, the mapping granularity becomes smaller, and a case with 2 bytes (C.sub.16), 1 byte (C.sub.8), or the like may occur. To avoid a case in which a receive end and a transmit end cannot interwork because of different mapping granularities, the mapping adaptation indication information needs to be generated according to the mapping granularity of the to-be-carried LO ODU, and the mapping granularity is variable. The mapping granularity g corresponding to a single OPUCn timeslot occupied by the to-be-carried LO ODU may be selected from C.sub.64, C.sub.32, C.sub.16, C.sub.8, and the like according to an actual situation, and the mapping granularity of the LO ODU is further determined by calculation according to the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn, and the mapping granularity of the LO ODU is M×g bytes. The mapping adaptation indication information is mainly used by the transmit end device to indicate to a receive end device mapping information from the LO ODU to the OTUCn.
(29) Step 102: Map the to-be-carried LO ODU to an ODTUCn.M payload area in an optical channel data tributary unit ODTUCn.M according to the mapping adaptation indication information, where the ODTUCn.M includes an ODTUCn.M overhead area and the ODTUCn.M payload area.
(30) The transmit end device maps the to-be-carried LO ODU to the ODTUCn.M according to the mapping adaptation indication information, where the ODTUCn.M includes some timeslots in the OPUCn and timeslot overheads of the timeslots, and the ODTUCn.M carries LO ODU data. The ODTUCn.M overhead area carries the mapping adaptation indication information, and the ODTUCn.M payload area carries the LO ODU data. A receive end may obtain, by demapping, the LO ODU data from the ODTUCn.M payload area after parsing the mapping adaptation indication information carried in the ODTUCn.M overhead area.
(31) Step 103: Encapsulate the mapping adaptation indication information into the ODTUCn.M overhead area.
(32) Step 104: Encapsulate the ODTUCn.M into an optical channel transport unit OTUCn.
(33) Because the ODTUCn.M includes some timeslots in the OPUCn and the timeslot overheads of the timeslots, the transmit end device separately encapsulates, when encapsulating the ODTUCn.M into the OPUCn, the ODTUCn.M into corresponding timeslots of the OPUCn, and then adds an ODUCn overhead, an OTUCn overhead, and a frame header indication to form an OTUCn frame.
(34) Step 105: Send the OTUCn to a receive end device.
(35) The transmit end device sends an encapsulated OTUCn to the receive end device. In this case, the OTUCn carries the LO ODU data. A mapping process is based on a variable mapping granularity; therefore, after receiving the OTUCn, the receive end device may learn, according to the mapping adaptation indication information, which timeslot of the OPUCn carries the LO ODU, so as to demap the LO ODU. In addition, the mapping granularity is also indicated in the mapping adaptation indication information, and the receive end device may perform demapping in a manner corresponding to the mapping granularity, thereby avoiding a problem that OTUCns that use different mapping granularities cannot interwork between a receive end and a transmit end.
(36) According to this embodiment, a mapping granularity is determined and mapping adaptation indication information is generated according to the mapping granularity, to instruct a receive end device to perform corresponding demapping. This implements mapping granularity-based mapping from an LO ODU to an ODTUCn.M, and resolves a problem in an existing situation with a fixed mapping granularity that OTUCns that carry a same LO ODU but use different mapping granularities cannot interwork between a receive end and a transmit end.
(37) Further, the mapping adaptation indication information includes: a mapping adaptation type, where the mapping adaptation type is used to indicate the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU.
(38) Further, the mapping adaptation indication information further includes: a quantity C.sub.m of data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M and clock information C.sub.nD of the to-be-carried LO ODU, where a size of the data entities is M×g bytes.
(39) Further, a specific implementation method of the foregoing step 101 may be: obtaining by calculation, according to the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn, the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and a quantity of bytes of the to-be-carried LO ODU transmitted in an ODTUCn.M period, the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M; and obtaining by calculation the clock information C.sub.nD of the to-be-carried LO ODU according to the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn, the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and the quantity of the bytes of the to-be-carried LO ODU transmitted in the ODTUCn.M period.
(40) Further, the method further includes: generating another piece of mapping adaptation indication information according to a mapping granularity of another to-be-carried LO ODU, where the mapping granularity of the another LO ODU is M.sub.1×g.sub.1 bytes, M.sub.1 is a quantity of timeslots occupied by the another LO ODU in the OPUCn, g.sub.1 is a size of a mapping granularity corresponding to each timeslot of the timeslots occupied by the another LO ODU, and g.sub.1 is a positive integer greater than 1, where g.sub.1 is not equal to g; mapping the another LO ODU to an ODTUCn.M.sub.1 payload area according to the another piece of mapping adaptation indication information, where the ODTUCn.M.sub.1 includes an ODTUCn.M.sub.1 overhead area and the ODTUCn.M.sub.1 payload area; encapsulating the another piece of mapping adaptation indication information into the ODTUCn.M.sub.1 overhead area; and encapsulating the ODTUCn.M.sub.1 into the OTUCn.
(41) Specifically, the transmit end device maps, according to the quantity M of timeslots occupied by each to-be-carried LO ODU in the OPUCn and the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, by using a preset mapping algorithm, and in the size g of the mapping granularity corresponding to each to-be-carried LO ODU, each to-be-carried LO ODU to ODTUCn.M payload areas of a quantity the same as the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M. In a mapping process, clock information C.sub.nD of each to-be-carried LO ODU is the same. If any two to-be-carried LO ODUs have a same rate, for example, both rates are ODU2, the quantities M of the timeslots occupied by the two to-be-carried LO ODUs are the same. However, the mapping granularity g corresponding to a single timeslot may be different. If any two to-be-carried LO ODUs have different rates, for example, one is ODU2, and the other is ODU3, neither quantities M of the timeslots occupied by the two to-be-carried LO ODUs nor a mapping granularity g corresponding to a single timeslot is the same.
(42) Therefore, the transmit end device in this embodiment may further generate the another piece of mapping adaptation indication information according to the mapping granularity of the another LO ODU, where the mapping adaptation indication information and the mapping granularity of the LO ODU are in a one-to-one correspondence, and the quantity M of the timeslots occupied by the another LO ODU in the OPUCn and the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the another LO ODU also correspond to the LO ODU. Finally, all ODTUCn.Ms formed by mapping the LO ODU are encapsulated into a same OTUCn. In this case, one OTUCn can carry LO ODUs of multiple services, multiple rates, and multiple mapping granularities.
(43) Further, the mapping granularity is configured by a network management system NMS or a transport software-defined network T-SDN controller.
(44)
(45) A frame structure of the OTUCn in the present disclosure may have two cases: one is that the frame structure of the OTUCn includes a forward error correction (FEC) check area.
(46) Further, the OPUCn payload area in the present disclosure includes a payload area of timeslots of a first quantity, and the OPUCn overhead area is used to carry overhead information, where the overhead information includes mapping adaptation indication information, a payload structure identifier PSI, and an OPU multi-frame identifier OMFI, and the overhead information corresponds to the timeslots of the first quantity. The OPUCn overhead area includes an overhead area of timeslots of a first quantity. Overhead information carried in each overhead area corresponds to one timeslot, mapping adaptation indication information in each piece of overhead information occupies 6 bytes, a quantity of data entities that are of a to-be-carried LO ODU and are carried in an ODTUCn.M and clock information of the to-be-carried LO ODU respectively occupy 3 bytes of the 6 bytes, and a mapping adaptation type is carried in the 3 bytes occupied by the clock information of the to-be-carried LO ODU.
(47) The following describes the technical solution of the method embodiment shown in
(48)
(49) In this example, 10 OPUCns form a 10-OPUCn multiframe, where the multiframe includes 40 rows×3824n columns, the OPUCn payload area is the (16n+1).sup.th to the 3816n.sup.th columns, and is divided into 10n 10 Gbit/s timeslots according to column spacing, the timeslots are numbered 1 to 10n, and each timeslot includes 40 rows×380 columns; the OPUCn overhead area is the (14n+1).sup.th to the 16n.sup.th columns, there are 2n columns in total, and every four rows is one frame; therefore, one 10-OPUCn multiframe includes 10 frames of OPUCn overhead areas, where (the 1.sup.st to the 3.sup.rd rows)×(the (14n+1).sup.th to the 15n.sup.th columns) of each frame and (the 1.sup.st to the 3.sup.rd rows)×(the (15n+1).sup.th to the 16n.sup.th columns) of each frame are timeslot (Tributary Slot, or “TS”) overheads (OH), there are 20n TSOHs in total, two TSOHs correspond to one timeslot, and the TSOH in the present disclosure carries the mapping adaptation indication information; the 4.sup.th row×(the (14n+1).sup.th to the 15n.sup.th columns) is the PSI, where the PSI is used to indicate a situation in which timeslots of the OPUCn are occupied by an ODTUCn.ts, the 4.sup.th row×(the (15n+1).sup.th to the 16n.sup.th columns) of each frame is the OMFI, there are 10n PSIs and 10n OMFIs in total, and the PSIs and the timeslots are in a one-to-one correspondence. Overheads corresponding to each timeslot occur once every ten OPUCn frames (that is, the timeslot overheads corresponding to each timeslot in a 10-OPUCn frame occur only once), and the OPUCn is identified by using 5 to 8 bits (a value of the OMFI is 0 to 9, and is successively cycled) in the OMFI. A value of the OMFI in a transmit end device successively increases in unit of an OPUCn, and is counted from 0 to 9 and then to 0 again, which is successively cycled. OPUCns of 0 to 9 form one 10-OPUCn multiframe, and a receive end device may identify the OPUCn according to the OMFI.
(50) If 10 (j−1)+i is used to indicate a timeslot number (j is 1 to n, and i is 1 to 10), a TSOH corresponding to the timeslot number is located in the 1.sup.st to the 3.sup.rd rows of the (14n+j).sup.th column and the (15n+j).sup.th column of the i.sup.th OPUCn. The TSOHs corresponding to one timeslot have 6 bytes in total, where the 6 bytes are respectively marked as J1, J2, J3, J4, J5, and J6. For example, for a TS11 (j=2, i=1), an overhead of the TS11 is located in the 1.sup.st to the 3.sup.rd rows of the (14n+2).sup.th column and the (15n+2).sup.th column of the 1.sup.st OPUCn. The (3816n+1).sup.th to the 3824n.sup.th column is a filling area.
(51)
(52)
(53)
(54)
(55) Step 201: Generate mapping adaptation indication information according to a mapping granularity of a to-be-carried LO ODU and a preset mapping adaptation indication information format, where the mapping adaptation indication information includes a mapping adaptation type, a quantity C.sub.m of data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M, and clock information C.sub.nD of the to-be-carried LO ODU.
(56) Specifically, the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M is obtained by calculation according to a quantity M of timeslots occupied by the to-be-carried LO ODU in an OPUCn, a size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and a quantity of bytes of the to-be-carried LO ODU transmitted in an ODTUCn.M period; and the clock information C.sub.nD of the to-be-carried LO ODU is obtained by calculation according to the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn, the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and the quantity of the bytes of the to-be-carried LO ODU transmitted in the ODTUCn.M period.
(57) The mapping granularity (M×g bytes) is configured by a network management system (NMS) or transport software-defined network (T-SDN), and a transmit end device determines the mapping adaptation type in the mapping adaptation indication information according to the g of the mapping granularity. The mapping adaptation type in the mapping adaptation indication information, the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M, and the clock information C.sub.nD of the to-be-carried LO ODU are combined according to a mapping adaptation indication information format, the mapping adaptation indication information is carried in a TSOH, and for the mapping adaptation indication information format, reference may be made to
(58) TABLE-US-00001 TABLE 1 Clock Mapping Granularity g Mapping Information Corresponding to a Granularity of Granularity of Adaptive_Type Single OPUCn Timeslot the LO ODU the LO ODU 0x1 1 byte (C.sub.8) M C.sub.8D 0x2 2 bytes (C.sub.16) M × 2 C.sub.8D 0x3 4 bytes (C.sub.32) M × 4 C.sub.8D 0x4 8 bytes (C.sub.64) M × 8 C.sub.8D
(59) TABLE-US-00002 TABLE 2 Mapping of ODU2 Mapping of ODU3 Mapping of ODU4 Mapping of ODUflex to ODTUCn.1 to ODTUCn.4 to ODTUCn.10 to ODTUCn.100 C.sub.m C.sub.nD C.sub.m C.sub.nD C.sub.m C.sub.nD C.sub.m C.sub.nD C.sub.8 mapping C.sub.8 NA C.sub.32 C.sub.8D C.sub.80 C.sub.8D C.sub.800 C.sub.8D granularity 14521.51899 NA 14583.05085 0 . . . 3 15161.23348 0 . . . 9 15161.23348 0 . . . 99 C.sub.32 mapping C.sub.32 C.sub.8D C.sub.128 C.sub.8D C.sub.320 C.sub.8D C.sub.3200 C.sub.8D granularity 3630.379747 0 . . . 3 3645.762712 0 . . . 15 3790.30837 0 . . . 39 3790.30837 0 . . . 399 C.sub.64 mapping C.sub.64 C.sub.8D C.sub.256 C.sub.8D C.sub.640 C.sub.8D C.sub.6400 C.sub.8D granularity 1815.189873 0 . . . 7 1822.881356 0 . . . 31 1895.154185 0 . . . 79 1895.154185 0 . . . 799
(60) Step 202: Place the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M and the clock information C.sub.nD of the to-be-carried LO ODU in bits corresponding to the mapping adaptation indication information according to the preset mapping adaptation indication information format, and encapsulate the mapping adaptation indication information into an ODTUCn.M overhead area.
(61) Steps 201 and 202 are a further implementation manner of the foregoing step 101. The transmit end device calculates the quantity C.sub.m (C.sub.m, m=M×g) of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M. For the quantity of the bytes of the to-be-carried LO ODU transmitted in the ODTUCn.M period, a specific quantity of bytes of the LO ODU may be obtained by periodically counting a quantity of increment bytes of an LO ODU that is input into a cache and, at the same time, by determining a cache empty-full situation. The quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M may be calculated by using a formula
(62)
and the clock information C.sub.nD of the to-be-carried LO ODU is calculated by using a formula
(63)
The transmit end device places the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M and the clock information C.sub.nD of the to-be-carried LO ODU in the bits corresponding to the mapping adaptation indication information according to the foregoing mapping adaptation indication information format, and encapsulates the mapping adaptation indication information into the ODTUCn.M overhead area, that is, places the mapping adaptation indication information in a TSOH of a corresponding timeslot.
(64) Step 203: Map, according to a quantity M of timeslots occupied by each to-be-carried LO ODU in an OPUCn and a size g of a mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, by using a preset mapping algorithm, and in the size g of the mapping granularity corresponding to each to-be-carried LO ODU, each to-be-carried LO ODU to ODTUCn.M payload areas of a quantity the same as the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M.
(65) Step 203 is a further implementation manner of the foregoing step 102. The transmit end device maps, according to the preset mapping algorithm, data of C.sub.m to-be-carried LO ODUs whose size of a mapping granularity is g bytes to the ODTUCn.M payload areas, where the preset mapping algorithm may be a Σ-Δ algorithm.
(66) Step 204: Multiplex an ODTUCn.M payload to an OPUCn payload area, and multiplex an ODTUCn.M overhead to an OPUCn overhead area.
(67) Step 205: Add an ODUCn overhead area, an OTUCn overhead area, and a frame header indication based on the OPUCn to form an OTUCn obtained by encapsulation.
(68) Steps 204 and 205 are a further implementation manner of the foregoing step 103. The transmit end device multiplexes the ODTUCn.M payload to the OPUCn payload area, and multiplexes the ODTUCn.M overhead to the OPUCn overhead area, that is, separately encapsulates the ODTUCn.M payload area and the ODTUCn.M overhead area into timeslots that are determined in the OPUCn payload area and the OPUCn overhead area of the OTUCn and carry the ODTUCn.M. The ODUCn overhead area, the OTUCn overhead area, and a frame header indication area are added based on the OPUCn to form a final OTUCn frame.
(69) Step 206: Send the OTUCn to a receive end device.
(70) According to the foregoing method embodiment, timeslots for carrying an LO ODU and mapping adaptation indication information filled in a corresponding timeslot overhead area are respectively determined in an OPUCn payload area and an OPUCn overhead area.
(71)
(72)
(73)
(74)
(75)
(76) According to this embodiment, a mapping granularity is determined and mapping adaptation indication information is generated according to the mapping granularity, to instruct a receive end device to perform corresponding demapping. This implements mapping granularity-based mapping from an LO ODU to an ODTUCn.M, and resolves a problem in an existing situation with a fixed mapping granularity that OTUCns that carry a same LO ODU but use different mapping granularities cannot interwork between a receive end and a transmit end.
(77) It should be noted that, the examples shown in
(78)
(79) Step 301: Receive an optical channel transport unit OTUCn sent by a transmit end device.
(80) This embodiment may be executed by a receive end device in an OTN. The receive end device receives the OTUCn sent by the transmit end device.
(81) Step 302: Obtain an optical channel data tributary unit ODTUCn.M from the OTUCn, where the ODTUCn.M includes an ODTUCn.M overhead area and an ODTUCn.M payload area.
(82) Step 303: Determine a mapping granularity according to mapping adaptation indication information and a payload structure identifier PSI that are carried in the ODTUCn.M overhead area, where the mapping granularity is M×g bytes, M is a quantity of timeslots occupied by a to-be-carried LO ODU in an optical channel payload unit OPUCn, g is a size of a mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and g is a positive integer greater than 1.
(83) The receive end device extracts the ODTUCn.M from the OTUCn by performing steps opposite to those in the method embodiments shown in
(84) Step 304: Perform, according to the mapping adaptation indication information, demapping on the ODTUCn.M to obtain a low order optical channel data unit LO ODU.
(85) The receive end device demaps the LO ODU from the ODTUCn.M according to the mapping adaptation indication information and the mapping granularity.
(86) According to this embodiment, mapping adaptation indication information and a mapping granularity are obtained from an overhead area, and an ODTUCn.M is demapped from a received OTUCn to obtain an LO ODU. This implements demapping from the ODTUCn.M to the LO ODU based on the mapping granularity, and resolves a problem in an existing situation with a fixed mapping granularity that OTUCns that carry a same LO ODU but use different mapping granularities cannot interwork between a receive end and a transmit end.
(87) A process in which the receive end device obtains the LO ODU from the OTUCn is exactly opposite to a process of mapping from the LO ODU to the OTUCn of the transmit end device. Therefore, in a demapping process, the mapping adaptation indication information and the mapping granularity are first obtained, and the LO ODU may be obtained from a corresponding timeslot based on the two pieces of information. A related frame structure involved in the demapping process is consistent with the foregoing method embodiment, which is not described herein.
(88)
(89) Step 401: Receive an optical channel transport unit OTUCn sent by a transmit end device.
(90) Step 402: Obtain an optical channel data tributary unit ODTUCn.M from the OTUCn.
(91) Step 403: Obtain, according to a mapping adaptation type in mapping adaptation indication information carried in an ODTUCn.M overhead area, a size g of a mapping granularity corresponding to each timeslot of timeslots occupied by an LO ODU.
(92) Step 404: Obtain, according to the PSI carried in the ODTUCn.M overhead area, a quantity M of timeslots occupied by the to-be-carried LO ODU in an OPUCn.
(93) Steps 402 to 404 are a further implementation manner of the foregoing step 303, where an implementation process of step 404 may be: obtaining an OMFI and the PSI from the ODTUCn.M overhead area; identifying the OPUCn according to the OMFI; learning, according to the PSI, a situation in which timeslots of the OPUCn are occupied; and determining, according to the PSI, the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn.
(94) Optionally, a receive end device determines whether the mapping granularity is consistent with a preconfigured mapping granularity. That is, if the receive end device determines that a size Cg of a mapping granularity is consistent with an external configuration, the external configuration may be configured by using an NMS or a T-SDN controller; or if the receive end device determines that a size Cg of a mapping granularity is inconsistent with an external configuration, a mapping granularity inconsistency alarm is reported.
(95) Step 405: Parse the mapping adaptation indication information to obtain a quantity C.sub.m of data entities that are of the to-be-demapped LO ODU in the ODTUCn.M and are carried in the ODTUCn.M and clock information C.sub.nD of the LO ODU.
(96) Step 406: Obtain, by demapping, the LO ODU from the ODTUCn.M according to a mapping granularity of the LO ODU, the quantity C.sub.m of the data entities that are of the LO ODU and are carried in the ODTUCn.M, and a preset mapping algorithm.
(97) Step 407: Obtain by calculation, according to the mapping granularity of the LO ODU, the quantity C.sub.m of the data entities that are of the LO ODU and are carried in the ODTUCn.M, and the clock information C.sub.nD of the LO ODU, a quantity of bytes of the LO ODU transmitted in an ODTUCn.M period.
(98) Step 408: Restore the clock information of the LO ODU according to the quantity of the bytes of the LO ODU transmitted in the ODTUCn.M period.
(99) Steps 405 to 408 are a further implementation manner of the foregoing step 304. The receive end device parses the mapping adaptation indication information to obtain the quantity C.sub.m of the data entities that are of the to-be-demapped LO ODU in the ODTUCn.M and are carried in the ODTUCn.M and the clock information C.sub.nD of the LO ODU, and obtains, by demapping, the LO ODU from the ODTUCn.M by using a Σ-Δ algorithm; and then obtains, according to the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and a quantity C.sub.m value of the data entities that are of the to-be-demapped LO ODU and are carried in the ODTUCn.M and the clock information C.sub.nD of the LO ODU, the quantity Quantity of bytes of the LO ODU=C.sub.nD+C.sub.m×M×g of the bytes of the LO ODU transmitted in the ODTUCn.M period; and restores the clock information of the LO ODU according to the quantity of the bytes of the LO ODU.
(100) According to this embodiment, mapping adaptation indication information and a mapping granularity are obtained from an overhead area, and an ODTUCn.M is demapped from a received OTUCn to obtain an LO ODU. This implements demapping from the ODTUCn.M to the LO ODU based on the mapping granularity, and resolves a problem in an existing situation with a fixed mapping granularity that OTUCns that carry a same LO ODU but use different mapping granularities cannot interwork between a receive end and a transmit end.
(101)
(102) The apparatus in this embodiment may be configured to implement the technical solution in the method embodiment shown in
(103) Further, the mapping adaptation indication information includes: a mapping adaptation type, where the mapping adaptation type is used to indicate the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU.
(104) Further, the mapping adaptation indication information further includes: a quantity C.sub.m of data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M and clock information C.sub.nD of the to-be-carried LO ODU, where a size of the data entities is M×g bytes.
(105) Further, the indication information generation module 11 is specifically configured to obtain by calculation, according to the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn, the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and a quantity of bytes of the to-be-carried LO ODU transmitted in an ODTUCn.M period, the quantity C.sub.m of the data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M; and obtain by calculation the clock information C.sub.nD of the to-be-carried LO ODU according to the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn, the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU, and the quantity of the bytes of the to-be-carried LO ODU transmitted in the ODTUCn.M period.
(106) Further, the indication information generation module 11 is further configured to generate another piece of mapping adaptation indication information according to a mapping granularity of another to-be-carried LO ODU, where the mapping granularity of the another LO ODU is M.sub.1×g.sub.1 bytes, M.sub.1 is a quantity of timeslots occupied by the another LO ODU in the OPUCn, g.sub.1 is a size of a mapping granularity corresponding to each timeslot of the timeslots occupied by the another LO ODU, and g.sub.1 is a positive integer greater than 1, where g.sub.1 is not equal to g; the mapping module 12 is further configured to map the another LO ODU to an ODTUCn.M.sub.1 payload area according to the another piece of mapping adaptation indication information, where the ODTUCn.M.sub.1 includes an ODTUCn.M.sub.1 overhead area and the ODTUCn.M.sub.1 payload area; and the encapsulation module 13 is further configured to encapsulate the another piece of mapping adaptation indication information into the ODTUCn.M.sub.1 overhead area; and encapsulate the ODTUCn.M.sub.1 into the OTUCn.
(107) Further, the mapping granularity is configured by a network management system NMS or a transport software-defined network T-SDN controller.
(108) The indication information generation module 11, the mapping module 12, and the encapsulation module 13 in this embodiment may be implemented by using a central processing unit (CPU), the sending module 14 may be implemented by using a transmitter, and a memory stores a code program and related data. The CPU, the transmitter, and the memory may be connected to each other by using a bus, where the CPU is configured to read the code program from the memory, and perform the steps of the method embodiment shown in
(109)
(110) The apparatus in this embodiment may be configured to implement the technical solution in the method embodiment shown in
(111) Further, the mapping adaptation indication information includes: a mapping adaptation type, where the mapping adaptation type is used to indicate the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU.
(112) Further, the mapping adaptation indication information further includes: a quantity C.sub.m of data entities that are of the to-be-carried LO ODU and are carried in the ODTUCn.M and clock information C.sub.nD of the to-be-carried LO ODU, where a size of the data entities is M×g bytes.
(113) Further, the determining module 23 is specifically configured to obtain, according to the mapping adaptation indication information, the size g of the mapping granularity corresponding to each timeslot of the timeslots occupied by the LO ODU; and obtain, according to the PSI, the quantity M of the timeslots occupied by the to-be-carried LO ODU in the OPUCn.
(114) Further, the demapping module 24 is specifically configured to parse the mapping adaptation indication information to obtain a quantity C.sub.m of data entities that are of the to-be-demapped LO ODU in the ODTUCn.M and are carried in the ODTUCn.M and the clock information C.sub.nD of the LO ODU; obtain, by demapping, the LO ODU from the ODTUCn.M according to the mapping granularity, the quantity C.sub.m of the data entities that are of the LO ODU and are carried in the ODTUCn.M, and a preset mapping algorithm; obtain by calculation, according to the mapping granularity, the quantity C.sub.m of the data entities that are of the LO ODU and are carried in the ODTUCn.M, and the clock information C.sub.nD of the LO ODU, a quantity of bytes of the LO ODU transmitted in an ODTUCn.M period; and restore the clock information of the LO ODU according to the quantity of the bytes of the LO ODU transmitted in the ODTUCn.M period.
(115) The obtaining module 22, the determining module 23, and the demapping module 24 in this embodiment may be implemented by using a CPU, the receiving module 21 may be implemented by using a receiver, and a memory stores a code program and related data. The CPU, the receiver, and the memory may be connected to each other by using a bus, where the receiver is configured to receive an OTUCn that is sent by the transmit end device and carries an LO ODU corresponding to multiple services, and the CPU is configured to read the code program from the memory, and perform the steps of the method embodiment shown in
(116)
(117) According to the present disclosure, an LO ODU needs to be mapped to an ODTUCn.M according to a mapping granularity. A case that a mapping granularity corresponding to an illustrated single OPUCn timeslot may be C.sub.64, C.sub.32, C.sub.16, or C.sub.8 exists; therefore, for cost reduction, it needs to consider to implement mapping and demapping processing that supports multiple mapping granularities in a same circuit.
(118)
(119)
(120) Persons of ordinary skill in the art may understand that all or some of the steps of the method embodiments may be implemented by a program instructing relevant hardware. The program may be stored in a computer-readable storage medium. When the program runs, the steps of the method embodiments are performed. The foregoing storage medium includes: any medium that can store program code, such as a ROM, a RAM, a magnetic disk, or an optical disc.
(121) Finally, it should be noted that the foregoing embodiments are merely intended for describing the technical solutions of the present disclosure, but not for limiting the present disclosure. Although the present disclosure is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they may still make modifications to the technical solutions described in the foregoing embodiments or make equivalent replacements to some or all technical features thereof, without departing from the scope of the technical solutions of the embodiments of the present disclosure.