Service Processing Method and Apparatus

20230051477 · 2023-02-16

    Inventors

    Cpc classification

    International classification

    Abstract

    This application provides a service processing method and apparatus. The method includes: A transmitting device generates a plurality of transmission frames, where an i.sup.th frame in the plurality of transmission frames carries first information, the first information is used to indicate an amount of data of a service that is carried in each of t transmission frames, the t transmission frames include an (i−t).sup.th frame to an (i−1).sup.th frame in the plurality of transmission frames, i−t>0, and t≥1; and sends the plurality of transmission frames to a receiving device. A transmission frame carries information about an amount of data of the service that is carried in a transmission frame before the transmission frame.

    Claims

    1. A service processing method, comprising: generating, by a transmitting device, a plurality of transmission frames, wherein an i.sup.th frame in the plurality of transmission frames carries first information, the first information is used to indicate an amount of data of a service that is carried in each of t transmission frames, the t transmission frames comprise an (i−t).sup.th frame to an (i−1).sup.th frame in the plurality of transmission frames, i−t>0, and t≥1; and sending the plurality of transmission frames to a receiving device.

    2. The method according to claim 1, wherein the first information comprises t pieces of sub-information, the t pieces of sub-information is in a one-to-one correspondence with the t transmission frames, and each of the t pieces of sub-information is used to indicate an amount of data of the service that is carried in a corresponding transmission frame.

    3. The method according to claim 1, wherein the first information comprises t bits, the t bits are in a one-to-one correspondence with the t transmission frames, and a value of each of the t bits corresponds to an amount of data of the service that is carried in a corresponding transmission frame.

    4. The method according to claim 1, wherein the first information is carried in an overhead part of the transmission frame.

    5. The method according to claim 1, wherein the value of t is determined based on a bit error rate of a transmission channel between the transmitting device and the receiving device.

    6. The method according to claim 1, wherein t is equal to 1, 2, or 3.

    7. The method according to claim 1, wherein the i.sup.th frame carries second information, and the second information is used to indicate a sequence number of the i.sup.th frame in the plurality of transmission frames.

    8. The method according to claim 1, wherein the i.sup.th frame carries third information, and the third information is used to indicate an amount of data of the service that is carried in the i.sup.th frame.

    9. A service processing method, comprising: receiving, by a receiving device, at least one transmission frame, wherein the at least one transmission frame belongs to a plurality of transmission frames sent by a transmitting device, an i.sup.th frame in the plurality of transmission frames carries first information, the first information is used to indicate an amount of data of a service that is carried in each of t transmission frames, the t transmission frames comprise an (i−t).sup.th frame to an (i−1).sup.th frame in the plurality of transmission frames, i−t>0, and t≥1; and determining, by the receiving device based on the first information, clock information of the service carried in the at least one transmission frame.

    10. The method according to claim 9, wherein the i.sup.th frame is a transmission frame received by the receiving device in a first time period, and that the determining, by the receiving device based on the first information, clock information of the service carried in the at least one transmission frame comprises: when a transmission frame is lost in the first time period, determining, by the receiving device based on first information carried in a first transmission frame, a transmission rate of the service sent by the transmitting device in the first time period; and determining, by the receiving device based on the transmission rate, the clock information of the service carried in the transmission frame received in the first time period.

    11. The method according to claim 10, wherein the first information comprises t pieces of sub-information, the t pieces of sub-information is in a one-to-one correspondence with the t transmission frames, and each of the t pieces of sub-information is used to indicate an amount of data of the service that is carried in a corresponding transmission frame.

    12. The method according to claim 11, wherein the first information comprises t bits, the t bits are in a one-to-one correspondence with the t transmission frames, and a value of each of the t bits corresponds to an amount of data of the service that is carried in a corresponding transmission frame.

    13. The method according to claim 11, wherein the first information is carried in an overhead part of the transmission frame.

    14. The method according to claim 13, wherein t is equal to 1, 2, or 3.

    15. The method according to claim 14, wherein the i.sup.th frame carries second information, and the second information is used to indicate a sequence number of the i.sup.th frame in the plurality of transmission frames.

    16. The method according to claim 15, wherein the i.sup.th frame carries third information, and the third information is used to indicate an amount of data of the service that is carried in the i.sup.th frame.

    17. A communication apparatus, comprising: a processor, configured to: generate a plurality of transmission frames, wherein an i.sup.th frame in the plurality of transmission frames carries first information, the first information is used to indicate an amount of data of a service that is carried in each of t transmission frames, the t transmission frames comprise an (i−t).sup.th frame to an (i−1).sup.th frame in the plurality of transmission frames, i−t>0, and t≥1; send the plurality of transmission frames to a transceiver; and a transceiver, configured to: send the plurality of transmission frames received from the processor.

    18. The communication apparatus according to claim 17, wherein the first information comprises t pieces of sub-information, the t pieces of sub-information is in a one-to-one correspondence with the t transmission frames, and each of the t pieces of sub-information is used to indicate an amount of data of the service that is carried in a corresponding transmission frame.

    19. The communication apparatus according to claim 18, the first information comprises t bits, the t bits are in a one-to-one correspondence with the t transmission frames, and a value of each of the t bits corresponds to an amount of data of the service that is carried in a corresponding transmission frame.

    20. The communication apparatus according to claim 19, wherein the first information is carried in an overhead part of the transmission frame.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0098] FIG. 1 is a schematic diagram of an example of a communication system according to this application;

    [0099] FIG. 2 is a schematic diagram of an example of a communication device according to this application;

    [0100] FIG. 3 is a schematic interaction diagram of an example of a service processing method according to this application;

    [0101] FIG. 4 is a schematic diagram of an example of a transmission frame according to this application;

    [0102] FIG. 5 is a schematic diagram of another example of a transmission frame according to this application;

    [0103] FIG. 6 is a schematic diagram of still another example of a transmission frame according to this application;

    [0104] FIG. 7 is a schematic interaction diagram of another example of a service processing method according to this application;

    [0105] FIG. 8 is a schematic diagram of an example of a service processing apparatus according to this application; and

    [0106] FIG. 9 is a schematic diagram of another example of a service processing apparatus according to this application.

    DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

    [0107] Technical solutions in embodiments of this application may be applied to various communication systems or optical networks in which data can be transmitted by using light.

    [0108] The optical networks in this application may include but are not limited to an optical transport network (OTN). The OTN is usually formed by connecting a plurality of devices by using an optical fiber, and linear, ring, mesh, and other different topology types may be formed based on specific requirements. For example, an OTN 100 shown in FIG. 1 includes eight OTN devices 101: devices A to H. 102 represents an optical fiber, configured to connect two devices. 103 represents a client service interface, configured to receive or send client service data. One OTN device may have different functions based on actual requirements. Generally, the OTN devices are classified into an optical layer device, an electrical layer device, and a photoelectric hybrid device. The optical layer device is a device that can process an optical layer signal, for example, an optical amplifier (OA) or an optical add-drop multiplexer (OADM). The OA may also be referred to as an optical line amplifier (OLA), mainly configured to amplify an optical signal, to support transmission over a longer distance on the premise of ensuring specific performance of the optical signal. The OADM is configured to perform spatial transformation on an optical signal, so that the optical signal may be output from different output ports (sometimes referred to as directions). The electrical layer device is a device that can process an electrical layer signal, for example, a device that can process an OTN signal. The photoelectric hybrid device is a device that can process an optical layer signal and an electrical layer signal. It should be noted that, based on a specific integration requirement, one OTN device may integrate a plurality of different functions. The technical solutions provided in this application are applicable to OTN devices with an electrical layer function that have different forms and integration levels.

    [0109] FIG. 2 is a schematic diagram of a hardware structure of a possible communication device (that is, a transmitting device or a receiving device in this application), for example, the device A in FIG. 1. Specifically, an OTN device 200 includes a tributary board 201, a cross-connect board 202, a line board 203, an optical layer processing board (not shown in the figure), and a system control and communication board 204. Based on specific requirements, types and quantities of boards included in one communication device may be different. For example, the communication device serving as a core node does not have the tributary board 201. For another example, the communication device serving as an edge node has a plurality of tributary boards 201, or no cross-connect board 202. For another example, the communication device that supports only an electrical layer function may not have the optical layer processing board.

    [0110] The tributary board 201, the cross-connect board 202, and the line board 203 are configured to process an electrical layer signal of the OTN. The tributary board 201 is configured to receive and send various client services, for example, an SDH service, a packet service, an Ethernet service, and a forward service. Further, the tributary board 201 may be divided into a client-side optical module and a signal processor. The client-side optical module may be an optical transceiver, configured to receive and/or send service data. The signal processor is configured to implement mapping from service data to a data frame and demapping processing. The cross-connect board 202 is configured to exchange data frames, to complete exchange of one or more types of data frames. The line board 203 mainly processes a line-side data frame. Specifically, the line board 203 may be divided into a line-side optical module and a signal processor. The line-side optical module may be a line-side optical transceiver, configured to receive and/or send a data frame. The signal processor is configured to implement multiplexing and demultiplexing or mapping and demapping processing on the line-side data frame. The system control and communication board 204 is configured to implement system control. Specifically, by using a backplane, information may be collected from different boards, or control instructions may be sent to corresponding boards. It should be noted that, unless otherwise specified, there may be one or more specific components (for example, the signal processor). This is not limited in this application. It should be further noted that, types of the boards included in the device and functional designs and quantities of the boards are not limited in this application. It should be noted that, in a specific implementation, two of the boards may alternatively be designed as one board. In addition, the communication device may further include a power supply for backup, a fan for heat dissipation, and the like.

    [0111] FIG. 3 is a schematic interaction diagram of an example of a service processing method according to this application. As shown in FIG. 3, in S310, a device #A (that is, an example of a transmitting device) obtains a to-be-sent service, or a service data stream or a service signal.

    [0112] In this application, an independent clock signal is not required in a transmission process of the service. That is, a receiving device may determine clock information (or a clock signal) of the service based on a bandwidth (or a rate, that is, an amount of data transmitted in a unit time) of the service, and then implement clock recovery of the service.

    [0113] For example rather than limitation, the service may include, but is not limited to, a constant bit rate (CBR) service. The CBR service is encoded at a constant bit rate. For example rather than limitation, the CBR service may include but is not limited to a multimedia streaming service, for example, a video streaming service, a virtual reality (VR) service, or an augmented reality service.

    [0114] In S320, the device #A generates a plurality of transmission frames carrying the service.

    [0115] On one hand, when generating the plurality of transmission frames, the device #A maps a data stream of the service to the plurality of transmission frames, specifically, payload parts or payload areas in the transmission frames. On the other hand, when generating the plurality of transmission frames, the device #A adds, to each transmission frame, information (that is, an example of first information, referred to as information #A below for ease of understanding) about an amount of data of the service that is carried in each of t transmission frames before the transmission frame.

    [0116] The following separately describes the foregoing processes in detail.

    [0117] 1. Mapping Process

    [0118] The device #A may map the data stream of the service to the plurality of transmission frames (or data frames, transmission signals, or service signals).

    [0119] In this application, a period of the transmission frame may be a fixed frame period, and a transmission frame used as the fixed frame period may be, for example, an OTN frame.

    [0120] The OTN frame is used to carry various service data and provide various management and monitoring functions. The OTN frame may be an ODUk, an ODUCn, an ODUflex, an optical transport unit k (OTUk), an OTUCn, a flexible OTN (FlexO) frame, or the like. A difference between an ODU frame and an OTU frame lies in that the OTU frame includes an ODU frame and an OTU overhead. k represents different rate levels. For example, k=1 indicates 2.5 Gbps, and k=4 indicates 100 Gbps. Cn represents a variable rate, specifically, a rate of a positive integer multiple of 100 Gbps. Unless otherwise specified, the ODU frame is any one of the ODUk, the ODUCn, or the ODUflex, and the OTU frame is any one of the OTUk, the OTUCn, or the FlexO. It should be further noted that with development of OTN technologies, an OTN frame of a new type may be defined, and this application is also applicable thereto.

    [0121] Alternatively, in this application, the period of the transmission frame may be a non-fixed frame period, and a transmission frame used as the non-fixed frame period may be, for example, a flexible optical service unit (OSUflex) frame.

    [0122] The following describes in detail mapping processes in the foregoing two manners.

    [0123] Manner 1: The device #A may use, for example, a generic mapping procedure (GMP), an asynchronous mapping procedure (AMP), or a bit-synchronous mapping procedure (BMP), to complete a process of mapping from the service data stream to the transmission frames with a fixed period.

    [0124] For example, if the GMP is used, the device #A uniformly configures a stuff byte in the service data stream (or client signal) by using a sigma/delta algorithm, so that the service data stream matches a rate of the transmission frame (for example, an ODUk frame).

    [0125] Manner 2: A period of an OSUflex frame is a non-fixed frame period, and the period of the OSUflex frame is related to a rate (or bandwidth) of a carried service data stream. Therefore, the device #A may provide a variable rate of the OSUflex frame based on a rate of the service data stream, so that a service data stream of any bandwidth may be mapped into an OSUflex frame.

    [0126] The OSUflex frame is a container generated by using a local clock (that is, a local clock of the device #A), and a rate of the OSUflex frame may be expressed as the following formula:


    N×OSUflex_MBU kbit/s (±20 ppm)

    [0127] OSUflex_MBU represents a minimum bandwidth granularity of the OSUflex frame.

    [0128] For example, a value of OSUflex_MBU may include but is not limited to 2.4 Mbps. In this case, the OSUflex frame may provide a container with a bandwidth of N×2.4 Mbps.

    [0129] It should be noted that, a bandwidth of payload of an OSUflex frame used to carry a service data stream (for example, a CBR signal) needs to be greater than a bandwidth of the service data stream. However, if N is excessively large, a mapping delay is increased, and mapping efficiency is reduced. Therefore, in this application, a value of N is calculated based on the following formula:

    [00001] OSUflex_MBU _payload _nom _bitrate = OSUflex_MBU × Number_of _bit _in _OSUflex _payload Number_of _bit _in _OSUflex N ceiling ( CBR_client _nom _bitrate OSUflex_MBU _payload _nom _bitrate × 1 + CBR_client _bitrate _tolerance 1 - OSUflex_bitrate _tolerance )

    [0130] OSUflex_MBU_payload_nom_bitrate represents a minimum bandwidth granularity of payload of the OSUflex frame.

    [0131] Number_of_bit_in_OSUflex_payload represents a quantity of bits included in payload (a payload field) of the OSUflex frame.

    [0132] Number_of_bit_in_OSUflex represents a total quantity of bits included in the OSUflex frame.

    [0133] The function ceiling( ) means rounding up.

    [0134] CBR_client_nom_bitrate represents a bandwidth of a CBR client signal (that is, an example of the service data stream).

    [0135] CBR_client_bitrate_tolerance represents a frequency offset tolerance of the CBR client signal.

    [0136] OSUfex_bitrate_tolerance represents a frequency offset tolerance of the OSUflex frame.

    [0137] For ease of understanding, a size of an amount of data carried in the OSUflex frame (or a length of data, or a length of payload carrying data) is denoted as PL_LEN. A value of PL_LEN may correspondingly include two possible values:

    [0138] a minimum value, denoted as PL_LEN_MIN, corresponding to a parameter C.sub.n,min in the GMP, and

    [0139] a maximum value, denoted as PL_LEN_MAX, corresponding to a parameter C.sub.n,max in the GMP.

    [0140] Values of PL_LEN_MIN and PL_LEN_MAX are shown in the following formulas:

    [00002] OSUflex_payload _nom _bits = N × OSUflex_MBU _payload _nom _bitrate PL_LEN nom = ( CBR_client _nom _bitrate OSUflex_payload _nom _bitrate × Number_of _bytes _in _OSUflex _payload ) PL_LEN _MIN = floor ( PL_LEN nom × 1 - CBR_client _bitrate _tolerance 1 + OSUflex_bitrate _tolerance ) PL_LEN _MIN = ceiling ( PL_LEN nom × 1 + CBR_client _bitrate _tolerance 1 - OSUflex_bitrate _tolerance )

    [0141] OSUflex_payload_nom_bitrate represents a bandwidth of the data (for example, a CBR signal) carried in the OSUflex frame.

    [0142] Number_of_bytes_in_OSUflex_payload represents a byte length corresponding to the payload length of the OUSflex.

    [0143] The function floor( ) means rounding down.

    [0144] In addition, it should be noted that, in this application, values of PL_LEN_MIN of different services (for example, different CBR services) may be different. Similarly, values of PL_LEN_MAX of different services may be different.

    [0145] It should be understood that the foregoing enumerated manners of mapping the service data stream to the transmission frames are merely examples for description, and this application is not limited thereto. A person skilled in the art may complete the foregoing mapping process in any manner.

    [0146] 2. Process of Adding the Information #A

    [0147] In this application, a process of adding data amount indication information to each of the plurality of transmission frames is similar. For ease of understanding, a processing process for a transmission frame #A in the plurality of transmission frames (an i.sup.th transmission frame in the plurality of transmission frames) is used as an example for detailed description.

    [0148] Information #A carried in the transmission frame #A is used to indicate an amount of data of the service that is carried in each of an (i−t).sup.th transmission frame to an (i−1).sup.th transmission frame (that is, t transmission frames before the transmission frame #A) in the plurality of transmission frames, for example, a quantity of bits included in the service carried in a payload area of the transmission frame.

    [0149] t is a positive integer, i is a positive integer, and i−t>0. It should be noted that when t=1, “an (i−t).sup.th transmission frame to an (i−1).sup.th transmission frame” may be understood as “an (i−1).sup.th transmission frame”.

    [0150] For example rather than limitation, the information #A may indicate, in a bit mapping manner, the amount of data carried in each of the t transmission frames before the transmission frame #A.

    [0151] Specifically, the information #A may include t pieces of sub-information, and each sub-information may include one or more bits.

    [0152] In addition, the t pieces of sub-information are in a one-to-one correspondence with the t transmission frames (from the (i−t).sup.th transmission frame to the (i−1).sup.th transmission frame).

    [0153] Each piece of sub-information (specifically, an arrangement manner or a combination manner of the bits in the sub-information) corresponds to an amount of data carried in a transmission frame corresponding to the sub-information. For example, assuming that sub-information #B in the t pieces of sub-information corresponds to a transmission frame #B in the t transmission frames, a value of a bit in the sub-information #B corresponds to an amount of data carried in the transmission frame #B.

    [0154] For example, in this application, a mapping relationship #1 (that is, an example of a first mapping relationship) may be stored in the transmitting device and the receiving device. The mapping relationship #1 indicates a correspondence between a plurality of bit sequences and a plurality of values. For example rather than limitation, the mapping relationship #1 may be determined by negotiation between the transmitting device and the receiving device. Alternatively, the mapping relationship #1 may be specified by a communication system or a communication protocol. This is not specifically limited in this application, provided that it is ensured that mapping relationships stored in the transmitting device and the receiving device are consistent.

    [0155] Therefore, the device #A may select, based on the mapping relationship #1, a bit sequence corresponding to a value of the amount of data carried in the transmission frame #B, as the sub-information #B.

    [0156] For example, when an OSUflex frame is used as a transmission frame, as described above, a value of PL_LEN of each OSUflex frame may correspondingly include two possible values: PL_LEN_MIN and PL_LEN_MAX.

    [0157] In this case, PL_LEN_MIN and PL_LEN_MAX may correspond to different bits. For example, PL_LEN_MIN corresponds to “1”, and PL_LEN_MAX corresponds to “o”.

    [0158] The following Table 1 shows an example of the mapping relationship #1.

    TABLE-US-00001 TABLE 1 Bit Value of PL_LEN 1 PL_LEN_MIN 0 PL_LEN_MAX

    [0159] It should be noted that values of PL_LEN_MIN of different services (for example, different CBR services) may be different, and values of PL_LEN_MAX of different services may be different.

    [0160] It should be understood that the mapping relationship shown in Table 1 is merely an example for description, and this application is not limited thereto. For example, PL_LEN may alternatively include a plurality of possible values. In this case, the plurality of values of PL_LEN may be indicated by increasing a quantity of bits of the sub-information.

    [0161] It should be understood that the foregoing enumerated indication manner of the information #A is merely an example for description, and this application is not limited thereto. For example, the information #A may alternatively indicate a sum of amounts of data of the service that is carried in the t transmission frames.

    [0162] For another example, a piece of sub-information (for example, the sub-information #B) in the information #A may be used to indicate an amount of data (denoted as a data amount #B) of the service that is carried in a transmission frame (for example, the transmission frame #B) corresponding to the sub-information, and another piece of sub-information in the information #A may be used to indicate a deviation between an amount of data of the service that is carried in a transmission frame corresponding to the sub-information and the data amount #B.

    [0163] For another example, each piece of sub-information in the information #A may be used to indicate a deviation between an amount of data of the service that is carried in a transmission frame corresponding to the sub-information and a preset reference data amount.

    [0164] FIG. 4 shows an example of a transmission frame according to this application. As shown in FIG. 4, in this application, the transmission frame #A includes a payload part (or a payload area) and an overhead part (or an overhead area). The payload part of the transmission frame #A is used to carry data of the service. The overhead part of the transmission frame #A carries the information #A. Therefore, the receiving device may obtain the information #A without parsing the payload part.

    [0165] It should be understood that the foregoing enumerated structure of the transmission frame #A is merely an example for description, and this application is not limited thereto. The information #A may alternatively be carried in the payload part of the transmission frame #A.

    [0166] FIG. 5 shows another example of a transmission frame according to this application. As shown in FIG. 5, the transmission frame #A further carries information #B (that is, an example of second information), to indicate a sequence number of the transmission frame #A in the plurality of transmission frames formed by service mapping. In a specific implementation, the overhead part of the transmission frame #A carries the information #B. Therefore, the receiving device may obtain the information #B without parsing the payload part.

    [0167] It should be understood that the foregoing enumerated structure of the transmission frame #A is merely an example for description, and this application is not limited thereto. The information #B may alternatively be carried in the payload part of the transmission frame #A.

    [0168] FIG. 6 shows another example of a transmission frame according to this application. As shown in FIG. 6, in this application, the transmission frame #A may further carry information #C (that is, an example of third information). The information #C is used to indicate an amount of data of the service that is carried in the transmission frame #A (specifically, the payload part of the transmission frame #A).

    [0169] It should be noted that the information #C and the information #A may alternatively be same information (for example, a bit occupied by the information #C and a bit occupied by the information #A are consecutive), that is, the information may indicate an amount of data of the service that is carried in each transmission frame from the (i−t).sup.th frame to the i.sup.th frame. Alternatively, the information #C and the information #A may be independent of each other. For example, the bit occupied by the information #C and the bit occupied by the information #A are separated by other information or another bit.

    [0170] A structure of each of the plurality of transmission frames generated in S320 may be similar to the structure of the transmission frame #A. To avoid repetition, detailed descriptions thereof are omitted herein. It should be noted that because some of the plurality of transmission frames (for example, the first transmission frame) generated by the transmitting device does not have t transmission frames before, the transmission frame may include a field (or a bit, which is denoted as a first field for ease of understanding) used to carry the information #A, but the first field may not carry the information #A.

    [0171] For example, when the first field does not carry the information #A, a bit carried in the field may be blank or a specified special value (for example, a padding bit). Therefore, when the receiving device determines that the bit carried in the first field of the transmission frame is blank or the padding bit, information carried in the first field does not need to be parsed, and the information carried in the first field is considered meaningless. The padding bit may be pre-agreed by the transmitting and the receiving or specified by a system. This is not specifically limited in this application.

    [0172] In S330, the device #A may send the plurality of generated transmission frames to a device #B (that is, an example of the receiving device).

    [0173] Due to interference or a fault in a transmission process, the device #B may fail to receive all the transmission frames sent by the device #A, that is, a frame is lost. In a conventional technology, in this case, the device #B cannot accurately recover clock information from a received transmission frame, and therefore cannot accurately obtain service data from the transmission frame. In contrast, in this application, the device #B may accurately recover clock information from a received transmission frame based on information #A in the transmission frame, and accurately obtain service data from the transmission frame.

    [0174] Specifically, as shown in FIG. 3, in S340, the device #B may determine a lost transmission frame in the plurality of transmission frames.

    [0175] For example, the device #B may determine a lost sequence number based on information #B carried in each of received transmission frames, and determine a transmission frame with the lost sequence number as a lost transmission frame.

    [0176] For ease of understanding and description, assuming that a transmission frame #C is lost, and the transmission frame #C is a (j−d).sup.th frame in the plurality of transmission frames generated by the device #A in S320, the device #B may perform processing in the following manner.

    [0177] The device #B may obtain a transmission frame with a smallest sequence number (denoted as a transmission frame #D) from received transmission frames whose sequence numbers are greater than a sequence number of the transmission frame #C, that is, the transmission frame #D is a transmission frame that is received by the device #B and that has a smallest sequence number in transmission frames sent by the device #A after the transmission frame #C.

    [0178] Assuming that the transmission frame #D is a j.sup.th frame in the plurality of transmission frames generated by the device #A in S320, it indicates that the (j−d).sup.th frame, a (j−d+1).sup.th frame, . . . , and a (j−1).sup.th frame are lost.

    [0179] If d≤t, the device #B may determine, based on information #A carried in the transmission frame #D, an amount of data of the service that is carried in each of the (j−d).sup.th frame, the (j−d+1).sup.th frame, . . . , and the (j−1).sup.th frame.

    [0180] It is assumed that the device #B determines that Y transmission frames are received and X transmission frames are lost in a time period #A (that is, an example of a first time unit).

    [0181] In addition, assuming that the device #B can determine, based on information #A, an amount of data of the service that is carried in each of the X lost transmission frames, the device #B may determine an amount of data (denoted as a data amount #X) of the service that is lost in the time period #A.

    [0182] In addition, the device #B may determine an amount of data of the service that is carried in each of the Y transmission frames. For example, the device #B may parse a payload part of each of the Y transmission frames, to determine the amount of data of the service that is carried in each of the Y transmission frames. Alternatively, when the transmission frame carries the information #C, the device #B may determine, based on the information #C of each of the Y transmission frames, the amount of data of the service that is carried in each of the Y transmission frames. Then, the device #B may determine an amount of data (dedicated as a data amount #Y) of the service that is received in the time period #A. In this case, the device #B may determine a bandwidth (or a transmission rate) v of the service in the time period #A.

    [0183] That is, v=(x+y)/t.

    [0184] x represents the data amount #X, y represents the data amount #Y, and t represents a duration of the time period #A.

    [0185] Then, the device #B may determine clock information of the service based on a value of v. For example, the device #B may determine clock information z based on a bit width w and the transmission rate v. That is, z=v/w.

    [0186] The bit width w indicates an amount of data that can be processed at a time when the device #B recovers service data from a transmission frame.

    [0187] It should be understood that the foregoing enumerated process of determining the clock information based on the transmission rate is merely an example for description, and this application is not limited thereto. The process may be similar to that in a conventional technology. To avoid repetition, detailed descriptions thereof are omitted herein.

    [0188] It should be noted that, as described above, if d≤t, the device #B may determine, based on the information #A carried in the transmission frame #D, the amount of data of the service that is carried in each of the (j−d).sup.th frame, the (j−d+1).sup.th frame, . . . , and the (j−1).sup.th frame.

    [0189] However, if d>t, the device #B still cannot determine an amount of data of the service that is carried in some (d−t) lost transmission frames. That is, when a quantity of consecutively lost transmission frames is relatively large due to a relatively large bit error rate of a transmission channel between the device #A and the device #B, the device #B cannot determine an amount of data of the service that is carried in each lost transmission frame.

    [0190] In this case, a value of t may be increased to resolve the problem. That is, when the quantity of consecutively lost transmission frames is relatively large due to a relatively large bit error rate of the transmission channel between the device #A and the device #B, the value of t may be increased.

    [0191] When the quantity of consecutively lost transmission frames is relatively small due to a relatively small bit error rate of the transmission channel between the device #A and the device #B, the value of t may be reduced.

    [0192] FIG. 7 is a schematic interaction diagram of another example of a service processing method according to this application. Different from the method shown in FIG. 3, in the method shown in FIG. 7, the device #B may further send feedback information to the device #A. The feedback information may be used to indicate a bit error rate or a packet loss rate of the device #B within a specified time period. Therefore, the device #A may adjust the value of t based on the feedback information.

    [0193] It should be noted that, the feedback manner shown in FIG. 7 is merely an example in which the device #A learns the bit error rate of the transmission channel between the device #A and the device #B, and this application is not limited thereto. For example, the bit error rate of the transmission channel between the device #A and the device #B may alternatively be determined by using a prior model or an online test manner, and information about the bit error rate is input to the device #A.

    [0194] FIG. 8 is a schematic block diagram of a service processing apparatus 400 according to an embodiment of this application. The apparatus 400 includes a transceiver unit 410 and a processing unit 420. The transceiver unit 410 may communicate with outside. The processing unit 420 is configured to perform service processing. The transceiver unit 410 may also be referred to as a communication interface or a communication unit.

    [0195] Optionally, the apparatus 400 may further include a storage unit. The storage unit may be configured to store instructions and/or data. The processing unit 420 may read the instructions and/or data in the storage unit.

    [0196] In an implementation, the apparatus 400 may be configured to perform an action performed by the transmitting device in the foregoing method embodiment. In this case, the apparatus 400 may be a communication device or a component that may be configured in the communication device. The transceiver unit 410 is configured to perform a receiving or sending related operation of the transmitting device in the foregoing method embodiment. The processing unit 420 is configured to perform a processing related operation on the transmitting device side in the foregoing method embodiment.

    [0197] In another implementation, the apparatus 400 may be configured to perform an action performed by the receiving device in the foregoing method embodiment. In this case, the apparatus 400 may be a communication device or a component that may be configured in the communication device. The transceiver unit 410 is configured to perform a receiving or sending related operation of the receiving device in the foregoing method embodiment. The processing unit 420 is configured to perform a processing related operation on the receiving device side in the foregoing method embodiment.

    [0198] As shown in FIG. 9, an embodiment of this application further provides a service processing device 500. The device 500 includes a processor 510. The processor 510 is coupled to a memory 520. The memory 520 is configured to store a computer program or instructions and/or data. The processor 510 is configured to execute the computer program or instructions and/or data stored in the memory 520, so that the method in the foregoing method embodiment is performed.

    [0199] Optionally, the service processing apparatus 500 includes one or more processors 510.

    [0200] Optionally, as shown in FIG. 9, the communication apparatus 500 may further include the memory 520. Specifically, there may be one or more memories 520. Optionally, the memory 520 and the processor 510 may be integrated, or disposed separately.

    [0201] As shown in FIG. 9, the wireless communication apparatus 500 may further include a transceiver 530, and the transceiver 530 is configured to receive and/or send a signal. For example, the processor 510 is configured to control the transceiver 530 to receive and/or send the signal.

    [0202] In a solution, the communication apparatus 500 is configured to implement an operation performed by the receiving device in the foregoing method embodiment. For example, the processor 510 is configured to implement a service processing related operation performed by the receiving device in the foregoing method embodiment, and the transceiver 530 is configured to implement a receiving or sending related operation performed by the receiving device in the foregoing method embodiment.

    [0203] In another solution, the communication apparatus 500 is configured to implement an operation performed by the transmitting device in the foregoing method embodiment. For example, the processor 510 is configured to implement a service processing related operation performed by the transmitting device in the foregoing method embodiment, and the transceiver 530 is configured to implement a receiving or sending related operation performed by the transmitting device in the foregoing method embodiment.

    [0204] In an example, the transmitting device or the receiving device in the foregoing embodiment may include an OTN device.

    [0205] For explanations of related content and beneficial effects in any service processing apparatus provided above, refer to a corresponding method embodiment provided above. Details are not described herein again.

    [0206] In the embodiments of this application, a specific structure of an entity for performing the method provided in the embodiments of this application is not particularly limited, provided that the entity can run a program recording code of the method in the embodiments of this application, to perform communication according to the method provided in the embodiments of this application. For example, the method provided in the embodiments of this application may be performed by a terminal device, a satellite, or a functional module that is in a terminal device or a satellite and that can invoke and execute the program.

    [0207] Aspects or features in embodiments of this application may be implemented as a method, an apparatus or a product that uses standard programming and/or engineering technologies. The term “product” used in this application covers a computer program that can be accessed from any computer-readable component, carrier or medium. For example, the computer-readable medium may include but is not limited to: a magnetic storage component (for example, a hard disk, a floppy disk, or a magnetic tape), an optical disc (for example, a compact disc (CD)), a digital versatile disc (DVD), a smart card and a flash memory component (for example, erasable programmable read-only memory (EPROM), a card, a stick, or a key drive).

    [0208] Various storage media described in this specification may represent one or more devices and/or other machine-readable media for storing information. The term “machine-readable media” may include but is not limited to: a radio channel, and various other media that can store, include, and/or carry instructions and/or data.

    [0209] It should be understood that, the processor in this embodiment of this application may be a central processing unit (CPU), or may be another general purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or another programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like. The general purpose processor may be a microprocessor or any conventional processor or the like.

    [0210] It may be understood that the memory mentioned in this embodiment of this application may be a volatile memory or a nonvolatile memory, or may include a volatile memory and a nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM). For example, the RAM may be used as an external cache. By way of example, and not limitation, the RAM may include the following plurality of forms: a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchlink dynamic random access memory (SLDRAM), and a direct rambus dynamic random access memory (DR RAM).

    [0211] It should be noted that when the processor is a general purpose processor, a DSP, an ASIC, an FPGA or another programmable logic device, a discrete gate, a transistor logic device, or a discrete hardware component, the memory (a storage module) is integrated into the processor. It should be further noted that the memory described in this specification is intended to include, but is not limited to, these memories and any other appropriate type of memories.

    [0212] A person of ordinary skill in the art may be aware that, with reference to the examples described in embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of embodiments of this application.

    [0213] It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, refer to a corresponding process in the foregoing method embodiments. Details are not described herein again.

    [0214] In the several embodiments provided embodiments of this application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, division into the units is merely logical function division and may be other division during actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.

    [0215] The units described as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, to be specific, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of embodiments.

    [0216] In addition, functional units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.

    [0217] When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of embodiments of this application essentially, or the part contributing to the conventional technology, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in embodiments of this application. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.

    [0218] The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in embodiments of this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.