The present invention relates to the field of communications, and in particular, to a data receiving method and device, and a data sending method and device.
With the development of the Internet, traffic of a telecommunications backbone network is rapidly growing by 50% to 80% each year. At the beginning of the year 2011, the IEEE 802.3 working group started to collect a bandwidth development requirement after a 100GE Ethernet interface. With regard to the development of network bandwidth in the future, the IEEE 802.3 working group considered that network traffic in the year 2015 could reach 10 times what it was in the year 2010. According to a preliminary analysis, there would be two rates of 400GE/1TE for an Ethernet interface in the future, and such requirements would appear and begin to be applied in the year 2015 and the year 2020, respectively.
As a transmission rate increases, a high frequency loss of a signal on a high-speed transmission link increases; therefore, intersymbol interference affects an indicator such as signal quality or a bit error rate. However, currently, a decision feedback equalizer (English full name: decision feedback equalizer, English acronym: DFE) is universally used on a receive side of a high-speed interface, which embodies distortion caused by white noise on the link in a form of an error burst. Therefore, the industry begins to study how to perform error correction on a bit error in the Ethernet by using an FEC algorithm.
In the prior art, an interleaver (English: Interleaver) in a sending device writes by row and then reads by column a section of data on which FEC encoding has been performed. The sending device then sends, to a receiving device, the data read by column. For example, when data 1 on which the FEC encoding has been performed includes data units U0 to U4, and data 2 on which the FEC encoding has been performed includes data units U5 to U9, the 10 data units are written by row, and it is set that each row includes five data units, and then written data is shown in Table 1.
The data shown in Table 1 is read by column, and then data shown in Table 2 can be obtained.
The data read by column is sent to the receiving device. The receiving device performs an operation inverse to that of the sending device on the received data, and in a normal case, the data shown in Table 1 can be obtained again.
During a transmission process, a bit error may occur in the data read by column and shown in Table 2, for example, a bit error occurs in the three successive data units U6, U2, and U7. The receiving device restores an arrangement order of the data units in Table 3 to that shown in Table 1. Therefore, the three successive data units U6, U2, and U7 are not successive any longer. In other words, a probability that multiple error codes occur in one code word decreases. In this way, error correction pressure of an FEC unit in the receiving device can be reduced to some extent.
However, in the foregoing method, such a special interleaving manner of writing by row and reading by column needs to be performed. In this interleaving manner, a section of data needs to be written before the section of data begins to be read, which generates an obvious delay.
An objective of embodiments of the present invention is to provide a data sending method and a data receiving method, and a corresponding sending device and a corresponding receiving device, to correct a bit error generated during a data transmission process.
The technical solutions of the embodiments of the present invention include:
According to a first aspect, a data sending method includes:
In a first implementation manner of the first aspect, the method further includes:
In a second implementation manner of the first aspect, the performing interleaving, by the sending device, on the first data stream and the second data stream, to obtain an output data stream specifically includes:
The second implementation manner of the first aspect is based on the first implementation manner of the first aspect.
In a third implementation manner of the first aspect, for the first interleaving, the interleaving is performed according to a first data unit, for the second interleaving, the interleaving is performed according to a second data unit, where the first data unit includes at least two bits, and the second data unit includes at least two bits, and for the third interleaving, the interleaving is performed according to a bit.
Preferably, performing interleaving according to a data unit refers to dividing, according to a length of the data unit, each of at least two to-be-interleaved data streams into data blocks, and then performing the interleaving on the obtained data blocks, where the length of the data unit refers to the number of bits included in the data unit.
According to a second aspect, a data receiving method includes:
Optionally, the sending the second data stream to the third FEC unit in the receiving device by using the third channel, for FEC decoding may refer to performing FEC decoding by the third FEC unit or forwarding, by the third FEC unit, the second data stream to another FEC unit, for the another FEC unit to perform decoding.
In a first implementation manner of the second aspect, the performing de-interleaving on the first data stream, to obtain a second data stream and a third data stream specifically includes:
In a second implementation manner of the second aspect, the method further includes:
In a third implementation manner of the second aspect, for the first de-interleaving, the de-interleaving is performed according to a bit, for the second de-interleaving, the de-interleaving is performed according to a first data unit, and for the third de-interleaving, the de-interleaving is performed according to a second data unit, where the first data unit includes at least two bits, and the second data unit includes at least two bits. The third implementation manner of the second aspect is based on the first implementation manner of the second aspect or the second implementation manner of the second aspect.
According to a third aspect, a sending device includes:
In a first implementation manner of the third aspect, the first FEC unit is further configured to send, by using a third channel, a third data stream on which third FEC encoding has been performed, where the third data stream includes a channel identifier of the third channel; and
In a second implementation manner of the third aspect, the interleaving unit is specifically configured to:
In a third implementation manner of the third aspect, for the first interleaving, the interleaving is performed according to a first data unit, for the second interleaving, the interleaving is performed according to a second data unit, where the first data unit includes at least two bits, and the second data unit includes at least two bits, and for the third interleaving, the interleaving is performed according to a bit. The third implementation manner of the third aspect is based on the second implementation manner of the third aspect.
According to a fourth aspect, a receiving device includes:
In a first implementation manner of the fourth aspect, the de-interleaving unit is specifically configured to:
In a second implementation manner of the fourth aspect, the determining unit is further configured to:
In a third implementation manner of the fourth aspect, for the first de-interleaving, the de-interleaving is performed according to a bit, for the second de-interleaving, the de-interleaving is performed according to a first data unit, and for the third de-interleaving, the de-interleaving is performed according to a second data unit, where the first data unit includes at least two bits, and the second data unit includes at least two bits. The third implementation manner of the fourth aspect is based on the first implementation manner of the fourth aspect or the second implementation manner of the fourth aspect.
An advantage according to one aspect of the present invention lies in that, a receiving device can send, to different FEC units of the receiving device, data units in which an error occurs; therefore, a case in which error correction is performed by using only one FEC unit can be prevented to a great extent. In this case, for an FEC unit, the number of bit errors received by the FEC unit decreases. In other words, a probability that the FEC unit performs error correction successfully increases. On the whole, when success rates of error correction of one or more FEC units in the receiving device increase, an error correction capability of the receiving device is improved. In addition, in this embodiment, an interleaving manner of writing by row and reading by column is not needed; therefore, no delay is generated.
The following describes the present invention in detail with reference to the accompanying drawings and specific embodiments. However, it should be noted that, the following embodiments are only examples given for ease of understanding the technical solutions, and are not intended to limit the present invention.
An embodiment of the present invention provides a data sending method. The method is performed by a sending device, and the sending device includes at least two forward error correction (English full name: Forward Error Correction, English acronym: FEC) units, for example, an FECa0 and an FECa1 that are shown in
In this embodiment, each FEC unit may have at least one channel, and the channel is used to output data on which FEC encoding has been performed by an FEC unit connected to this channel. For example, the FECa0 in
Encoding rules used by different FEC units may be the same or different. In addition, FEC encoding rules for data streams output by different channels of a same FEC unit may be the same or different. For example, an FEC encoding rule for the data stream a0 may be the same as or different from an FEC encoding rule for the data stream a4. The encoding rule for the data stream a0 may be the same as or different from an encoding rule for a data stream a1, and the data stream a1 refers to a data stream output from the channel La1.
In this embodiment, as shown in
Interleaving is performed on the data stream a0 and the data stream a4, to obtain a data stream i0. It should be noted that, the data stream i0 may be one data stream or two or more data streams.
When the data stream i0 is one data stream, as shown in
When the data stream i0 includes two data streams, as shown in
When the data stream i0 is two data streams, the sending device may not continue to perform the interleaving on the two data streams, and may send the data stream i00 and the data stream i01 as two data streams to a receiving device.
When the interleaving is performed on a data stream 1 and a data stream 2, to obtain a data stream 3, in the data stream 3, an arrangement order of data units that are from the data stream 1 should be the same as that of these data units in the data stream 1, and an arrangement order of data units that are from the data stream 2 should be the same as that of these data units in the data stream 2. Using
In addition, it should be noted that, for the interleaving, the interleaving may be performed based on one data unit or multiple data units. Interleaving methods shown in
An interleaving operation in this embodiment is performed by an interleaving unit, and the interleaving unit may be one or more hardware chips or processors, or some of logical functions in one hardware chip or processor.
In this embodiment, an interleaving unit of a sending device performs interleaving on at least two data streams encoded by different FEC units, and a sending unit in the sending device sends data obtained through the interleaving to a receiving device. In this way, the receiving device can perform de-interleaving on a data stream after the interleaving, and send at least two data streams obtained through the de-interleaving to different FEC units for decoding. When a bit error occurs during a transmission process of the data stream obtained through the interleaving, the data streams obtained after the de-interleaving are sent to the different FEC units for decoding. Therefore, for an FEC unit, the number of bit errors received by the FEC unit decreases. In other words, a probability that the FEC unit performs error correction successfully increases. On the whole, when success rates of error correction of one or more FEC units in the receiving device increase, an error correction capability of the receiving device is improved. In addition, in this embodiment, an interleaving manner of writing by row and reading by column is not needed; therefore, no delay is generated. In addition, an interleaver that implements the interleaving manner of writing by row and reading by column is complex in design and consumes much power. In this embodiment, such a special interleaver is not needed; therefore, the implementation is simple and power consumption of a device is reduced. To sum up, the data sending method in this embodiment helps implement a simple, energy-saving, and efficient error correction method.
An embodiment of the present invention provides a data receiving method. The method is performed by a receiving device, and the receiving device includes at least two FEC units, for example, an FECb1 and an FECb2 that are shown in
A receiving unit in the receiving device receives a first data stream from a sending device.
The first data stream in this embodiment may be one data stream or two or more data streams.
As shown in
A determining unit in the receiving device determines that the data stream a0 includes the channel identifier of the channel La0 and the data stream a4 includes the channel identifier of the channel La4.
When the receiving device can determine that the data stream a0 includes the channel identifier of the channel La0 and the data stream a4 includes the channel identifier of the channel La4, it indicates that the data stream a0 obtained through the de-interleaving by the receiving device includes the channel identifier of the La0, and a data stream a1 obtained through the de-interleaving includes a channel identifier of an La1. Further, the receiving device may determine that the data stream i0 is a data stream that is obtained after interleaving processing. This is because, if the data stream i0 is not acquired by performing interleaving processing, data streams obtained after the de-interleaving is forcibly performed on the data stream i0 may be disordered, and the receiving device cannot determine the channel identifier of the La0 or the channel identifier of the La1 from the disordered data streams. In addition, when one channel is connected to one FEC unit, it may be determined that a data stream that includes a channel identifier of the channel is from the FEC unit, that is, FEC encoding has been performed on the data stream.
The receiving device determines, according to the channel identifier of the channel La0 and a correspondence 1, a channel in the receiving device and corresponding to the channel La0. In this embodiment, the correspondence 1 includes a correspondence between the channel identifier of the channel La0 and a channel identifier of a channel Lb1. Therefore, the receiving device determines that the channel Lb1 is a channel corresponding to the channel La0, thereby determining that the data stream a0 needs to be sent by using the channel Lb1. As shown in
Similarly, the receiving device determines, according to the channel identifier of the channel La4 and a correspondence 2, a channel in the receiving device and corresponding to the channel La4. In this embodiment, the correspondence 2 includes a correspondence between the channel identifier of the channel La4 and a channel identifier of a channel Lb7. Therefore, the receiving device determines that the channel Lb7 is a channel corresponding to the channel La0, thereby determining that the data stream a4 needs to be sent by using the channel Lb7. As shown in
As shown in
When the first data stream is the data streams i00 and i01 shown in
Operations that are performed by the receiving device after obtaining the data stream a0 and the data stream a4 are the same as those in the embodiment corresponding to
An embodiment of the present invention includes a process during which a sending device sends data to a receiving device, and the receiving device performs corresponding receiving.
As shown in
As shown in
The sending device performs first interleaving by using an interleaving unit, where the first interleaving specifically includes: performing interleaving on the data stream a00 and the data stream a40, to obtain a data stream i0. When each data unit in the data stream a00 and the data stream a40 includes at least two bits, it may be considered that the first interleaving is performed according to a first data unit. When each data unit in the data stream a00 and the data stream a40 has only one bit, it may be considered that the first interleaving is performed according to a bit.
The sending device performs second interleaving by using the interleaving unit, where the second interleaving specifically includes: performing interleaving on the data stream a20 and the data stream a60, to obtain a data stream i1. When each data unit in the data stream a20 and the data stream a60 includes at least two bits, it may be considered that the second interleaving is performed according to a second data unit. When each data unit in the data stream a20 and the data stream a60 has only one bit, it may be considered that the second interleaving is performed according to a bit.
The interleaving unit performs third interleaving on the data stream i0 and the data stream i1, to obtain a data stream i2.
The data stream i2 is sent to the receiving device.
The third interleaving shown in
Optionally, when each data unit obtained through the first interleaving includes multiple bits, for the third interleaving, the interleaving may also be performed according to a bit.
The sending device shown in
As shown in
The receiving device then performs second de-interleaving on the data stream i0 by using the de-interleaving unit, and performs third de-interleaving on the data stream i1. The second de-interleaving specifically includes: performing the de-interleaving on the data stream i0, to obtain the data stream a00 and the data stream a40; and the third de-interleaving specifically includes: performing the de-interleaving on the data stream i1, to obtain the data stream a20 and the data stream a60.
When the data stream i0 is obtained after the sending device performs the interleaving according to the first data unit, the second de-interleaving refers to performing the de-interleaving according to the first data unit. When the data stream i1 is obtained after the sending device performs the interleaving according to the second data unit, the third de-interleaving refers to performing the de-interleaving according to the second data unit.
When the data stream i0 is obtained after the sending device performs the interleaving according to a bit, for the second de-interleaving, the de-interleaving is performed according to a bit. When the data stream i1 is obtained after the sending device performs the interleaving according to a bit, for the third de-interleaving, the de-interleaving is performed according to a bit.
The data stream a00 includes the channel identifier of the channel La0, the data stream a20 includes the channel identifier of the channel La2, the data stream a40 includes the channel identifier of the channel La4, and the data stream a60 includes the channel identifier of the channel La6. Therefore, the receiving device can obtain the foregoing four channel identifiers according to the foregoing four data streams that are obtained through the second de-interleaving and the third de-interleaving. Then, the corresponding channels in the receiving device are separately found according to the foregoing four channel identifiers. For example, it is determined, according to the channel identifier of the channel La0 and a correspondence 0, that a channel Lb0 is a channel corresponding to the channel La0, and is used to receive the data stream a00, where the correspondence 0 includes a correspondence between the channel identifier of the channel La0 and a channel identifier of the channel Lb0. According to the foregoing principle, the receiving device determines, according to the channel identifier of the channel La2 and a correspondence 2, that a channel Lb2 is a channel corresponding to the channel La2, and is used to receive the data stream a20; determines, according to the channel identifier of the channel La4 and a correspondence 4, that a channel Lb4 is a channel corresponding to the channel La4, and is used to receive the data stream a40; and determines, according to the channel identifier of the channel La6 and a correspondence 6, that a channel Lb6 is a channel corresponding to the channel La6, and is used to receive the data stream a60.
After that, the receiving device sends, to an FECb0 by using the channel Lb0, the data stream a00 that is obtained according to the data stream i0, for FEC decoding, and sends, to an FECb1 by using the channel Lb4, the data stream a40 that is obtained according to the data stream i0, for FEC decoding; and sends, to the FECb0 by using the channel Lb2, the data stream a20 that is obtained according to the data stream i1, for FEC decoding, and sends, to the FECb1 by using the channel Lb6, the data stream a60 that is obtained according to the data stream i1, for FEC decoding.
An error may occur during a transmission process of the data stream i2 from the sending device to the receiving device. For example, when an error occurs in the data units 41, 61, 02, and 22 in the data stream i2, after the first de-interleaving, the data unit 41 and the data unit 02 are allocated to the data stream i0, and the data unit 61 and the data unit 22 are allocated to the data stream i1. After the second de-interleaving and the third de-interleaving, the data unit 02 is allocated to the data stream a00, the data unit 41 is allocated to the data stream a40, the data unit 21 is allocated to the data stream a20, and the data unit 61 is allocated to the data stream a60. In this way, the four data units in which the error occurs are allocated to different FEC units for FEC decoding. In this way, a probability that a large number of bit errors are allocated to a same FEC unit decreases and error correction capabilities of multiple FEC units in the receiving device can be fully utilized. Therefore, a probability that the receiving device successfully corrects bit errors increases on a whole.
Referring to
The L0 to the L15 correspondingly output symbol (English: Symbol) data streams. For example, bits 000.0 to 000.9 on the Lane0 represent one Symbol; and bits 004.0 and 004.1 represent the first two bits of a next Symbol, and subsequent bits are not shown. Such a data stream that includes multiple Symbols is a symbol data stream. Similarly, data streams on the Lane1 to the Lane15 are also symbol data streams.
Before interleaving, 000.0 to 000.9 in the FEC0 represent ten bits of a Symbol00, 001.0 to 001.9 represents ten bits of a Symbol01, 002.0 to 002.9 represent ten bits of a Symbol02, and 003.0 to 003.9 represent ten bits of a Symbol03. Structures of data streams output by the FEC1, the FEC2, and the FEC3 are the same as a structure of a data stream output by the FEC0, and the data streams are all symbol data streams, and each symbol includes ten bits. In addition, an order in which a bit in each Symbol is output is relevant to a sequence number of this bit, for example, 000.0 is output first, then 000.1 is output, then 000.2 is output after 000.1, and so on. It may be understood that in one Symbol, a bit whose sequence number is smaller is output earlier than a bit whose sequence number is greater. Data in L1 is used as an example: 000.0 is less than 000.1, and therefore 000.0 is output earlier than 000.1; and 000.9 is less than 004.0, and therefore 000.9 is output earlier than 004.0. In another data stream, a principle of determining an output order is the same as the foregoing.
Next, a specific manner of the interleaving is introduced according to
The first beat of data of four data streams of the FEC0, that is, 000.0, 001.0, 002.0, and 003.0, is used as the first beat of data of four interleaved streams EL0 to EL3 that are obtained after the interleaving has been performed, where the interleaved streams are data streams obtained after the interleaving has been performed; the first beat of data of four streams of the FEC1, that is, 100.0, 101.0, 102.0, and 103.0, is used as the second beat of data of the EL0 to the EL3; the first beat of data of four streams of the FEC2, that is, 200.0, 201.0, 202.0, and 203.0, is used as the third beat of data of the EL0 to the EL3; and the first beat of data of four streams of the FEC3, that is, 300.0, 301.0, 302.0, and 303.0, is used as the fourth beat of data of the EL0 to the EL3.
The second beat of data of four data streams of the FEC0, that is, 000.1, 001.1, 002.1, and 003.1, is used as the first beat of data of four interleaved streams EL4 to EL7 that are obtained after the interleaving has been performed; the second beat of data of four data streams of the FEC1, that is, 100.1, 101.1, 102.1, and 103.1, is used as the second beat of data of the EL4 to the EL7; the second beat of data of four streams of the FEC2, that is, 200.1, 201.1, 202.1, and 203.1, is used as the third beat of data of the EL4 to the EL7; and the second beat of data of the FEC3, that is, 300.1, 301.1, 302.1, and 303.1, are used as the fourth beat of data of the EL4 to the EL7.
The third beat of data of four data streams of the FEC0, that is, 000.2, 001.2, 002.2, and 003.2, is used as the first beat of data of four interleaved streams EL8 to EL11 that are obtained after the interleaving has been performed; the third beat of data of four data streams of the FEC1, that is, 100.2, 101.2, 102.2, and 103.2, is used as the second beat of data of the EL8 to the EL11; the third beat of data of four data streams of the FEC2, that is, 200.2, 201.2, 202.2, and 203.2, is used as the third beat of data of the EL8 to the EL11; and the third beat of data of four data streams of the FEC3, that is, 300.2, 301.2, 302.2, and 303.2, is used as the fourth beat of data of the EL8 to the EL11.
The fourth beat of data of four data streams of the FEC0: 000.3, 001.3, 002.3, and 003.3, is used as the first beat of data of four interleaved streams EL12 to EL15 that are obtained after the interleaving has been performed; the fourth beat of data of four data streams of the FEC1, that is, 100.3, 101.3, 102.3, and 103.3, is used as the second beat of data of the EL12 to the EL15; the fourth beat of data of four data streams of the FEC2, that is, 200.3, 201.3, 202.3, and 203.3, is used as the third beat of data of the EL12 to the EL15; and the fourth beat of data of four data streams of the FEC3, that is, 300.3, 301.3, 302.3, and 303.3, is used as the fourth beat of data of the EL12 to the EL15.
By analogy, subsequent data after the interleaving continues to be obtained.
For example, the fifth beat of data of four data streams of the FEC0 is used as the fifth beat of data of the EL4 to the EL7; the fifth beat of data of four data streams of the FEC1 is used as the sixth beat of data of the EL4 to the EL7; the fifth beat of data of four data streams of the FEC2 is used as the seventh beat of data of the EL4 to the EL7; and the fifth beat of data of four data streams of the FEC3 are used as the eighth beat of data of the EL4 to the EL7. In addition, each bit in this embodiment may be replaced with another data unit, for example, a bit is replaced with a byte (byte), and then 000.0 indicates one byte.
After the interleaving has been performed, 16 interleaved streams are obtained, that is, the EL0 to the EL15. Each stream in the 16 interleaved data streams is orthogonal, that is, on each interleaved stream, adjacent bits all come from different FEC units. For example, in the EL0, four bits, which are 000.0, 100.0, 200.0, and 300.0, come from four different FEC units, which reflects an orthogonal feature. In this way, when a string of bit errors occur on one interleaved stream, after being de-interleaved at a receive end, the bit errors are allocated to the four FEC units for error correction. In this way, a quantity of bit errors that each FEC unit needs to process is much less than a quantity of the string of bit errors.
Referring to
Certainly, a quantity of data units included in one Symbol may vary, and is not necessarily 10.
Next, a specific manner of the interleaving in this embodiment is introduced according to
In
000.8 and 000.9 in the ninth beat of data of the EL0 to the EL3 and eight data units, which are 000.0, and 000.1 to 000.7, belong to one Symbol, and data units 004.0 and 004.1 belong to another Symbol. It is also similar for the data in the tenth beat to the twelfth beat of the EL0 to the EL3.
12 interleaved streams, which are EL4 to EL7, EL8 to EL11, and EL12 to EL15, are also obtained by using the foregoing method.
Four interleaved streams, which are the EL4 to the EL7, are obtained by means of interleaving in the following manner:
Four interleaved streams, which are the EL8 to the EL11, are obtained by means of interleaving in the following manner:
Four interleaved streams, which are the EL12 to the EL15, are obtained by means of interleaving in the following manner:
In this embodiment, each data unit may be one bit, or may be one byte, or may be with another data length.
When the further interleaving is performed, a quantity of ELs is not limited to 2 or 4, and the quantity may be any value that is greater than or equal to 2.
The foregoing methods for performing the further interleaving and the another type of further interleaving are not only applicable to the data streams obtained by means of the interleaving shown in
An embodiment of the present invention includes a process during which a sending device sends data to a receiving device, and the receiving device performs corresponding receiving.
As shown in
As shown in
The sending device performs first interleaving and second interleaving by using an interleaving unit. For the first interleaving, the interleaving is performed according to a first data unit, and for the second interleaving, the interleaving is performed according to a second data unit, where the first data unit includes at least two bits, and the second data unit includes at least two bits. The number of bits included in the first data unit and the number of bits included in the second data unit may be the same or different.
Performing interleaving according to a data unit refers to dividing, according to a length of the data unit, each of at least two to-be-interleaved data streams into data blocks, and then performing the interleaving on the obtained data blocks, where the length of the data unit refers to the number of bits included in the data unit.
The first interleaving specifically includes: performing the interleaving on the data stream a00 and the data stream a40, to obtain a data stream i0′; and the second interleaving includes performing the interleaving on the data stream a80 and the data stream a120, to obtain a data stream i1′.
In
It can be seen from
The interleaving unit performs third interleaving on the data stream i0′ and the data stream i1′, to obtain a data stream i2′, where for the third interleaving, the interleaving is performed according to a bit. The interleaving is performed according to a bit; therefore, in the data stream i2′, the four bits: bits 00.0, 00.1, 00.2, and 00.3 are not consecutive any longer, but are mutually interleaved with the four bits in the data unit 80.
In the third interleaving shown in
As shown in
The receiving device then performs second de-interleaving on the data stream i0′ by using the de-interleaving unit, and performs third de-interleaving on the data stream i1′. The second de-interleaving specifically includes: performing the de-interleaving on the data stream i0′ according to the first data unit, to obtain the data stream a00 and the data stream a40; and the third de-interleaving specifically includes: performing the de-interleaving on the data stream i1′ according to the second data unit, to obtain the data stream a80 and the data stream a120.
Performing the de-interleaving according to a data unit is an inverse process of performing the interleaving according to a data unit. Therefore, the performing the de-interleaving according to the first data unit is an inverse process of the performing the interleaving according to the first data unit, and the performing the de-interleaving according to the second data unit is an inverse process of the performing the interleaving according to the second data unit.
After that, according to the method in the embodiment corresponding to
As shown in
The FEC unit 110 is configured to send, by using the channel L1100, a data stream s1100 on which first FEC encoding has been performed, where the data stream s1100 includes a channel identifier of the channel L1100; and the FEC unit 111 is configured to send, by using the channel L1110, a data stream s1100 on which second FEC encoding has been performed, where the data stream s1100 includes a channel identifier of the channel L1110, and an encoding rule of the first FEC encoding and that of the second FEC encoding are the same or different.
The interleaving unit 12 is configured to perform interleaving on the data stream s1100 and the data stream s1110 that are received, to obtain an output data stream.
The output data stream obtained through the interleaving may be one data stream or may include at least two data streams. For example, when the interleaving unit 12 performs the interleaving in the manner shown in
The sending device 10 further includes a sending unit 13, configured to send the output data stream to a receiving device.
Optionally, the FEC unit 110 is further configured to send, by using a channel L1101, a data stream s1101 on which third FEC encoding has been performed, where the data stream s1101 includes a channel identifier of the channel L1101, and an encoding rule of the third FEC encoding and that of the first FEC encoding are the same or different; and the FEC unit 111 is further configured to send, by using a channel L1111, a data stream s1111 on which fourth FEC encoding has been performed, where the data stream s1111 includes a channel identifier of the channel L1111, and an encoding rule of the fourth FEC encoding and that of the second FEC encoding are the same or different.
When the FEC unit 110 sends the data stream s1100 and the data stream s1101, and the FEC unit 111 sends the data stream s1110 and the data stream s1111, the interleaving unit 12 is specifically configured to:
Preferably, for the first interleaving, the interleaving is performed according to a first data unit, for the second interleaving, the interleaving is performed according to a second data unit, where the first data unit includes at least two bits, and the second data unit includes at least two bits, and for the third interleaving, the interleaving is performed according to a bit.
Optionally, when the FEC unit 110 sends the data stream s1100 and the data stream s1101, and the FEC unit 111 sends the data stream s1110 and the data stream s1111, the interleaving unit 12 may be further specifically configured to:
Preferably, for the first interleaving, the interleaving is performed according to a first data unit, and for the second interleaving, the interleaving is performed according to a second data unit, where the first data unit includes at least two bits, and the second data unit includes at least two bits.
In the sending device 10, the FEC unit 11 and the interleaving unit 12 are implemented by hardware chips that are independent of each other, or by a same hardware chip. Multiple FEC units may belong to a same hardware chip, and each FEC unit is one hardware unit in the hardware chip. The sending unit 10 is also a unit that is implemented by hardware.
The sending device 10 may be the sending device in the embodiment corresponding to
The sending device in this embodiment performs interleaving on at least two data streams encoded by different FEC units, and sends data obtained through the interleaving to a receiving device. In this way, the receiving device can perform de-interleaving on a data stream after the interleaving, and send at least data streams obtained through the de-interleaving to different FEC units for decoding. When a bit error occurs during a transmission process of the data stream obtained through the interleaving, the data streams obtained after the de-interleaving are sent to the different FEC units for decoding. Therefore, for an FEC unit, the number of bit errors received by the FEC unit decreases. In other words, a probability that the FEC unit performs error correction successfully increases. On the whole, when success rates of error correction of one or more FEC units in the receiving device increase, an error correction capability of the receiving device is improved. In addition, in this embodiment, an interleaving manner of writing by row and reading by column is not needed; therefore, no delay is generated. In addition, an interleaver that implements the interleaving manner of writing by row and reading by column is complex in design and consumes much power. In this embodiment, such a special interleaver is not needed; therefore, the implementation is simple and power consumption of a device is reduced. To sum up, the sending device in this embodiment helps implement a simple, energy-saving, and efficient error correction method.
As shown in
The receiving unit 21 is configured to receive a first data stream from a sending device. The first data stream may be one data stream or at least two data streams. For example, the first data stream in this embodiment may be the data stream i0 shown in
The de-interleaving unit 22 is configured to perform de-interleaving on the first data stream, to obtain a second data stream and a third data stream.
The determining unit 23 is configured to perform the following operation:
When the first data stream is sent by the sending device 10 shown in
When the determining unit 23 can determine that one data stream includes one channel identifier, it indicates that this data stream includes this channel identifier, and this channel identifier exists in an identifiable manner. For example, in this embodiment, it indicates that the second data stream obtained through the de-interleaving already includes the first channel identifier, and the third data stream obtained through the de-interleaving already includes the second channel identifier. If the receiving device 20 receives a data stream a, the de-interleaving is performed on the data stream a to obtain a data stream b and a data stream c. However, if the determining unit 23 determines that at least one data stream of the data stream b and the data stream c does not include a channel identifier, the data stream a shall not be considered as the first data stream in this embodiment.
The determining unit 23 continues to perform the following operation:
After determining the third channel identifier, the determining unit 23 sends, by using the third channel, the second data stream to the FEC unit in the receiving device 20 and connected to the third channel, for FEC decoding.
The receiving device 20 further determines, according to the second channel identifier and a second correspondence that is configured in the receiving device, a fourth channel identifier corresponding the second channel identifier, where the second correspondence includes a correspondence between the second channel identifier and the fourth channel identifier, the fourth channel identifier is a channel identifier of a fourth channel connected to another FEC unit in the receiving device, and the another FEC unit refers to one FEC unit that is different from the FEC unit in the receiving device 20 and connected to the third channel. For example, when the FEC unit connected to the third channel is the FEC unit 240, the another FEC unit may be the FEC unit 241 or another FEC unit in the receiving device 20 and not shown in
The receiving device 20 further sends, by using the fourth channel, the third data stream to the FEC unit in the receiving device 20 and connected to the fourth channel, for FEC decoding.
When a bit error exists in the first data stream, a de-interleaving operation is performed; therefore, the bit error may be allocated to the second data stream and the third data stream. The second data stream and the third data stream are allocated to different FEC units for FEC decoding; therefore, a case in which error correction is performed by using only one FEC unit can be prevented to a great extent, and one or more other FEC units in the receiving device can be more fully utilized for the error correction, to improve an error correction capability of the receiving device.
In this embodiment, the sending device may perform the interleaving on data streams in multiple manners; therefore, there may be multiple manners of de-interleaving processing by the de-interleaving unit 22.
The de-interleaving unit 22 may perform the de-interleaving in the manner shown in
When the de-interleaving unit 22 performs the de-interleaving in the manner shown in
When the de-interleaving unit 22 performs the de-interleaving in the manner shown in
When the de-interleaving unit 22 performs the de-interleaving in the manner shown in
When the de-interleaving unit 22 performs the de-interleaving in the manner shown in
When the de-interleaving unit 22 performs the de-interleaving in the manner shown in
When the de-interleaving unit 22 performs the de-interleaving in the manner shown in
Therefore, preferably, the determining unit 23 further needs to process the sixth data stream and the seventh data stream, and a processing manner is the same as a processing manner of the second data stream and the third data stream that belong to a same embodiment as the sixth data stream and the seventh data stream.
Specifically, when the de-interleaving unit performs the de-interleaving in the manner shown in
The determining unit 23 determines, according to the fifth channel identifier and a third correspondence that is configured in the receiving device, a seventh channel identifier corresponding to the fifth channel identifier. The third correspondence includes a correspondence between the fifth channel identifier and the seventh channel identifier, the seventh channel identifier is a channel identifier of a seventh channel, and the seventh channel and the third channel are connected to a same FEC unit in the receiving device. For example, the seventh channel may be the channel L2401 in
The determining unit 23 determines, according to the sixth channel identifier and a fourth correspondence that is configured in the receiving device, an eighth channel identifier corresponding to the sixth channel identifier. The fourth correspondence includes a correspondence between the sixth channel identifier and the eighth channel identifier, the eighth channel identifier is an identifier of an eighth channel, and the eighth channel and the fourth channel are connected to a same FEC unit in the receiving device. For example, the eighth channel may be the channel L241n in
When the de-interleaving unit performs the de-interleaving in the manner shown in
In this embodiment, the determining unit 23 may be one hardware chip or may include multiple hardware chips that are independent of each other. The de-interleaving unit 22 may be independent of the determining unit 23, or integrated with the determining unit 23 or a part of the determining unit 23. The receiving device 20 may be the receiving device in the embodiment corresponding to
In this embodiment, data units in which an error occurs are sent to different FEC units. Therefore, for an FEC unit, the number of bit errors received by the FEC unit decreases. In other words, a probability that the FEC unit performs error correction successfully increases. On the whole, when success rates of error correction of one or more FEC units in the receiving device increase, an error correction capability of the receiving device is improved. In addition, in this embodiment, an interleaving manner of writing by row and reading by column is not needed; therefore, no delay is generated. In addition, an interleaver that implements the interleaving manner of writing by row and reading by column is complex in design and consumes much power. In this embodiment, such a special interleaver is not needed; therefore, the implementation is simple and power consumption of a device is reduced.
A person of ordinary skill in the art may understand that all or a part 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.
The foregoing descriptions are merely exemplary specific implementation manners of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
PCT/CN2013/089697 | Dec 2013 | CN | national |
PCT/CN2013/090803 | Dec 2013 | CN | national |
This application is a continuation of U.S. patent application Ser. No. 17/511,303, filed on Oct. 26, 2021, which is a continuation of U.S. patent application Ser. No. 17/003,938, filed on Aug. 26, 2020, now U.S. Pat. No. 11,356,203, which is a continuation of U.S. patent application Ser. No. 16/374,414, filed on Apr. 3, 2019, now U.S. Pat. No. 10,797,828, the U.S. patent application Ser. No. 16/374,414 is a continuation of U.S. patent application Ser. No. 15/186,040, filed on Jun. 17, 2016, now U.S. Pat. No. 10,291,358, which is a continuation of International Application No. PCT/CN2014/094081, filed on Dec. 17, 2014. The International Application claims priority to International Application No. PCT/CN2013/090803, filed on Dec. 28, 2013 and International Application No. PCT/CN2013/089697, filed on Dec. 17, 2013. All of the aforementioned patents and patent applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | 17511303 | Oct 2021 | US |
Child | 17829355 | US | |
Parent | 17003938 | Aug 2020 | US |
Child | 17511303 | US | |
Parent | 16374414 | Apr 2019 | US |
Child | 17003938 | US | |
Parent | 15186040 | Jun 2016 | US |
Child | 16374414 | US | |
Parent | PCT/CN2014/094081 | Dec 2014 | US |
Child | 15186040 | US |