Data encoding method and device, data decoding method and device, electronic equipment and storage medium
By segmenting and FEC encoding of the A-PHY payload packet, the problem of increasing resource occupation during data transmission errors in the A-PHY link is solved, and the data transmission efficiency is improved.
Patent Information
- Application Number
- CN202411656023.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-01-17
AI Technical Summary
When an error is detected during data transmission, the retransmission mechanism can only correct the error by retransmitting the complete payload, resulting in increased resource occupation and reduced data transmission efficiency.
By segmenting the original A-PHY payload packets, N coded input packets are generated, and the FEC encoding unit is used to encode them to generate target payload packets, reducing the number of data retransmissions and improving data transmission efficiency.
Recover correct data in a timely manner during data transmission, reduce the number of data retransmissions, and improve the data transmission efficiency of the A-PHY link.
Smart Images

Figure CN119324765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data encoding and decoding method, device, electronic equipment and storage medium. Background Art
[0002] In data transmission, the Automotive Serial Interface- Physical Layer (A-PHY) defines a retransmission mechanism. When the receiving end detects an error in data transmission based on the checksum, it will send a retransmission request to the sending end. However, the retransmission mechanism can only correct errors by retransmitting a complete payload packet. Each retransmission request will occupy the resources of the A-PHY link, and the retransmission requests will increase as the link bit error rate increases, thereby reducing the data transmission efficiency of the A-PHY link. Therefore, a more efficient data processing design is urgently needed to optimize data transmission efficiency and cost. Summary of the invention
[0003] The present invention provides a data encoding and decoding method, device, electronic device and storage medium.
[0004] According to a first aspect of the present disclosure, a data encoding method is provided, which is applied to a transmitting end and includes: The original A-PHY payload packet is segmented to obtain N coded input packets; The N encoding input packets are respectively encoded by the FEC encoding unit to obtain N encoding output packets; wherein the encoding input packets correspond to the encoding output packets one by one; and N is a positive integer; Encode N encoded output packets to obtain a target payload packet; Send the target payload packet to the receiving end.
[0005] According to a second aspect of the present disclosure, a data decoding method is provided, which is applied to a receiving end and includes: Receive the target payload packet sent by the sender; Decode the target payload packet to obtain N decoded input packets; Decoding N decoding input packets through the FEC decoding unit to obtain N decoding output packets; wherein the decoding input packets correspond to the decoding output packets one by one; and N is a positive integer; The N decoded output packets are concatenated to obtain the original A-PHY payload packet.
[0006] According to a third aspect of the present disclosure, a data encoding device is provided, which is applied to a transmitting end and includes: The sending module is used to send the target payload packet to the receiving end A segmentation module, used for segmenting the original A-PHY payload packet to obtain N coded input packets; A first encoding module, configured to encode N encoding input packets respectively through an FEC encoding unit to obtain N encoding output packets; wherein the encoding input packets correspond to the encoding output packets one by one; and N is a positive integer; The second encoding module is used to encode the N encoding output packets to obtain a target payload packet.
[0007] According to a fourth aspect of the present disclosure, a data decoding device is provided, which is applied to a receiving end, and includes: The sending module is used to send the target payload packet to the receiving end A segmentation module, used for segmenting the original A-PHY payload packet to obtain N coded input packets; A first encoding module, configured to encode N encoding input packets respectively through an FEC encoding unit to obtain N encoding output packets; wherein the encoding input packets correspond to the encoding output packets one by one; and N is a positive integer; The second encoding module is used to encode the N encoding output packets to obtain a target payload packet.
[0008] According to a fifth aspect of the present disclosure, there is provided an electronic device, including: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that the at least one processor can execute the data encoding method provided by the first aspect and / or the data decoding method provided by the second aspect.
[0009] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the data encoding method provided by the first aspect and / or the data decoding method provided by the second aspect.
[0010] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program stored on a storage medium, and when the computer program is executed by a processor, it implements the data encoding method provided in the first aspect and / or the data decoding method provided in the second aspect.
[0011] According to the technical solution disclosed in the present invention, correct data can be restored in time when an error occurs in data transmission, reducing the number of data retransmissions, thereby helping to improve the data transmission efficiency of the A-PHY link.
[0012] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present application will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of a data encoding process provided by an embodiment of the present invention; Figure 2 A schematic diagram of a target payload packet generation process provided by an embodiment of the present invention; Figure 3 Schematic diagram of mapping a payload packet provided by an embodiment of the present invention Figure 1 ; Figure 4 Schematic diagram of mapping a payload packet provided by an embodiment of the present invention Figure 2 ; Figure 5 A schematic diagram of single-format data encoding provided by an embodiment of the present invention; Figure 6 A schematic diagram of adaptive multi-format encoding provided by an embodiment of the present invention; Figure 7 A schematic diagram of a data decoding process provided by an embodiment of the present invention; Figure 8 A schematic diagram of a process for generating an original A-PHY payload packet provided by an embodiment of the present invention; Fig. 9 A schematic diagram of the structure of a data encoding device provided by an embodiment of the present invention; Fig.10 A schematic diagram of the structure of a data decoding device provided by an embodiment of the present invention; Fig.11 It is a schematic diagram of the structure of an electronic device used to implement the data encoding method and / or data decoding method of the embodiments of the present disclosure. DETAILED DESCRIPTION
[0014] The present disclosure will be further described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0015] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0016] The term "and / or" herein means that there may be three relationships. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" herein means any combination of at least two of any one or more of a plurality of. For example, at least one of A, B, and C may mean any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" herein refer to and distinguish a plurality of similar technical terms. They do not mean to limit the order or to limit the meaning to only two. For example, the first feature and the second feature refer to two types / two features. The first feature may be one or more, and the second feature may also be one or more.
[0017] In the related art, the A-PHY protocol is a high-speed serializer / deserializer (Serializer / Deserializer, SerDes) physical layer interface specification designed for long-distance applications. A-PHY mainly provides unidirectional data flow, bidirectional low-throughput control commands and control data flow. In addition, A-PHY can also directly provide the required power to the peripheral units through the A-PHY data line. The A-PHY physical layer encodes, decodes and transmits the symbols extracted from the data packet (A-Packet) according to the modulation scheme. The A-PHY physical layer includes a retransmission layer (Retransmission, RTS), a physical coding sublayer (Physical Coding Sub-Layer, PCS) and a physical media dependent layer (Physical Media Dependent, PMD). Among them, RTS is used to resend A-Packet data packets; PCS is used for A-Packet encoding and data format conversion; PMD is used to send and receive data bit streams.
[0018] In the related art, the A-PHY protocol transmits data in units of A-PHY payload packets, and transmits data in full-duplex form in both directions of transmission. During the transmission process, the sender updates the cyclic redundancy check (CRC8) in the header byte and the CRC32 in the payload to the payload packet, and the receiver determines the correctness of the currently transmitted A-PHY payload packet through CRC detection. When an error occurs in the transmission of the A-PHY downlink payload packet, the receiver sends a retransmission request through the uplink through the Reliable Transfer Service (RTS) retransmission mechanism in the A-PHY protocol to retransmit the erroneous A-PHY payload packet; conversely, when an error occurs in the transmission of the uplink payload packet, a retransmission request is also sent by the downlink.
[0019] In the prior art, a retransmission timeout mechanism is defined in the A-PHY protocol. When the receiving end detects an error in the currently transmitted payload packet based on CRC8 and CRC32, it will transmit a retransmission request to the sending end. When the retransmission request times out or reaches the upper limit of the retransmission request and still cannot receive the correct payload packet, the receiving end will terminate the retransmission of the payload packet. The retransmission mechanism can only correct errors by retransmitting a complete payload packet. Each retransmission request will occupy A-PHY link resources, and the retransmission request will increase as the link bit error rate increases, thereby reducing the data transmission efficiency of the A-PHY link.
[0020] In order to at least partially solve one or more of the above problems and other potential problems, the present disclosure proposes a data encoding scheme applied to the PCS layer, which includes: segmenting the original A-PHY payload packet to obtain N encoded input packets; encoding the N encoded input packets respectively through the FEC encoding unit to obtain N encoded output packets; encoding the N encoded output packets to obtain a target payload packet; and sending the target payload packet to the receiving end. In this way, when an error occurs in data transmission, the correct data can be restored in time, and the number of data retransmissions can be reduced, thereby helping to improve the data transmission efficiency of the A-PHY link.
[0021] Figure 1 is a schematic diagram of a data encoding process according to an embodiment of the present disclosure, such as Figure 1 As shown, the method comprises at least the following steps: S101: Segment the original A-PHY payload packet to obtain N coded input packets; S102: Encode N encoding input packets respectively through the FEC encoding unit to obtain N encoding output packets; wherein the encoding input packets correspond to the encoding output packets one by one; and N is a positive integer; S103: Encode the N encoded output packets to obtain a target payload packet; S104: Send the target payload packet to the receiving end.
[0022] Here, the data encoding method is applied at the transmitting end.
[0023] In some embodiments, the original A-PHY payload packet refers to a basic data payload unit without any modification or additional processing under the A-PHY protocol. The original payload packet includes: header information, payload and tail check. Specifically, the header information is used to identify and track the transmission of the payload packet; the payload is the core part of the payload packet, which contains the actual data to be transmitted; the tail check is used to detect whether an error occurs in the transmission process of the payload packet. Among them, the size and content of the payload depends on the specific application scenario and requirements; the tail usually includes a check code such as CRC-32, which is a commonly used cyclic redundancy check algorithm that can provide a higher error detection capability. The original A-PHY payload packet may include various types of information; such as audio, video, text or other forms of data.
[0024] In some embodiments, the segmentation process may include: 1. Fixed size segmentation: Fixed size segmentation requires segmenting the original A-PHY payload packet according to a fixed data block size. Here, the segmentation size can be adjusted according to actual conditions to adapt to different transmission requirements.
[0025] 2. Content-based segmentation: segmentation is performed based on the content of the original A-PHY payload packet; for example, related data is put together so that it can be more easily reassembled and parsed at the receiving end.
[0026] 3. Dynamic segmentation: Dynamically adjust the segmentation size according to the state and load of the transmission channel. This dynamic segmentation method requires more complex control logic, but can better adapt to the changing transmission environment.
[0027] In some embodiments, the encoding input packet refers to an original data packet to be processed by a forward error correction (FEC) encoding unit. During the encoding process, the encoding input packet is input into the FEC encoding unit for further processing and encoding.
[0028] In some embodiments, the FEC encoding unit is a core component for performing forward error correction coding. The FEC encoding unit takes the encoding input packet as input and generates the encoding output packet through a specific encoding algorithm. The FEC encoding process includes: encoding N encoding input packets respectively to obtain N original payload data and N encoding results. Here, the encoding result is used to store redundant information for forward error correction. Based on the redundant information used for forward error correction and the original payload data, the encoding output packet is obtained. At the receiving end, the FEC decoding unit detects and corrects errors that occur during the transmission process through the redundant information used for forward error correction. The FEC encoding unit includes but is not limited to: Reed-Solomon Codes (RS), Hamming Code. Preferably, the FEC encoding unit is specifically implemented as RS encoding.
[0029] In some embodiments, the coded output packet refers to a data packet obtained after being processed by the FEC coding unit. Compared with the coded input packet, the coded output packet not only contains the original payload data, but also adds redundant information for error detection and correction. The redundant information is generated by a specific coding algorithm. The redundant information enables the receiving end to use the redundant information for error correction after receiving the data packet, even if some data packets are erroneous or lost during transmission, thereby restoring the original payload data in the original A-PHY payload packet.
[0030] Figure 2 A schematic diagram of the target payload packet generation process is shown, Figure 2 As shown, the target payload packet generation process includes: segmenting the original A-PHY payload packet to obtain N coded input packets; encoding the N coded input packets respectively through the FEC coding unit to obtain N coded output packets; encoding the N coded output packets through the target coding method (8-bit / 10-bit coding (8b / 10bEncoding, 8b10b), 9-bit / 10-bit coding (9b / 10b Encoding, 9b10b)) to obtain the target payload packet.
[0031] The solution of the embodiment of the present disclosure is to divide the original A-PHY payload packet to obtain N coded input packets; encode the N coded input packets respectively through the FEC encoding unit to obtain N coded output packets; and encode the N coded output packets through the target encoding method to obtain the target payload packet. In this way, when an error occurs in data transmission, the correct data can be restored in time, and the number of data retransmissions can be reduced, thereby helping to improve the data transmission efficiency of the A-PHY link.
[0032] In an embodiment of the present disclosure, N coded output packets are encoded to obtain a target payload packet, including: if in NRZ coding mode, the N coded output packets are scrambled by an scrambling unit to obtain a first payload packet; and the first payload packet is encoded by a target coding format to obtain a target payload packet.
[0033] In some embodiments, the non-return-to-zero (NRZ) coding is a coding method in digital communication, which uses high and low signal levels to represent digital logic signals for transmitting information; in NRZ coding, a high level usually represents a binary bit "1", while a low level represents a binary bit "0"; NRZ coding includes unipolar non-return-to-zero code and bipolar non-return-to-zero code.
[0034] In some embodiments, the scrambling unit is a device or module for randomizing digital signals. In digital communication systems, scrambling units are generally used to improve the spectral characteristics of signals, reduce DC components, and improve the anti-interference ability of signals. By introducing randomness, the scrambling unit can make the data stream that may originally have a long string of continuous "0" or "1" more balanced, which is beneficial to the clock recovery and data decoding of the receiving end. The scrambling process refers to the process of randomizing digital signals using a scrambling unit. In the NRZ coding mode, the scrambling process is generally applied to the payload packet (i.e., the data packet to be transmitted). The specific implementation of the scrambling process may include XORing the original data bits with the pseudo-random bit sequence, or using other similar randomization algorithms. Through the scrambling process, the "0" and "1" in the data stream can be distributed more evenly, thereby reducing the DC component and improving the spectral characteristics of the signal.
[0035] In some embodiments, the first payload packet is encoded by a target encoding format to obtain a target payload packet: the first payload packet is encoded by a target encoding method to obtain a target payload packet. The first payload packet is a payload packet processed by scrambling; the target encoding method includes but is not limited to 8b10b, 9b10b and 64-bit / 66-bit encoding (64b / 66bEncoding, 64b66b). Specifically, the 8b10b encoding is an encoding scheme that maps 8-bit data to 10-bit encoding; the 9b10b encoding is an encoding scheme that maps 9-bit data to 10-bit encoding; the 64b66b is an encoding scheme that encodes 64-bit data or control information into a 66-bit code block.
[0036] In some embodiments, the target payload packet is a payload packet obtained after being encoded by a target encoding method. The target payload packets are organized together according to the encoding rules of the target encoding method to form a series of data streams that meet the target encoding method standard. The target payload packets can be transmitted in a high-speed serial communication link to be decoded and recovered by a receiving end.
[0037] In this way, by scrambling the target payload packet through the scrambling unit, the DC component of the signal can be reduced, making the spectrum of the signal flatter, thereby helping to reduce distortion and interference of the signal during transmission.
[0038] In the disclosed embodiment, N coded output packets are encoded to obtain a target payload packet, including: if in PAM coding mode, the N coded output packets are scrambled by an scrambling unit to obtain a second payload packet; the second payload packet is symbol mapped by a mapping unit to obtain a third payload packet; the third payload packet is encoded by a target coding format to obtain a target payload packet.
[0039] Here, the second payload packet is a scrambled payload packet.
[0040] In some embodiments, PAM is a common signal modulation method that transmits information by adjusting the amplitude of the pulse; in PAM, different pulse amplitudes represent different data values; PAM is particularly important in digital communications, especially in Binary Pulse Amplitude Modulation (B-PAM) systems; for example, PAM4 is a four-level pulse amplitude modulation, which uses four different pulse amplitudes to represent data and is a feasible solution for achieving high-speed optical communications.
[0041] In some embodiments, the mapping unit is a device or module for mapping a digital signal or data to a specific amplitude or level. In PAM coding, the mapping unit is responsible for converting the input digital signal (such as a binary data stream) into pulse signals with different amplitudes. The amplitudes of these pulse signals represent the value or state of the original digital signal. The design and implementation of the mapping unit are usually based on specific PAM coding rules and standards to ensure that the input digital signal can be correctly mapped to the corresponding pulse amplitude. The mapping process refers to the process of converting the input digital signal into a pulse signal with a specific amplitude using a mapping unit.
[0042] In some embodiments, the target payload packet is obtained by encoding the third payload packet by a target coding format: the target payload packet is obtained by encoding the third payload packet by a target coding method. The third payload packet is a payload packet processed by symbol mapping; the target coding method includes but is not limited to 8b10b, 9b10b and 64b66b.
[0043] Figure 3 The diagram shows how to map the payload packet. Figure 1 ,like Figure 3 As shown, at the transmitting end, the target payload packet Q is subjected to four-level pulse amplitude modulation (PAM4) mapping processing; the mapping processing refers to mapping each symbol to four different levels, each level corresponding to a two-bit binary symbol. Specifically, PAM4 uses four amplitude levels to represent four different symbols, and these four levels correspond to binary data 00, 01, 10, and 11 respectively.
[0044] Figure 4 The diagram shows how to map the payload packet. Figure 2 ,like Figure 4 As shown, the target payload packet Q1 is subjected to PAM4 mapping processing (low bit of PAM4 symbol: bit 0) at the transmitting end; the mapping processing refers to mapping the least significant bit (LSB) of the data to a specific level of the PAM4 symbol during the PAM4 mapping process. In the four levels of PAM4, each level corresponds to a binary two-bit combination, and the low bit (bit 0) determines the bit value of the even position (counting from 0) in these combinations. The target payload packet Q2 is subjected to PAM4 mapping processing (low bit of PAM4 symbol: bit 1) at the transmitting end; the mapping processing refers to mapping the LSB of the data to a specific level of the PAM4 symbol during the PAM4 mapping process. In the four levels of PAM4, each level corresponds to a binary two-bit combination, and the low bit (bit 1) determines the bit value of the even position (counting from 1) in these combinations.
[0045] In this way, the reliability of data transmission is improved by the scrambling unit, and the flexibility of data transmission is improved by the mapping unit.
[0046] In an embodiment of the present disclosure, N coded input packets are respectively encoded by an FEC coding unit to obtain N coded output packets, including: N coded input packets are respectively encoded by one or more target coding formats of the FEC coding unit to obtain N original payload data and N coding results; wherein the original payload data corresponds one-to-one to the coding results; based on the N original payload data and the N coding results, N coded output packets are obtained.
[0047] In some embodiments, when the FEC coding unit is specifically implemented as an RS coding unit, the target coding format includes but is not limited to: RS (54, 44, 8), RS (108, 98, 8), RS (116, 98, 8).
[0048] Figure 5 A schematic diagram of single format data encoding is shown, such as Figure 5 As shown in the figure, if the FEC coding unit is specifically implemented as an RS coding unit, the target coding format is RS (108, 98, 8), the original A-PHY payload packet length is 140, and B0 to B139 are in bytes; then the RS coding input packet S can be divided into two 98-length packets; among which S1 contains B0 to B97 in the original A-PHY payload packet P, and S2 contains B98 to B139 in the original A-PHY payload packet P. Since the remaining length of the effective payload of S2 is 42, which does not meet the RS coding length of 98, zero is padded after B139 (that is, filled with 56 ZERO BYTEs). The RS encoding output package R has two groups, R1 and R2; among them, R1 includes the original payload data (i.e., B0 to B97) and the encoding result (i.e., ENC BO to ENC B9); similarly, R2 includes the original payload data (i.e., B98 to B139), and R2 also includes the padding value (i.e., ZERO BYTE) and the encoding result (i.e., ENC B10 to B19).
[0049] In this way, encoding is performed through single-format encoding, and there is no need to dynamically adjust the encoding format according to changes in input data or communication conditions during the encoding process, which reduces the complexity of the encoder and helps to improve the efficiency of encoding.
[0050] Figure 6 A schematic diagram of adaptive multi-format encoding is shown, Figure 6As shown in the figure, if the FEC coding unit is specifically implemented as an RS coding unit, K is 2, the target coding format is RS (54, 44, 8) and RS (108, 98, 8), the original payload length is 140, and B0 to B139 are in bytes; then the RS encoded input packet S can be divided into one 98-length and one 44-length; among them, using RS (108, 98, 8) encoding, S1 contains B0 to B97 in the original A-PHY payload packet P; using RS (54, 44, 8), S2 contains B98 to B139 in the original A-PHY payload packet P; because the remaining effective payload length of S2 is 42, which does not meet the RS encoding length of 44, zero is padded after B139 (that is, filled with 2 ZERO BYTEs). RS encoding output packets R include two groups, R1 and R2; R1 includes the original payload data (i.e. B0 to B97), the encoding format identifier (i.e. RS TYPE), and the encoding result (i.e. ENC BO to ENC B9); similarly, R2 includes the original payload data (i.e. B98 to B139), the encoding format identifier (i.e. RSTYPE), the padding value (i.e. ZERO BYTE), and the encoding result (i.e. ENC B10 to B19). Here, in order to distinguish the RS encoding format used by the encoding input packet S, RS TYPE is added before each encoding input packet to indicate the current encoding format, so that the receiving end can identify it; the length of RS TYPE can be several bytes, in Figure 5 Take 1 Byte as an example.
[0051] In this way, adaptive multi-format encoding can dynamically allocate and utilize resources according to the needs of actual application scenarios.
[0052] In the disclosed embodiment, the encoding output package includes: original payload data and encoding results; wherein the original payload data is used to store original data; and the encoding results are used to store redundant information of forward error correction.
[0053] In some embodiments, the redundant information of forward error correction is additional information added at the sending end and used to detect and correct transmission errors at the receiving end. It improves the reliability and fault tolerance of data transmission, reduces the number of data retransmissions, and thus helps to improve data transmission efficiency.
[0054] In the disclosed embodiment, the coding output packet further includes: a coding format identifier, where the coding format identifier is used to indicate the coding format used by the FEC coding unit.
[0055] In some embodiments, the coding format identifier refers to an identifier that helps the processor at the receiving end determine which coding rule should be used to interpret or process. The advantages of adding the coding format identifier in the coded output packet are: 1. Ensure data compatibility: By identifying the encoding format, it can ensure that data can be correctly exchanged and parsed between different systems or devices. This helps maintain data compatibility and interoperability.
[0056] 2. Support multiple encoding schemes: In actual applications, it may be necessary to select a suitable encoding scheme according to different requirements and environments. The encoding format identifier enables the system to flexibly support multiple encoding schemes and switch them as needed.
[0057] 3. Improve data transmission efficiency: By selecting the appropriate encoding format, the efficiency and performance of data transmission can be optimized. For example, in some cases, using efficient compression encoding can reduce the bandwidth and time required for data transmission.
[0058] In an embodiment of the present disclosure, the encoded output packet also includes: a padding value, which is used to fill the padding value into the end of the Nth encoded output packet in response to the FEC encoding unit detecting that the Nth encoded input packet does not meet the length requirement of the encoding format after encoding N encoded input packets separately through the encoding format.
[0059] In some embodiments, the padding value is a filling value used to meet the length requirements of the coding format. Specifically, when the FEC coding unit encodes N coded input packets separately, if it is detected that the Nth coded input packet does not meet the length requirements specified by the coding format, a padding value will be added to the end of the coded output packet to ensure that its length meets the coding standard. Exemplarily, the length of the original A-PHY payload packet is 140, B0 to B139 are in bytes, and the RS coded input packet S can be divided into 2 98 lengths, where S1 contains B0 to B97 in the original A-PHY payload packet P, and S2 contains B98 to B139 in the original A-PHY payload packet P. Since the remaining length of the payload of S2 is 42, which does not meet the RS coding length of 98, zeros are padded after B139, that is, 56 padding values (i.e., ZERO BYTE) are used to fill.
[0060] In this way, the padding value can ensure that all encoded input packets meet the length requirements specified by the encoding format, thereby ensuring the consistency and stability of the encoding process.
[0061] Figure 7 is a flowchart of data decoding according to an embodiment of the present disclosure, such as Figure 7 As shown, the method comprises at least the following steps: S701: receiving a target payload packet sent by a transmitting end; S702: Decode the target payload packet to obtain N decoded input packets; S703: Decode N decoding input packets through the FEC decoding unit to obtain N decoding output packets; wherein the decoding input packets correspond to the decoding output packets one by one; and N is a positive integer; S704: Concatenate the N decoded output packets to obtain an original A-PHY payload packet.
[0062] In some embodiments, the target decoding method is the inverse process of the target encoding method. The target decoding methods include but are not limited to: 8b10b, 9b10b and 64b66b. Specifically, the 8b10b decoding is a decoding scheme that restores 10-bit encoding to original 8-bit data; the 9b10b encoding is a decoding scheme that restores 10-bit encoding to original 9-bit data; the 64b66b is a decoding scheme that decodes from a 66-bit code block back to 64-bit data or control information.
[0063] Figure 8 FIG. 1 is a schematic diagram showing the process of generating the original A-PHY payload packet. Figure 8 As shown, the original A-PHY payload packet generation process includes: the receiving end receives the target payload packet sent by the transmitting end; the target payload packet is decoded by the target decoding method (8b10b encoding mode or 9b10b encoding mode) to obtain N decoding input packets; the target decoding unit is used to decode the N decoding input packets respectively to obtain N decoding output packets; wherein the decoding input packets correspond to the decoding output packets one by one; the N decoding output packets are spliced to obtain the original payload packet.
[0064] In this way, when errors occur in data transmission, correct data can be restored in time, reducing the number of data retransmissions, thereby helping to improve the data transmission efficiency of the A-PHY link.
[0065] In the disclosed embodiment, a target payload packet is decoded to obtain N decoded input packets, including: decoding a first payload packet through a target decoding format to obtain a first payload packet or a third payload packet; if in NRZ coding mode, descrambling the first payload packet through a descrambling unit to obtain N decoded input packets; or if in PAM coding mode, symbol demapping the third payload packet through a demapping unit to obtain a second payload packet; descrambling the second payload packet through a descrambling unit to obtain N decoded input packets.
[0066] In some embodiments, the descrambling unit refers to a functional module located at the receiving end during the transmission of the digital signal. The main function of the descrambling unit is to restore the scrambled digital signal to the original, unscrambled digital signal. Scrambling is usually performed at the transmitting end in order to improve the randomness of the signal, improve the spectrum distribution of the signal, and enhance the anti-interference ability of the signal. The descrambling unit is the reverse process of this process. The descrambling unit can ensure that the receiving end can accurately restore the original A-PHY payload packet sent by the transmitting end. The descrambling process refers to a series of operations performed by the descrambling unit on the received scrambled digital signal to restore the original digital signal.
[0067] In some embodiments, the demapping unit refers to a functional module at the receiving end of PAM encoding that is responsible for mapping the symbols (i.e., pulse amplitudes) in the received PAM signal back to the original data values. In the PAM encoding process, the original data is usually quantized into different amplitude levels and mapped to corresponding pulse amplitudes for transmission. The demapping unit is the inverse process of this process. It demaps the symbols in the received PAM signal to the original data values, thereby recovering the original A-PHY payload packet. Demapping processing refers to a series of operations performed by the demapping unit on the received PAM signal to recover the original data value.
[0068] In this way, the demapping unit can perform corresponding demapping processing according to different PAM encoding methods, which helps to improve the flexibility of data transmission to adapt to different communication scenarios and requirements.
[0069] The present disclosure provides a data encoding device, such as Fig. 9 As shown, the configuration device includes: a sending module 901, used to send the target payload packet to the receiving end; a segmentation module 902, used to segment the original A-PHY payload packet to obtain N coded input packets; a first encoding module 903, used to encode the N coded input packets respectively through the FEC encoding unit to obtain N coded output packets; wherein the coded input packets correspond to the coded output packets one by one; N is a positive integer; a second encoding module 904, used to encode the N coded output packets to obtain the target payload packet.
[0070] In some embodiments, the second encoding module includes: if in NRZ encoding mode, scrambling N encoded output packets through an scrambling unit to obtain a first payload packet; encoding the first payload packet through a target encoding method to obtain a target payload packet.
[0071] In some embodiments, the second encoding module includes: encoding N encoded output packets to obtain a target payload packet, including: if in PAM encoding mode, scrambling the N encoded output packets through an scrambling unit to obtain a second payload packet; performing symbol mapping processing on the second payload packet through a mapping unit to obtain a third payload packet; encoding the third payload packet through a target encoding method to obtain a target payload packet.
[0072] In some embodiments, the first encoding unit includes: encoding N encoding input packets respectively through one or more target encoding formats of the FEC encoding unit to obtain N original payload data and N encoding results; wherein the original payload data corresponds one-to-one to the encoding results; based on the N original payload data and the N encoding results, N encoding output packets are obtained.
[0073] In some embodiments, the encoding output packet includes: original payload data and encoding results; wherein the original payload data is used to store original data; and the encoding results are used to store redundant information of forward error correction.
[0074] In some embodiments, the encoding output packet further includes: an encoding format identifier, where the encoding format identifier is used to indicate the encoding format used by the FEC encoding unit.
[0075] In some embodiments, the encoded output packet also includes: a padding value, which is used to fill the padding value into the end of the Nth encoded output packet in response to the FEC encoding unit detecting that the Nth encoded input packet does not meet the length requirement of the encoding format after encoding N encoded input packets separately through the encoding format.
[0076] The present disclosure provides a data decoding device, such as Fig.10 As shown, the configuration device includes: a receiving module 1001, used to receive a target payload packet sent by a transmitting end; a first decoding module 1002, used to decode the target payload packet to obtain N decoded input packets; a second decoding module 1003, used to decode the N decoded input packets through an FEC decoding unit to obtain N decoded output packets; wherein the decoded input packets correspond to the decoded output packets one by one; N is a positive integer; a splicing module 1004, used to splice the N decoded output packets to obtain an original A-PHY payload packet.
[0077] In some embodiments, the first decoding module includes: decoding the target payload packet by a target decoding method to obtain a first payload packet or a third payload packet; if in an NRZ coding mode, descrambling the first payload packet by a descrambling unit to obtain N decoded input packets; or if in a PAM coding mode, symbol demapping the third payload packet by a demapping unit to obtain a second payload packet; descrambling the second payload packet by a descrambling unit to obtain N decoded input packets.
[0078] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0079] Fig.11 FIG. 1 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Fig.11 As shown, the electronic device includes: a memory 1110 and a processor 1120, and the memory 1110 stores a computer program that can be run on the processor 1120. The number of memories 1110 and processors 1120 can be one or more. The memory 1110 can store one or more computer programs. When the one or more computer programs are executed by the electronic device, the electronic device executes the method provided by the above method embodiment. The electronic device may also include: a communication interface 1130, which is used to communicate with external devices and perform data exchange transmission.
[0080] If the memory 1110, the processor 1120 and the communication interface 1130 are implemented independently, the memory 1110, the processor 1120 and the communication interface 1130 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0081] Optionally, in a specific implementation, if the memory 1110, the processor 1120 and the communication interface 1130 are integrated on a chip, the memory 1110, the processor 1120 and the communication interface 1130 can communicate with each other through an internal interface.
[0082] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.
[0083] Further, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
[0084] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computer, the process or function according to the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (for example: infrared, Bluetooth, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc. It is worth noting that the computer-readable storage medium mentioned in the present disclosure may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0085] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0086] In the description of the embodiments of the present disclosure, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0087] The above are merely exemplary embodiments of the present disclosure and are not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data encoding method, applied to a transmitting end, characterized in that: The method comprises: The original A-PHY payload packet is segmented to obtain N coded input packets; The N coded input packets are respectively encoded by the FEC encoding unit to obtain N coded output packets; wherein the coded input packets correspond to the coded output packets one by one; and N is a positive integer; Encoding the N encoded output packets to obtain a target payload packet; The target payload packet is sent to a receiving end.
2. The method according to claim 1, characterized in that The step of encoding the N encoded output packets to obtain a target payload packet includes: If in NRZ encoding mode, the N encoded output packets are scrambled by a scrambling unit to obtain a first payload packet; The first payload packet is encoded in a target encoding manner to obtain the target payload packet.
3. The method according to claim 1, characterized in that: The step of encoding the N encoded output packets to obtain a target payload packet includes: If in PAM encoding mode, the N encoded output packets are scrambled by a scrambling unit to obtain a second payload packet; Performing symbol mapping processing on the second payload packet by a mapping unit to obtain a third payload packet; The third payload packet is encoded in a target encoding manner to obtain the target payload packet.
4. The method according to claim 1, characterized in that: The FEC encoding unit is used to encode the N encoded input packets respectively to obtain N encoded output packets, including: Encoding the N encoding input packets respectively by one or more target encoding formats of the FEC encoding unit to obtain N original payload data and N encoding results; wherein the original payload data corresponds to the encoding results one by one; Based on the N original payload data and the N encoding results, N encoding output packets are obtained.
5. The method according to claim 4, characterized in that The encoding output packet includes: the original payload data and the encoding result; wherein the original payload data is used to store original data; and the encoding result is used to store redundant information of forward error correction.
6. The method according to claim 4, characterized in that The encoding output packet also includes: an encoding format identifier, where the encoding format identifier is used to indicate the encoding format used by the FEC encoding unit.
7. The method according to claim 4, characterized in that The encoded output packet also includes: a padding value, which is used to fill the padding value into the tail of the Nth encoded output packet in response to the FEC encoding unit detecting that the Nth encoded input packet does not meet the length requirement of the encoding format after encoding the N encoded input packets respectively through the encoding format.
8. A data decoding method, applied to a receiving end, characterized in that: The method comprises: Receive the target payload packet sent by the sender; Decode the target payload packet to obtain N decoded input packets; Decoding the N decoding input packets through the FEC decoding unit to obtain N decoding output packets; wherein the decoding input packets correspond to the decoding output packets one by one; and N is a positive integer; The N decoded output packets are concatenated to obtain an original A-PHY payload packet.
9. The method according to claim 8, characterized in that The target payload packet is decoded to obtain N decoded input packets, including: Decoding the target payload packet in a target decoding manner to obtain a first payload packet or a third payload packet; If in NRZ encoding mode, the first payload packet is descrambled by a descrambling unit to obtain N decoded input packets; or If in the PAM coding mode, the third payload packet is symbolically demapped by a demapping unit to obtain a second payload packet; and the second payload packet is descrambled by a descrambling unit to obtain N decoded input packets.
10. A data encoding device, characterized in that: The device comprises: A sending module, used to send the target payload packet to the receiving end; A segmentation module, used for segmenting the original A-PHY payload packet to obtain N coded input packets; A first encoding module, configured to encode the N encoding input packets respectively through an FEC encoding unit to obtain N encoding output packets; wherein the encoding input packets correspond to the encoding output packets one by one; and N is a positive integer; The second encoding module is used to encode the N encoded output packets to obtain a target payload packet.
11. A data decoding device, characterized in that: The device comprises: A receiving module, used for receiving a target payload packet sent by a sending end; A first decoding module, used for decoding the target payload packet to obtain N decoding input packets; A second decoding module, configured to decode the N decoding input packets through an FEC decoding unit to obtain N decoding output packets; wherein the decoding input packets correspond to the decoding output packets one by one; and N is a positive integer; The splicing module is used to splice the N decoded output packets to obtain an original A-PHY payload packet.
12. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
14. A computer program product, comprising a computer program stored on a storage medium, characterized in that The computer program implements the method according to any one of claims 1 to 9 when executed by a processor.
Citation Information
Patent Citations
Fiber transmission module and optical signal transmission device
CN102356585A
Data encoding method, data decoding method and communication device
CN114257334A
Data processing method, system and device and computer readable storage medium
CN117749327A
Cellular Networks FEC Offload
US20230299875A1