This application relates to the communication field, and in particular, to an encoding method, a decoding method, and an apparatus.
In data transmission, a transmit device usually needs to encode data and send encoded data to a receive device.
In a communication system, bit information may be classified into two types: amplitude bits and phase bits. Probabilities of the amplitude bits are adjusted by using, for example, a probabilistic constellation shaping (PCS) algorithm, to output a sequence including redundant bits. Then, the sequence carrying redundant bits and the phase bits are combined and then input into a forward error correction (FEC) encoder for encoding, to obtain systematic code including information bits and check bits. Bit streams obtained after encoding are mapped to a pulse amplitude modulation (PAM) signal based on phase bits and amplitude bits, or are mapped based on in-phase PAM and quadrature PAM and then combined into a quadrature amplitude modulation (QAM) signal. That is, the PAM signal or the QAM signal is shaped by using the PCS algorithm.
However, in an existing solution, information entropy included in each symbol obtained after mapping is fixed, and due to existence of the symbol, at least one bit is needed to identify the symbol. Therefore, the included information entropy needs to be greater than or equal to 1. However, in data transmission, when transmitted data includes larger information entropy, a higher signal-to-noise ratio (SNR) is required. Therefore, a harsher transmission condition requires smaller information entropy included in data, especially in long-distance transmission, for example, in a submarine cable transmission scenario, in which smaller information entropy is usually required. Accordingly, how to carry information entropy more flexibly in data transmission becomes an urgent problem to be resolved.
This application provides an encoding method, a decoding method, and apparatuses, to implement more flexible information entropy in data transmission, especially to implement smaller information entropy to improve stability of long-distance data transmission.
According to a first aspect, this application provides an encoding method, including: first, splitting obtained to-be-encoded data into phase data and amplitude data according to a preset rule; then, obtaining a constellation diagram corresponding to the to-be-encoded data, where the constellation diagram includes a plurality of constellation points, the plurality of constellation points include a constellation point with an amplitude value of 0, each constellation point has a corresponding probability value, and the probability value indicates an occurrence probability of the corresponding constellation point; then, performing probabilistic constellation shaping encoding on the amplitude data based on the constellation diagram and the probability value corresponding to each constellation point, to obtain at least one group of symbol sequences; and then combining the at least one group of symbol sequences and the phase data, and then performing encoding, to obtain output data.
According to a second aspect, this application provides a decoding method, including: first, obtaining a received signal; then, performing hard decision on the received signal, to obtain first amplitude data; then, performing iterative decoding based on the received signal and the first amplitude data, to obtain second amplitude data and phase data, where N is a positive integer; performing probabilistic constellation shaping decoding on the second amplitude data based on a preset constellation diagram, to obtain amplitude-decoded data, where the constellation diagram includes a plurality of constellation points, the constellation diagram includes a constellation point with an amplitude value of 0, each constellation point has a corresponding probability value, and the probability value indicates an occurrence probability of the corresponding constellation point; and then, combining the amplitude-decoded data and the phase data, to obtain decoded data.
According to a third aspect, an embodiment of this application provides an encoding device, including a processor and a memory. The processor and the memory are interconnected through a line, and the processor invokes program code in the memory to perform a processing-related function in the encoding method in any one of the first aspect and the implementations thereof.
According to a fourth aspect, an embodiment of this application provides a decoding device, including a processor and a memory. The processor and the memory are interconnected through a line, and the processor invokes program code in the memory to perform a processing-related function in the decoding method in any one of the first aspect and the implementations thereof.
According to a fifth aspect, an embodiment of this application provides a digital processing chip. The chip includes a processor and a memory. The memory and the processor are interconnected by using a line, the memory stores instructions, and the processor is configured to perform a processing-related function in the method in any one of the first aspect and the second aspect and the implementations thereof.
According to a sixth aspect, an embodiment of this application provides a communication system. The communication system includes an encoding device and a decoding device. The encoding device is described in the third aspect, and the decoding device is described in the fourth aspect.
According to a seventh aspect, an embodiment of this application provides a computer-readable storage medium, including instructions. When the instructions are run on a computer, the computer is enabled to perform the method in any one of the first aspect and the second aspect and the implementations thereof.
According to an eighth aspect, an embodiment of this application provides a computer program product including instructions. When the computer program product runs on a computer, the computer is enabled to perform the method in any one of the first aspect and the second aspect and the implementations thereof.
The following clearly describes the technical solutions in embodiments of this application with reference to the accompanying drawings in the embodiments of this application. It is clear that the described embodiments are merely some but not all of the embodiments of the present invention. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
First, a communication system provided in this application is described with reference to
Specifically, the communication network may include an optical communication network, a wireless communication network, a combination of an optical communication network and a wireless communication network, or the like. The optical communication network includes but is not limited to any one or a combination of more of an optical transport network (OTN), a synchronous digital hierarchy (SDH), a passive optical network (PON), an Ethernet (Ethernet), a flexible Ethernet (FlexE), or the like. The wireless communication network includes but is not limited to any one or more of a 5th generation (5G) mobile communication technology system, a long term evolution (LTE) system, a global system for mobile communications (GSM), a code division multiple access (CDMA) network, a wideband code division multiple access (WCDMA) network, wireless fidelity (Wi-Fi), bluetooth, ZigBee, a radio frequency identification (RFID) technology, long range (Lora) wireless communication, and near field communication (NFC).
Correspondingly, the encoding device or decoding device in this application may be a device in the communication network, for example, a 5G base station, an OTN device, an ADSL device, or an optical communication device.
More specifically, the technical solutions provided in this application may be applied to a plurality of types of optical communication systems, for example, a coherent optical communication system, an incoherent communication system, a direct detection optical communication system, and another communication system that may implement the technical solutions of the present invention. With reference to
In the encoding device no, the signal light source 101 may be a laser. An optical signal emitted by the signal light source 101 is divided into an optical signal X and an optical signal Y by using the polarization beam splitter 103. The modulator 102 loads one electrical signal to the optical signal X, and loads the other electrical signal to the optical signal Y. The electrical signal may be obtained after the DSP at the encoding device (TxDSP) performs one or more processing such as FEC, constellation mapping, and pulse shaping, on an information bit stream. The modulator 102 may be an I/Q modulator, each electrical signal includes a signal I and a signal Q, and a phase difference between the signal I and the signal Q is 90 degrees. After the electrical signals pass through the modulator 102, four signals are formed: XI, XQ, YI, and YQ. Then, the optical signal X and the optical signal Y loaded with the electrical signals are multiplexed by using the polarization beam combiner 104. Then, a multiplexed signal is sent through the optical fiber 120.
After the decoding device 130 receives the optical signal transmitted through the optical fiber 120, the polarization beam splitter splits the received optical signal into two orthogonal signals, where frequency mixing 107 is performed between each orthogonal signal and one optical signal generated by the local oscillator light source 105. The local oscillator light source 105 may be a laser. Four optical signals XI, XQ, YI, and YQ whose polarization and phases are orthogonal are obtained after the frequency mixing is performed. Then, the balanced receiver 106 converts the optical signals into analog electrical signals, and an analog-to-digital conversion circuit converts the analog electrical signals into four digital electrical signals. The DSP at the receiving device (RxDSP) performs one or more processing such as dispersion compensation, polarization demultiplexing, equalization, and decoding on the digital electrical signals.
Further, with reference to
It should be noted that the DAC 202, the signal light source 203, the PBS 205, or the PBC 206 is an optional module. For example, when the encoding device is a device in a wireless communication network, the DAC 202, the PBS 205, and the PBC 206 may not be included, and the signal light source 203 may be replaced with an oscillator, to complete transmission of wireless signals.
It should be noted that the ADC 306, the local oscillator light source 301, the PBS 302, the balancing receiver 305, or the BS 303 is an optional module. For example, when the decoding device is a device in a wireless communication network, the ADC 306, the balancing receiver 305, the PBS 302, and the BS 303 may not be included, and the local oscillator light source 301 is replaced with an oscillation source, to complete transmission of wireless signals.
Based on the communication system, the encoding device, and the decoding device provided in
With reference to
401: Obtain to-be-encoded data.
The to-be-encoded data may be data stored in an encoding device, or may be data received by an encoding device from another device.
For example, the encoding device may be a node on a transmission path. The encoding device may receive data sent by an upstream node and use the data as the to-be-encoded data, or when the encoding device needs to send local data to a decoding device, the encoding device uses the local data as the to-be-encoded data.
402: Split the to-be-encoded data into phase data and amplitude data according to a preset rule.
After obtaining the to-be-encoded data, the encoding device splits the to-be-encoded data into the phase data and the amplitude data according to the preset rule.
The preset rule may specifically include: splitting to-be-encoded data into a plurality of data blocks based on a preset length, and then using one part of the data blocks as phase data and the other part of the data blocks as amplitude data. For example, the to-be-encoded data may be evenly split into two parts, to obtain phase data and amplitude data that are of a same length, or the to-be-encoded data may be split into two parts of different lengths, to obtain phase data and amplitude data, or the like.
403: Obtain a constellation diagram corresponding to the to-be-encoded data.
The constellation diagram includes a plurality of constellation points, the plurality of constellation points include a constellation point with an amplitude value of 0, each constellation point has a corresponding probability value, and the probability value indicates an occurrence probability of the corresponding constellation point.
The constellation diagram may be a multidimensional constellation diagram such as a two-dimensional, three-dimensional, four-dimensional, or six-dimensional constellation diagram. For example, the constellation points in the constellation diagram may be neatly arranged in a form of a matrix. For one of planes, refer to
It should be noted that when the constellation diagram is a multidimensional constellation diagram, the amplitude value mentioned in this application is an amplitude value obtained after amplitude values of a constellation point in all dimensions are calculated. An amplitude value of a constellation point is obtained by extracting a square root of a sum of squares of amplitude values in all dimensions. For example, if a constellation point is [xi, xq, yi, yq], an amplitude value of the constellation point is √{square root over (xi2+xq2+yi2+yq2)}. For the constellation point with an amplitude value of 0, an amplitude value in each dimension is 0. For example, if the D4 lattice is used in this application, the constellation point with an amplitude value of 0 is [0,0,0,0]. For another example, if the A2 lattice is used in this application, the constellation point with an amplitude value of 0 is [0,0].
In a possible implementation, a probability corresponding to each constellation point in the constellation diagram is related to information entropy, a quantity of constellation points, and an encoding length of probabilistic constellation shaping (PCS) encoding. The information entropy depends on a capacity of the to-be-encoded data. The capacity is an amount of bit data transmitted in a unit time. A larger capacity indicates larger information entropy included. Further, when the constellation diagram corresponding to the to-be-encoded data is obtained, reference may be made to a transmission rate of the to-be-encoded data. Different to-be-encoded data may have different constellation diagrams. For example, when the to-be-encoded data has a larger capacity, constellation points in a selected constellation diagram are more densely distributed, and the selected constellation diagram has more constellation points, thus implementing transmission of a larger amount of data. For example, if to-be-encoded data with a capacity of 400 Gbit/s is transmitted by an encoding device at a bandwidth of wo GHz, a determined constellation diagram includes at least 16 constellation points.
404: Perform probabilistic constellation shaping encoding on the amplitude data based on the constellation diagram and the probability value corresponding to each constellation point, to obtain at least one group of symbol sequences.
The encoding device performs PCS encoding on the amplitude data based on the constellation diagram determined in step 403 and the probability value corresponding to each constellation point, to obtain the at least one group of symbol sequences.
In a possible implementation, step 404 may specifically include: splitting the amplitude data into at least one group of segmented bit sequences based on a preset length; and performing PCS encoding on the at least one group of segmented bit sequences based on the constellation diagram, to obtain the at least one group of symbol sequences that is in a one-to-one correspondence with the at least one group of segmented bit sequences, where bits included in the at least one group of symbol sequences correspond to the occurrence probabilities of the constellation points in the constellation diagram.
Specifically, PCS encoding is mapping each group of segmented bit sequences to one group of symbol sequences in a preset mapping manner based on the occurrence probabilities of the constellation points in the constellation diagram. Amplitude values of the constellation points may be the same or different, and more amplitude value categories may be included (for example, the amplitude value may be 0, 1, 2, 3, 4, 5, or the like). The preset mapping manner may be mapping performed by using a preset algorithm, or may be mapping performed directly based on a mapping relationship. It may be understood as that PCS encoding is encoding in which m-bit sequences are mapped to n-bit sequences, where m and n are positive integers, and n is greater than m. n-bit sequences corresponding to different m-bit sequences are also different. Specifically, each bit included in the symbol sequence output after PCS encoding is performed is used to represent one constellation point, and an occurrence quantity of each constellation point in the symbol sequence matches a corresponding probability value. For example, if the amplitude values of the constellation points include 0 and 1, an occurrence probability of the constellation point with an amplitude value of 0 is 0.5, an occurrence probability of the constellation point with an amplitude value of 1 is 0.5, the output symbol sequence includes six bits, and each bit represents one constellation point, there may be three amplitude values of 0 and three amplitude values of 1 in the six bits. That is, an occurrence quantity of the constellation points with an amplitude value of 0 matches the probability of 0.5, and an occurrence quantity of the constellation points with an amplitude value of 1 matches the probability of 0.5.
In an example scenario, a manner of searching a mapping table may be used to implement PCS encoding, to map m-bit sequences to n-symbol sequences, where the n-symbol sequence is a symbol including at least n bits. A mapping relationship between the m-bit sequences and the corresponding n-symbol sequences may be stored in the mapping table. Bits included in an output symbol sequence in the mapping table correspond to occurrence probabilities of constellation points in the constellation diagram. Because there are 2m bit sequences, the corresponding table includes at least 2m*n bits. During PCS encoding, the mapping table is searched by a value corresponding to an m-bit sequence, to output a corresponding n-symbol symbol sequence. For example, an example is used in which m=4 and n=6. For the mapping table, refer to Table 1 below, in which probabilities of a symbol 0 and a symbol 1 are both equal to 0.5.
In Table 1, each symbol in the output symbol sequence indicates an amplitude index of a constellation point. In addition, occurrence quantities of constellation points in the output symbol sequence in Table 1 correspond to probability values of the constellation points. For example, in Table 1, an occurrence probability of a constellation point with an amplitude index of 0 is 0.5, and an occurrence probability of a constellation point with an amplitude index of 1 is 0.5; and occurrence quantities of the constellation points in Table 1 match the probabilities.
The step of performing PCS encoding may specifically include: splitting the amplitude data into a plurality of groups of 4-bit bit sequences, and then searching the mapping table, to obtain corresponding 6-bit symbol sequences. For example, if an m-bit sequence is “0010”, a corresponding output symbol sequence is “001101”.
Besides, the output symbol sequence may further include more values, for example, 2, 3, 4, and 5. Different values represent different amplitudes. For example, a bit with a value of 2 represents an amplitude value of 2 or an index of a second category of amplitude values obtained after amplitude values are sorted; a bit with a value of 3 represents an amplitude value of 3 or an index of a third category of amplitude values obtained after amplitude values are sorted; a bit with a value of 4 represents an amplitude value of 4 or an index of a fourth category of amplitude values obtained after amplitude values are sorted; a bit with a value of 5 represents an amplitude value of 5 or an index of a fifth category of amplitude values obtained after amplitude values are sorted; . . . . The rest can be deduced by analogy.
405: Combine the at least one group of symbol sequences and the phase data, and then performing encoding, to obtain output data.
After the at least one group of symbol sequences is obtained, the at least one group of symbol sequences and the phase data may be combined, and the combined data may be encoded, to obtain the output data.
In a possible implementation, the at least one group of symbol sequences is split into at least two categories of symbol sequences, including a first category of symbol sequences and a second category of symbol sequences, where amplitude values of the first category of symbol sequences are not 0, and amplitude values of the second category of symbol sequences are 0. Then, the first category of symbol sequences and the phase data are combined, to obtain phase and amplitude combined data. Then, the second category of symbol sequences and the phase and amplitude combined data are combined, to obtain the output data.
In a possible implementation, before step 405, the method provided in this embodiment may further include: obtaining check data of the phase data and the at least one group of symbol sequences. Specifically, the phase data and the at least one group of symbol sequences may be combined and then input into an FEC encoder, and FEC encoding may be performed on the phase data and the at least one group of symbol sequences, to obtain the check data.
A specific process of FEC encoding may include: The data obtained after the phase data and the at least one group of symbol sequences are combined may be expressed as u=(u1, u2, u3, . . . , ua-1), and the u is encoded by using a preset generator matrix, to obtain the check data V=(v1, v2, v3, . . . , vb-1), where
After the check data is obtained, the check data is further added to be combined when the first category of symbol sequences with an amplitude value that is not 0 and the phase data are combined. Specifically, the check data and the phase data may be combined, to obtain phase and check combined data. For example, the check data is added to a head or tail of the phase data, to obtain the phase and check combined data. Then, the phase and check combined data and the first category of symbol sequences with an amplitude value that is not 0 are combined, to obtain the phase and amplitude combined data.
More specifically, the at least one group of symbol sequences obtained in step 404 are amplitude indexes of the constellation points that are in the constellation diagram and to which the amplitude data is mapped. Values of indexes of amplitude values may be of K+1 categories, an index corresponding to the amplitude value 0 is 0, and K is a positive integer. For example, if the bit sequence “0010” is mapped to “001202”, “2” in “001202” represents an amplitude index of a mapped-to constellation point, and indicates that an amplitude value of the constellation point belongs to a second category of amplitude values. If the constellation diagram includes constellation points with amplitude values of 0, 2, 4, and 6, and the amplitude values are arranged in ascending order, a 0th category of amplitude values includes 0, a first category of amplitude values includes 2, a second category of amplitude values includes 4, and a third category of amplitude values includes 6. Certainly, the amplitude values may alternatively not be sorted by sizes of the amplitude values. For example, the amplitude values are arranged in a manner of 0, 4, 6, and 2. In this case, the 0th category of amplitude values includes 0, the first category of amplitude values includes 4, the second category of amplitude values includes 6, and the third category of amplitude values includes 2.
That the at least one group of symbol sequences are amplitude indexes of the constellation points that are in the constellation diagram and to which the amplitude data is mapped is more specifically described below.
When the check data of the phase data and the at least one group of symbol sequences is obtained, amplitude indexes may be converted into binary-identified values. For example, when there are four amplitude value categories, an amplitude index 0 is expressed as “00”, an amplitude index 1 is expressed as “01”, an amplitude index 2 is expressed as “11”, and an amplitude index 3 is expressed as “10”. When there are more amplitude value categories, amplitude indexes may be expressed by using more bits. For example, when there are six amplitude value categories, three bits may be used to express amplitude indexes. An amplitude index 0 is expressed as “000”, an amplitude index 1 is expressed as “010”, and the like. The rest can be deduced by analogy.
That the phase data and the first category of symbol sequences with an amplitude value that is not 0 are combined, to obtain phase and amplitude combined data may specifically include: classifying bits included in the first category of symbol sequences, to obtain K groups of amplitude bit sequences, where amplitude indexes of bits included in a same group of amplitude bit sequences have a same value; then, splitting the phase and check combined data, to obtain K groups of phase bit sequences that are in a one-to-one correspondence with the K groups of amplitude bit sequences, where a length of each of the K groups of phase bit sequences is related to values of amplitude indexes of the corresponding group of amplitude bit sequences; and then, combining each of the K groups of amplitude bit sequences and a corresponding group of phase bit sequences, to obtain K groups of bit sequences, where the K groups of bit sequences form the phase and amplitude combined data, and lengths of at least two of the K groups of bit sequences are different.
Optionally, the combining each of the K groups of amplitude bit sequences and a corresponding group of phase bit sequences may specifically include: performing mapping on the K groups of phase bit sequences in a preset manner, to obtain K groups of phase-mapped bit sequences; and then, performing operation on each of the K groups of phase-mapped bit sequences and a corresponding group of amplitude bit sequences, to obtain the K groups of bit sequences. The operation may specifically include but is not limited to an operation, for example, a product operation, a tensor product operation, or table lookup.
Optionally, after encoding the to-be-encoded data and obtaining the output data, the encoding device further sends the output data to the decoding device. The decoding device may decode the output data and extract data included in the output data. As such, transmission of the to-be-encoded data is successfully completed.
Therefore, in the implementations in this application, because the selected constellation diagram includes the constellation point with an amplitude value of 0, smaller information entropy can be implemented based on the constellation point with an amplitude value of 0. For example, when smaller information entropy is required, an occurrence probability of the constellation point with an amplitude value of 0 may be increased, whereas when larger information entropy is required, an occurrence probability of the constellation point with an amplitude value of 0 may be reduced, or a quantity of categories of amplitude values in the constellation diagram may be increased, or the like. Therefore, the encoding method provided in this embodiment of this application can implement more flexible information entropy.
The following describes in more detail the encoding method provided in this application.
For example,
First, an encoding device obtains to-be-encoded data and splits the to-be-encoded data into phase data and amplitude data.
Then, the encoding device performs data matching encoding on the amplitude data, to obtain at least one group of symbol sequences, where PCS encoding is used in this embodiment. In addition, before performing PCS encoding, the encoding device selects a constellation diagram, and determines an occurrence probability of each constellation point in the constellation diagram. The at least one group of symbol sequences includes amplitude indexes of amplitude values of constellation points to which the amplitude data is mapped.
For example, a D4 lattice is used as an example for description in this embodiment. For one of planes of the constellation diagram, refer to
There is one constellation point with energy of 0, an amplitude index of the constellation point is 0, and the constellation point specifically includes:
There are 24 constellation points with energy of 2, an amplitude index of the constellation points is 1, and the constellation points specifically include:
There are 24 constellation points with energy of 4, an amplitude index of the constellation points is 2, and the constellation points specifically include:
There are 96 constellation points with energy of 6, an amplitude index of the constellation points is 3, and the constellation points specifically include:
To implement PCS encoding with information entropy of 1, the amplitude index 0 and the amplitude index 1 may be selected. A total quantity of constellation points is 1+24=25, that is, including the constellation point with energy of 0 and the constellation points with energy of 2. Occurrence probabilities of the constellation points are adjusted, and the probabilities of the 24 constellation points with an amplitude index of 1 are the same. Therefore, the occurrence probabilities of the 25 constellation points are set to [0.328, 0.028, 0.028, . . . , 0.028], where “0.328” is the occurrence probability of the constellation point with energy of 0.
In this case, average information entropy of each symbol is −0.328*log 2(0.328)−0.028*log 2(0.028)*24≈4.
An average energy of each symbol is 0.028*2*24=1.344.
For QPSK constellation points (±1, ±1, ±1, ±1)/sqrt(2) in an existing solution, average information entropy of each symbol is 4, and an average energy of each symbol is 2.
Obviously, the energy of each symbol in this embodiment is smaller than that in the QPSK constellation diagram in the existing solution.
Therefore, in this embodiment, transfer of more information entropy by using a smaller energy can be implemented by using a constellation diagram and distribution of probabilities of constellation points.
Then, the encoding device combines the at least one group of symbol sequences and the phase data, and inputs the combined data into an FEC encoder for encoding. The at least one group of symbol sequences includes values of amplitude indexes. Therefore, amplitude indexes included in at least one group of amplitude indexes need to be converted into a plurality of binary bits. For example, when there are four categories of amplitude indexes, “0” is converted into “00”, “1” is converted into “01”, “2” is converted into “10”, “3” is converted into “ii”, and the like. The FEC encoder outputs check data of the phase data and the at least one group of symbol sequences.
The encoding device combines the check data and the phase data into phase and check combined data, and combines the phase and check combined data and the at least one group of symbol sequences, to obtain output data. In this embodiment, the combining the phase and check combined data and the at least one group of symbol sequences, to obtain output data is performing variable-length mapping on the phase and check combined data and the at least one group of symbol sequences, to obtain the output data.
For example, for variable-length mapping, refer to
An amplitude bit sequence (that is, the at least one group of symbol sequences) is split, to obtain K+1 groups of amplitude bit sequences, including one group of amplitude bit sequences with an amplitude index value of 0 and K groups of amplitude bit sequences with an amplitude index value that is not 0. When the amplitude bit sequence is split, the phase and check combined data is also correspondingly split, where a length used when the phase and check combined data is split is related to values of amplitude indexes of the corresponding group of amplitude bit sequences. Specifically, the amplitude bit sequence may be split in units of a preset quantity of bits, that is, each group of amplitude bit sequences includes the preset quantity of bits. A quantity of bits included in each group of phase bit sequences is determined based on a corresponding amplitude index value and the preset quantity.
For example, in the K groups of amplitude bit sequences with an amplitude index value that is not 0, each group of amplitude bit sequences includes two bits. One of the K groups of amplitude bit sequences is used as an example. A quantity of bits included in a phase bit sequence corresponding to the group of amplitude bit sequences is determined based on an amplitude index value included in the amplitude bit sequence. If the amplitude index value included in the amplitude bit sequence is 2, the quantity of bits included in the corresponding phase bit sequence is 9. It may be understood as: There are 24 constellation points with an amplitude index of 2, and two bits with an amplitude index of 2 represent 576 (24*24=576) possible constellation point combinations. A possible value of each bit in the phase bit sequence includes 0 or 1, and therefore, there are 512 (29=512) possible bit sequence combinations corresponding to nine bits. 512 is not greater than a quantity of possible constellation points in the two bits with an amplitude index of 2. That is, combinations of the possible constellation points in the two bits with an amplitude index value of 2 may include bit sequence combinations corresponding to nine bits. If the amplitude index value included in the amplitude bit sequence is 3, the quantity of bits included in the corresponding phase bit sequence is 13. It may be understood as: There are 96 constellation points with an amplitude index of 3, and two bits with an amplitude index value of 3 represent 9216 (96*96=9216) possible constellation point combinations. A possible value of each bit in the phase bit sequence includes 0 or 1, and therefore, 13 phase bits have 8192 (213=8192) possible combinations. 8192 is not greater than a quantity of possible constellation points in the two bits with an amplitude index value of 3. That is, combinations of the possible constellation points in the two bits with an amplitude index value of 3 may include possible bit sequence combinations of 13 bits.
After splitting the phase and check combined data, the encoding device performs phase mapping on each group of phase bit sequences obtained after the splitting, and maps the groups of phase bit sequences to combinations of different phases such as 0, π/2, π, and −π/2, to obtain groups of phase-mapped bit sequences that are in a one-to-one correspondence with the groups of phase bit sequences. Then, the encoding device performs product operation on each group of phase-mapped bit sequences and a corresponding group of amplitude bit sequences, to obtain K groups of bit sequences that are in a one-to-one correspondence with the groups of phase-mapped bit sequences.
For example, each time two bits with an amplitude index value of 1 are split from the amplitude bit sequence, nine bits are split from the phase and check combined data, phase mapping is then performed on the nine bits, and after the nine bits are mapped to combinations of different phases such as 0, π/2, π, and −π/2, tensor product operation is performed on the combinations of different phases and the two bits with an amplitude index value of 1, to obtain one group of bit sequences; each time two bits with an amplitude index value of 2 are split from the amplitude bit sequence, nine bits are split from the phase and check combined data, phase mapping is then performed on the nine bits, and after the nine bits are mapped to combinations of different phases such as 0, π/2, a, and −π/2, tensor product operation is performed on the combinations of different phases and the two bits with an amplitude index value of 2, to obtain one group of bit sequences; and each time two bits with an amplitude index value of 3 are split from the amplitude bit sequence, 13 bits are split from the phase and check combined data, phase mapping is then performed on the 13 bits, and after the 13 bits are mapped to combinations of different phases such as 0, π/2, π, and −π/2, tensor product operation is performed on the combinations of the different phases and the two bits with an amplitude index value of 3, to obtain one group of bit sequences. The rest can be deduced by analogy, to obtain the K groups of bit sequences.
The encoding device combines the K groups of bit sequences and the group of amplitude bit sequences with an amplitude index of 0. In this way, the output data can be obtained.
In this embodiment, because the constellation point with an amplitude index of 0 is directly combined and does not undergo processing with the phase data, the constellation point with an amplitude index of 0 carries least information. Therefore, smaller information entropy can be obtained by increasing an occurrence probability of the constellation point with an amplitude index of 0. If larger information entropy is required, the information entropy can be increased by increasing a quantity of amplitude value categories and/or reducing an occurrence probability of the constellation point with an amplitude value of 0. For example, because the constellation point with an amplitude index of 0 does not have phase information, and there are 24 constellation points with an amplitude index of 1 and 24 constellation points with an amplitude index of 2, at least information of more than four bits (log 2(24)>4) may be included; and because there are 96 different constellation points with an amplitude index of 3, information of more than six bits (log 2(96)>6) may be included. Therefore, more flexible information entropy can be implemented.
The foregoing describes in detail the encoding method provided in this application. The following describes the decoding method provided in this application.
With reference to
901: Obtain a received signal.
After encoding to-be-encoded data, an encoding device sends the encoded data to a decoding device through a communication network. The decoding device receives a received signal sent by the encoding device. For the communication network, refer to a related description about
902: Perform hard decision on the received signal, to obtain first amplitude data.
After receiving the received signal, the decoding device performs hard decision on the received signal, to obtain the first amplitude data.
Specifically, the decoding device performs hard decision on an amplitude value of the received signal, to obtain an amplitude value of each bit. For example, if an amplitude value of a received bit is 0, the decoding device decides the amplitude value of the bit as 0; if an amplitude value of a received bit is between 0 and 1, the decoding device decides the amplitude value of the bit as 1; if an amplitude value of a received bit is between 1 and 2, the decoding device decides the amplitude value of the bit as 2; . . . . The rest can be deduced by analogy.
903: Perform iterative decoding based on the received signal and the first amplitude data, to obtain second amplitude data and phase data.
After the first amplitude data is obtained, iterative decoding is performed based on the received signal and the first amplitude data, to obtain the second amplitude data and the phase data.
Specifically, an iterative decoding process may include: performing iterative decoding for N times based on the received signal and the first amplitude data, to obtain the second amplitude data and the phase data, where N is a positive integer, and the phase data is obtained after an Nth decoding is performed.
During first decoding, the decoding device calculates a log likelihood ratio (LLR) based on the received signal and the first amplitude data, and then, performs FEC decoding on the first LLR, to obtain amplitude data of the first decoding. The amplitude data and the received signal are used as input data for next decoding.
The Mth decoding is used as an example: obtaining amplitude data of an (M−1)th decoding; splitting the received signal into K groups of amplitude bit sequences based on the amplitude data of the (M−1)th decoding, where K is a positive integer; obtaining a quantity of bits included in each of the K groups of amplitude bit sequences; obtaining, based on the quantity of bits included in each group of amplitude bit sequences and the received signal, LLR information for the Mth decoding; and performing FEC decoding on the LLR information for the Mth decoding, to obtain amplitude data of the Mth decoding.
In addition, the quantity of bits included in each group of amplitude bit sequences is related to amplitude values of bits in the corresponding group of amplitude bit sequences. For example, if an amplitude value is 3, a corresponding quantity of bits is 13, and if an amplitude value is 2, a corresponding quantity of bits is 9.
For example, an LLR value of an nth bit in the first amplitude data is calculated as follows:
The received signal is s; c is a set of assumed transmitted symbols; Cn+, Cn− are a transmit constellation point collection that enables a value of the nth bit to be 1 and a transmit constellation point collection that enables a value of the nth bit to be 0, respectively; p(s|c) represents a probability that s is received when c is transmitted; and p(c|s) represents a probability that c is transmitted when s is received.
After the LLR value is calculated, more accurate amplitude data can be obtained through FEC decoding, because the received signal may have noise, resulting in erroneous determining in the hard decision or LLR calculation. A specific FEC decoding manner may include: A check matrix is preset in the decoding device.
In addition, G·H=0. For G, refer to the generator matrix described in step 405. Therefore, whether there is erroneous determining in the output LLR obtained through calculation can be verified by using H. A specific verification manner is C={v∈V:v·HT=0}, where C is output amplitude data, and V is a collection of LLR values obtained through calculation.
During the Nth decoding, decoded data output by an FEC decoder is split in a preset manner, to obtain the second amplitude data and the phase data. The preset manner is a manner agreed upon by the encoding device and the decoding device, and is a reverse of a manner in which the encoding device combines the at least one group of symbol sequences and the phase data before performing FEC encoding. The step of splitting the decoded data is a reverse process of the manner of combining the at least one group of symbol sequences and the phase data in step 405. For example, if first y bits are the at least one group of symbol sequences and last q bits are the phase data when the at least one group of symbol sequences and the phase data are spliced in step 405, the decoding device splits the first y bits as the second amplitude data and the last q bits as the phase data when splitting the output decoded data.
In addition, because a value of a bit included in the amplitude data is an amplitude index, the amplitude index in the value of the amplitude data is replaced with corresponding binary bits before FEC decoding is performed. For example, if there are four categories of amplitude index values, an amplitude index value 0 is replaced with “00”, an amplitude index value 1 is replaced with “01”, an amplitude index value 2 is replaced with “10”, and an amplitude index value 3 is replaced with “11”.
For example, as shown in
904: Perform probabilistic constellation shaping decoding on the second amplitude data based on a preset constellation diagram, to obtain amplitude-decoded data.
After the second amplitude data is obtained, PCS decoding is performed on the second amplitude data based on the preset constellation diagram, to obtain the amplitude-decoded data. For the constellation diagram, refer to a related description in step 403. Details are not described herein again.
Specifically, a PCS decoding process and the PCS encoding process described in step 403 are reverses of each other. If PCS encoding is performed by using a preset algorithm, corresponding PCS decoding is performed based on reverse operation of the preset algorithm.
For example, if PCS encoding is performed based on the foregoing mapping table, PCS decoding in this embodiment may also be performed based on the foregoing mapping table. For example, a mapping table stored in the decoding device may be Table 2.
Table 2 is similar to Table 1, and details are not described herein again. A difference is that the output symbol sequence in Table 1 is the input symbol sequence in Table 2, and the input bit sequence in Table 1 is the output bit sequence in Table 2.
After obtaining the second amplitude data, the decoding device may split the second amplitude data into at least one group of symbol sequences based on a decoding length of PCS decoding, and then search the mapping table to map the at least one group of symbol sequences to at least one group of segmented bit sequences that is in a one-to-one correspondence with the at least one group of symbol sequences. The at least one group of segmented bit sequences is the amplitude-decoded data. For example, if one of the at least one group of symbol sequences is “110001”, a mapped-to bit sequence is “1111”.
905: Combine the amplitude-decoded data and the phase data, to obtain decoded data.
After obtaining the amplitude-decoded data, the decoding device combines the amplitude-decoded data and the phase data, to obtain the decoded data.
It may be understood as that a specific manner of combining the amplitude-decoded data and the phase data and step 402 may be reverse processes of each other. For example, if the encoding device evenly splits the to-be-encoded data into two pails, the amplitude-decoded data and the phase data may be directly combined to obtain the decoded data.
Therefore, in this embodiment, the decoding device may perform PCS decoding on the second amplitude data based on the preset constellation diagram, to obtain the corresponding amplitude-decoded data. The constellation diagram includes a plurality of constellation points, the constellation diagram includes a constellation point with an amplitude value of 0, each constellation point has a corresponding probability value, and the probability value indicates an occurrence probability of the corresponding constellation point. Therefore, the decoding device may decode the received signal based on the probability values, to obtain the accurate decoded data, and extract data included in the received signal. In this way, more flexible information entropy can be implemented, or receive data including larger information entropy can be received.
An embodiment of this application further provides a digital processing chip. The digital processing chip integrates a circuit and one or more interfaces that are used to implement the TxDSP 201 or RxDSP 307 or a function of the TxDSP 201 or RxDSP 307. When a memory is integrated into the digital processing chip, the digital processing chip may complete the method steps in any one or more of the foregoing embodiments corresponding to
Persons of ordinary skill in the art may understand that all or some of the steps of the foregoing embodiments may be implemented by a program instructing related hardware. The program may be stored in a computer-readable storage medium. The storage medium mentioned may be a read-only memory, a random access memory, or the like. Specifically, for example, the foregoing processing unit or processor may be a central processing unit, a 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, a transistor logic device, a hardware component, or any combination thereof. 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 this application.
When software is used to implement the embodiments, the method steps in the foregoing embodiments may be implemented completely or partially in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or some of the procedures or functions according to the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or another programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium.
Finally, it should be noted that 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 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.
Number | Date | Country | Kind |
---|---|---|---|
202010001718.8 | Jan 2020 | CN | national |
This application is a continuation of International Application No. PCT/CN2020/116678, filed on Sep. 22, 2020, which claims priority to Chinese Patent Application No. 202010001718.8, filed on Jan. 2, 2020. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2020/116678 | Sep 2020 | US |
Child | 17810366 | US |